- Notifications
You must be signed in to change notification settings - Fork1k
Open
Description
Description
Hi everyone!
Bedrock supports several model providers, and some of them already offer a native async client.
For example, Anthropic provides AsyncAnthropicBedrock:
https://github.com/anthropics/anthropic-sdk-python/blob/main/src/anthropic/lib/bedrock/_client.py#L273C7-L273C28
I’m concerned that the current anyio workaround could cause issues on scale
https://github.com/pydantic/pydantic-ai/blob/main/pydantic_ai_slim/pydantic_ai/models/bedrock.py#L360
Suggestion
Keep the existing Bedrock implementation unchanged, and add an is_bedrock flag to the Model arguments to determine which client to use.
What do you think?
Thank you
References
No response