Several changes alter runtime behavior: fallback now triggers on exhausted retries, stored response IDs go only to their originating endpoint, and json-repair becomes opt-in. Check them before upgrading.
Key takeaways · AI-distilled
Pydantic AI 2.64.0 adds a ModelFallback capability with a per-attempt prepare_model_request agent hookA script the harness runs automatically at a fixed point in an agent's loop — before a tool call, after an edit, on session start.Full definition → and a sticky option that keeps a conversation on whichever fallback model answered.
SubAgents children that share usage, and DynamicWorkflow sub-agents, now run under the parent run's usage_limits. DynamicWorkflow previously used a 50-request default.
The release adds ArtifactScanner for security scanning of Memory and Skills artifacts, and fixes Claude Haiku 5.5 reading a mid-conversation system entry as tool output by ending tool results before it.
Terms in this piece · Glossary
model routing — Sending each request to a model chosen by the difficulty of the task, rather than using one model for everything.
agent hook — A script the harness runs automatically at a fixed point in an agent's loop — before a tool call, after an edit, on session start.