Refacto Agents

Industry story

Pydantic AI v2.31.1 fixes Bedrock and Gemini model quirks

agent-framework guardrails reliability

Pydantic AI's v2.31.1 patch is small but tells you something real about the gap between what cloud-hosted model APIs promise and what they actually deliver. AWS Bedrock's Claude Sonnet 5 and Fable 5 can't reliably handle native structured output, so the framework now falls back automatically rather than letting your schema-enforced JSON pipeline blow up quietly. Same story on the Gemini side: thinking_level='MINIMAL' gets silently rejected by some models, so v2.31.1 steps it up to 'LOW' before it becomes your problem. If you're building agents on top of managed model endpoints, this is what the maintenance tax looks like.

Full analysis

Pydantic AI (an agent framework built on Pydantic for type-safe LLM applications) released v2.31.1 on August 17, 2026 with two targeted bug fixes relevant to agent builders using major model providers. The patch disables native structured output for Claude Sonnet 5 and Fable 5 when running on AWS Bedrock. Agents relying on schema-enforced JSON responses from those models on Bedrock will now fall back to alternative output handling. It also adds a fallback from Gemini's thinking_level='MINIMAL' to 'LOW' for models that reject the minimal setting, preventing agent pipelines using Gemini's extended-thinking mode from breaking silently.

Comments