Authentication
Set yourANTHROPIC_FOUNDRY_API_KEY and ANTHROPIC_FOUNDRY_RESOURCE environment variables.
azure_ad_token_provider to the Claude constructor.
Example
UseClaude with your Agent:
View more examples here.
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
id | str | "claude-sonnet-4-5" | The specific Azure Foundry Claude model ID to use |
name | str | "AzureFoundryClaude" | The name identifier for the model |
provider | str | "AzureFoundry" | The provider of the model |
resource | str | None | The Azure resource name (or set ANTHROPIC_FOUNDRY_RESOURCE) |
base_url | str | None | The base URL (mutually exclusive with resource) |
azure_ad_token_provider | Callable | None | Azure AD token provider for authentication |
max_retries | int | None | Maximum number of retries for failed requests |
Claude (Azure AI Foundry) extends the Anthropic Claude model with Azure AI Foundry integration and has access to most of the same parameters.