Skip to content

Conversation

@dsfaccini
Copy link
Collaborator

@dsfaccini dsfaccini commented Dec 11, 2025

anthropic.cloud.integrations.mp4

@github-actions
Copy link

Docs Preview

commit: 2a629dc
Preview URL: https://745aebb5-pydantic-ai-previews.pydantic.workers.dev


### Microsoft Azure

Azure offers Claude models through their "Models as a Service" using an OpenAI-compatible API. Use [`OpenAIModel`][pydantic_ai.models.openai.OpenAIModel] with an Azure-configured client:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually we should be able to use AnthropicModel with AsyncAnthropicFoundry now: https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry#api-key-authentication

So let's update these docs to be like the other 3, and then also update this:

AsyncAnthropicClient: TypeAlias = AsyncAnthropic | AsyncAnthropicBedrock | AsyncAnthropicVertex

```python {title="<a href='/gateway/' style='float: right;'>Learn about Gateway</a>" test="skip"}
from pydantic_ai import Agent

agent = Agent('gateway/bedrock:us.anthropic.claude-haiku-4-5-20251001-v1:0')
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unlike the rest of this page, this will not actually use the AnthropicModel or the Anthropic-API(-running-on-Bedrock), but rather BedrockConverseModel and the AWS Bedrock Converse API (proxied via Gateway of course). Using the Anthropic model will pretty much always give better performance, so I'd prefer to not present this as an equivalent alternative to the AsyncAnthropicBedrock approach. (The little note at the end of the section linking to the bedrock docs is sufficient)

```python {title="<a href='/gateway/' style='float: right;'>Learn about Gateway</a>" test="skip"}
from pydantic_ai import Agent

agent = Agent('gateway/google-vertex:claude-sonnet-4-5@20250514')
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as up; this uses the Google Vertex API, rather than the Anthropic API hosted on Vertex.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And let's also have a section pointing out GoogleModel


bedrock_client = AsyncAnthropicBedrock() # Uses AWS credentials from environment
provider = AnthropicProvider(anthropic_client=bedrock_client)
model = AnthropicModel('claude-sonnet-4-5', provider=provider)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

```

!!! note "Bedrock vs BedrockConverseModel"
This approach uses Anthropic's SDK with AWS Bedrock credentials. For an alternative using AWS SDK (boto3) directly, see [`BedrockConverseModel`](bedrock.md).
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK here I agree it is is worth mentioning the BedrockConverseModel, and then that page will also show the Gateway option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants