
Why it mattersA refusal mid-run used to end the call. The new fallback keeps the agent going by trying the next model listed as a backup.
A Pydantic AI agent that hits a model refusal in the middle of a run used to stop. The new 2.65 release treats that refusal as a reason to try the next model on the list. The change sits inside ModelFallback. If the fallback_on rule names ContentFilterError, Pydantic AI catches the refusal and runs the backup model.
The release notes say the change comes from Douwe Maan, the maintainer who writes most of this project's larger features. Pydantic AI also includes the refusal text in ContentFilterError now. A team wiring an alert on refusal content can read it without decoding the response.
ConversationStore keeps a chat on disk
The second feature in the release is ConversationStore. A conversation is kept as a log of messages, stored once. Each save bumps Conversation.revision. Two edits racing to update the same chat will not overwrite each other without noticing. The newer save sees the revision has moved and the application can resolve the conflict. The alternative is a background corruption nobody spots until a user asks why their messages went missing.
Smaller fixes production teams will feel
Several other fixes change how the library behaves in a real deployment. Google's model API now gets a server deadline of at least 20 minutes. Pydantic AI warns when the httpx client is still on its 5-second default read timeout. Temporal, the durable workflow engine many agents run on, no longer retries model errors that cannot succeed on retry. That stops a retry loop from burning tokens on calls the model will never accept.
BrowserUse model calls are now counted against the host run's UsageLimits. A team that caps a run at a dollar amount will see the browser agent's cost in the same budget. On the Anthropic side, a cache='1h' flag on Claude Haiku 5.5 is now forwarded to Bedrock. It used to be snapped down to five minutes. Mid-conversation system prompts are now sent natively on OpenRouter OpenAI routes and on the Claude models that support them.
Smaller API moves
The release also adds a WebSocket transport for the OpenAI Responses API. Z.ai balance and plan-limit 429 errors are now raised as ModelQuotaExceededError. A retry policy no longer treats a hard quota the same as a short rate limit. There is also a prompt cache retention option of twelve hours for the OpenAI Responses API on GPT-5.6 and later.
A team running Pydantic AI in production can get the release from PyPI as pydantic-ai 2.65.0. The migration itself is small. A team that uses ModelFallback should decide whether a model refusal belongs in its fallback list before upgrading.
Source
This item was written by an AI system from the linked source. Reveneau is responsible for what it publishes.
Get AI News in your inbox
New developer tools, model and agent releases, and how teams are actually using them to release software. Short, and only when there is something worth reading.
