What's Changed
⚠️ Compatibility Notes
- Raise an error status a retrying transport gave up on as
ModelHTTPError, so fallback moves on by @DouweM in #11934 - Send stored response, item, conversation and container IDs back only to the endpoint that created them, via
Model.accepts_server_stateby @DouweM in #11774 - Make
json-repairan optional dependency, needed only byCoderandRepairToolArgumentsby @mpfaffenberger in #11768 - Turn off strict tool schemas for
Coder's tools by default, withCoder(strict=True)to opt in by @mpfaffenberger in #11743 - Surface every nested
RepoContextinstruction file between a traversed path and the working directory, without repeating the root file by @DouweM in #11687 - Add
output_speech_timestampsto report word timing of realtime speech, on Azure AI Voice Live by @DouweM in #11685 - Make the
ModelFallbackcapability constructible from agent specs by @DouweM in #11679 - Add a
first_event_timeoutmodel setting so a stream that never starts can fall back by @DouweM in #11582 - Dispatch
OnlineEvaluationevaluators once per durable run instead of on every replay by @DouweM in #11577 - Show the harness
Planningplan in the plan tools' results instead of a per-request reminder copy by @DouweM in #11521 - Add agent artifact security scanning for
MemoryandSkillswithArtifactScannerby @mpfaffenberger in #11470 - Fix
AnthropicModel.count_tokensrejecting all-deferred tool requests and undercounting server tools on the Anthropic API by @dsfaccini in #11343 - Accept plain functions as evaluators in
pydantic_evalsby @dmontagu in #10292 - Remove unresolvable
RealtimeEventfrompydantic_ai.agent.__all__by @adtyavrdhn in #10189 - Add
RunContext.load_capabilityto load on-demand capabilities from code by @adtyavrdhn in #10090 - Add a
ModelFallbackcapability, a per-attemptprepare_model_requesthook, andRetryModelRequestby @DouweM in #9348
🚀 Features
- Let
@agent.system_prompt(dynamic=True)append its changes withon_change='append'to keep the cached prompt by @DouweM in #11445 - Pair
DetectLoopstool results with the response that made the calls by @mpfaffenberger in #11551 - Add
BoxdSandbox: a workspace that runsCoder,Shell,FileSystemand every other harness capability in a boxd machine by @MichielMAnalytics in #11367 - Add a
ModelFallbackcapability, a per-attemptprepare_model_requesthook, andRetryModelRequestby @DouweM in #9348 - Add Harness
Reminder(scope='conversation')for reminders that stay in the message history by @DouweM in #11642 - Add
output_speech_timestampsto report word timing of realtime speech, on Azure AI Voice Live by @DouweM in #11685 - Cache the schema of
ModelRequestContextdurable capability operations across agent construction by @DouweM in #11776 - Make the
ModelFallbackcapability constructible from agent specs by @DouweM in #11679 - Report word timestamps of ElevenLabs Agents speech with
output_speech_timestampsby @DouweM in #11784 - Record CI provenance on Pydantic Evals experiment spans with OpenTelemetry
vcs.*andcicd.*attributes by @dmontagu in #10294 - Accept plain functions as evaluators in
pydantic_evalsby @dmontagu in #10292 - Add
logfire.scorer.score_typeandlogfire.scorer.run_idto online evaluation result events by @dmontagu in #10293 - Add the OpenTelemetry
test.suite.nameandtest.case.nameattributes to Pydantic Evals spans by @dmontagu in #11538 - Turn off strict tool schemas for
Coder's tools by default, withCoder(strict=True)to opt in by @mpfaffenberger in #11743 - Make
json-repairan optional dependency, needed only byCoderandRepairToolArgumentsby @mpfaffenberger in #11768 - Teach
Coderto read what the task names, check stated requirements, and delegate only when asked by @mpfaffenberger in #11811 - Let
AskUseranswerers receiveRunContextby @dsfaccini in #11662 - Add agent artifact security scanning for
MemoryandSkillswithArtifactScannerby @mpfaffenberger in #11470 - Add
ModelResponse.model_idrecording the model the agent sent each request to by @DouweM in #11807 - Save function evaluators to
Datasetfiles under the function's name by @dmontagu in #10425 - State how nested instruction files relate in
RepoContextinstructions whennested_traversalis on by @DouweM in #11698 - Add a
first_event_timeoutmodel setting so a stream that never starts can fall back by @DouweM in #11582 - Add
stickytoModelFallbackto keep a conversation on the fallback model that answered by @DouweM in #11330 - Add
RunContext.load_capabilityto load on-demand capabilities from code by @adtyavrdhn in #10090
🐛 Bug Fixes
- Preserve nested
SpanTreeattributes during JSON round-trips and mark omitted Google embedding and ElevenLabs usage as unmeasured to avoid false zero automatic costs by @dsfaccini in #11912 - Fall back from Native Output on Bedrock when the installed
botocorepredatesoutputConfigby @DouweM in #11694 - Close the
IPythonKernelclient's zmq context on shutdown with jupyter-client before 8.7 by @DouweM in #11716 - Deliver queued realtime messages after a mid-reply reconnect on OpenAI, Azure and xAI by @DouweM in #11678
- Keep the Gemini Live event stream alive when a resumed session lost a tool call without an id by @DouweM in #11680
- Search a mixed
CodeModeTool Search corpus withsearch_tools, so a native deferred tool no longer declares the sandboxed ones by @DouweM in #11638 - Release a closed realtime session's run state by reference counting by @TejasS1233 in #11240
- Show the harness
Planningplan in the plan tools' results instead of a per-request reminder copy by @DouweM in #11521 - Dispatch
OnlineEvaluationevaluators once per durable run instead of on every replay by @DouweM in #11577 - Fix
AnthropicModel.count_tokensrejecting all-deferred tool requests and undercounting server tools on the Anthropic API by @dsfaccini in #11343 - Stop advertising
CodeExecutionToolon the BedrockAnthropicModelclients by @DouweM in #11790 - Turn on the unified
cachesetting for GPT-5.6 and later with the Azure OpenAI v1 API by @DouweM in #11749 - Keep the usage and response ID a primed stream received when the consumer leaves it without iterating by @DouweM in #11783
- Keep
Shell's job files in a private temp directory when the workspace isn't writable by @mpfaffenberger in #11809 - Inline
$refs underpropertyNamesandcontainsfor OpenRouter Google models and customprefer_inlined_defstransformers by @jukebox in #10859 - Strip regex patterns Bedrock rejects from strict JSON schemas in
BedrockJsonSchemaTransformerby @adtyavrdhn in #11831 - Remove unresolvable
RealtimeEventfrompydantic_ai.agent.__all__by @adtyavrdhn in #10189 - Keep finished
BackgroundToolsresults in the history when a run pauses for deferred tools by @wangrat in #11752 - Let
FileSystemedit_fileedit non-UTF-8 text files thatread_filereads, honoringexpected_hashby @mpfaffenberger in #11851 - Make
SubAgentschildren that share usage run under the parent'susage_limitsby @mpfaffenberger in #11853 - Publish
AgentSpecschema fields forAdvisor,SummarizingCompaction,ManagedPromptandPyaiDocsby @mpfaffenberger in #11857 - Let an
asyncpgpool type-check asPostgresMemoryStore'sPostgresPoolby @mpfaffenberger in #11856 - Let capability specs set the
AbstractCapabilitybase fieldsid,descriptionanddefer_loadingby @mpfaffenberger in #11858 - Publish
AgentSpecschema fields forCodeMode,ModalSandbox, andSkillsby @mpfaffenberger in #11859 - Fix
SubAgentsunder Temporal for a named agent with its own model andselfwith a model menu by @mpfaffenberger in #11862 - Fix capability events emitted from tools under
prefix_tools()by @mpfaffenberger in #11863 - Make V1-style
result.usage()warn instead of raisingTypeErrorby @DouweM in #11884 - Accept list-typed
contentfrom OpenAI-compatible Chat Completions servers by @DouweM in #11885 - Don't show the first-run banner for runs an installed package starts by @DouweM in #11893
- Stop waiting for a stalled
BedrockConverseModelcall or stream read when its request is cancelled or times out by @DouweM in #11850 - Mark request-scoped
SystemPromptPartsvisible: falsein OTel spans of requests the model no longer sees them on by @DouweM in #11772 - Send stored response, item, conversation and container IDs back only to the endpoint that created them, via
Model.accepts_server_stateby @DouweM in #11774 - End tool results before a mid-conversation
systementry on Claude Haiku 5.5, so it doesn't read the entry as tool output by @DouweM in #11785 - Carry
ModelResponse.canonical_systemthrough Vercel AI and AG-UI message round-trips by @DouweM in #11794 - Judge each attempt's model in
FileUnderstanding, and letprepare_model_requestpersist history changes by @DouweM in #11802 - Report no audio input for OpenAI's non-audio models and no video input on Bedrock outside Nova by @DouweM in #11812
- Label
RepoContextinstruction files above the working directory as../AGENTS.mdinstead of by absolute path by @DouweM in #11689 - Let
on_run_error, shielded capability cleanup and the model stream close run when ananyioscope cancels a run by @dsfaccini in #10479 - Honor compatible compactions in Responses continuation by @dsfaccini in #11861
- Run
DynamicWorkflowsub-agents under the parent run'susage_limitsinstead of the 50-request default by @mpfaffenberger in #11962 - Fix
web_fetchleakingscript/stylesource into markdown content by @pydanty[bot] in #8329 - Keep
StepPersistencefailure records when ananyioscope cancels a run by @dsfaccini in #11993 - Ignore
max_retriesin OpenAI, Anthropic and Gemini batch requests instead of raisingUserErrorby @DouweM in #11931 - Raise an error status a retrying transport gave up on as
ModelHTTPError, so fallback moves on by @DouweM in #11934 - Surface every nested
RepoContextinstruction file between a traversed path and the working directory, without repeating the root file by @DouweM in #11687
📦 Dependencies
- Bump joserfc from 1.7.1 to 1.7.6 by @dependabot[bot] in #12014
New Contributors
- @TejasS1233 made their first contribution in #11240
- @MichielMAnalytics made their first contribution in #11367
- @wangrat made their first contribution in #11752
Full Changelog: v2.63.0...v2.64.0