Skip to content

Conversation

@dsfaccini
Copy link
Collaborator

Fixes #3625

many thanks to @nataziel for the reporting and suggesting a fix

),
# Bedrock does not support native structured output
supports_json_schema_output=False,
json_schema_transformer=None,
Copy link
Collaborator

Choose a reason for hiding this comment

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

BedrockProvider is not the only one that uses anthropic_model_profile, so with this changes the other providers still have the same issue.

I think we should implement this as I suggested in #3625 (comment):

That means moving the AnthropicJsonSchemaTransformer bit out of pydantic_ai.profiles.anthropic.anthropic_model_profile, and into AnthropicProvider.model_profile.

So anthropic_model_profile should not have any json_schema_transformer, and we should add it in AnthropicProvider.model_profile That way, AnthropicJsonSchemaTransformer will only be used with AnthropicProvider, not any other provider.

@dsfaccini dsfaccini requested a review from DouweM December 9, 2025 17:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

pydantic-ai-slim[bedrock] silently depends on anthropic

2 participants