Documentation Index
Fetch the complete documentation index at: https://mintlify.com/phpaisdk/anthropic/llms.txt
Use this file to discover all available pages before exploring further.
AnthropicProvider is a final class that extends BaseProvider. It holds an AnthropicOptions configuration object as a public readonly property and creates AnthropicTextModel instances on demand. Because the class is final it cannot be subclassed. You typically interact with it via the Anthropic facade rather than directly — but constructing a provider manually is useful when you need multiple configured providers in the same process, or when wiring up a dependency injection container.
Constructor
$options parameter is promoted to a public readonly property, so it is accessible as $provider->options after construction. All subsequent model handles created by this provider share the same configuration.
The fully constructed configuration object. Use
AnthropicOptions::fromArray() to build one from a plain associative array.name()
'anthropic' (the value of AnthropicOptions::PROVIDER_NAME). The provider name is used internally by the model registry and capability resolution logic to scope entries to this provider.
textModel()
AnthropicTextModel bound to this provider’s options. The returned handle is lightweight — no network request is made at construction time. Call ->generate() or ->stream() on the resulting model to send requests to the Anthropic Messages API.
A Claude model identifier string. Must match either a model present in the built-in model catalog or one registered via
Anthropic::registerModel() / the provider’s model registry.