What's Changed
⚠️ Compatibility Notes
- Fold
RequestInputintoHandleDeferredToolCalls, whose handler can take a resume token by @DouweM in #13285 - Support Gemini 4 Hydrogen (
gemini-4-hydrogen) onGoogleModelby @dsfaccini in #13299 - Generalize response-scoped tool call IDs into the
tool_call_ids_are_response_scopedprofile flag by @DouweM in #13128 - Add
service_tiersupport toGroqModelby @dsfaccini in #13521 - Detect loops in streamed thinking, text and tool call arguments in
DetectLoopsby @mpfaffenberger in #12222 - Make
Advisoracceptnative=andlocal=like the otherNativeOrLocalToolcapabilities, deprecatingmodeby @adtyavrdhn in #13149 - Treat nested CodeMode
ToolFailedcalls as failed results by @pydanty in #13076 - Keep settled sub-agent task histories in their saved files instead of in every
DelegationTasksowner's memory by @DouweM in #13221 - Raise
ModelQuotaExceededErrorfor Anthropic's tier spend cap and user-set spend limits by @dsfaccini in #13269 - Send structured tool return items next to a file to the model as JSON, not as escaped JSON strings by @dsfaccini in #13271
- Raise a gave-up transport status or connection error from Google embeddings, image generation and
GoogleModel.count_tokensasModelAPIErrorby @dsfaccini in #13312 - Raise a Gemini API error from
GoogleImageGenerationModel.generateas its error category, likeModelRateLimitErrorby @dsfaccini in #13335 - Raise an error status a retrying transport gave up on during a streamed Gemini long decode as
ModelHTTPErrorby @dsfaccini in #13356 - Raise a gave-up transport status from OpenAI and Cohere embeddings, OpenAI image generation and
GoogleModelbatch methods asModelHTTPErrorby @dsfaccini in #13327 - Cache opaque Prefect run IDs across retries by @dsfaccini in #11896
- Reject a
TextOutputfunction that takes a model, dataclass orTypedDictwhen the agent is created by @dsfaccini in #13422 - Keep the body of an error status that
HTTPX2TenacityTransportandAsyncHTTPX2TenacityTransportgave up on by @dsfaccini in #13411 - Raise OpenAI API and connection errors from
OpenAIImageGenerationModel.generateas their error category, likeModelRateLimitErrorby @dsfaccini in #13433 - Raise realtime connection errors with an HTTP status as their error category, like
ModelRateLimitErrorby @dsfaccini in #13436 - Keep Bedrock GPT-5.6 and GPT-6 encrypted reasoning out of Claude-on-Bedrock requests by @pydanty in #12943
- Raise
ModelContextWindowExceededErrorfor Mistral3059prompt-too-long errors, not for other3051invalid-argument errors by @pydanty in #12882 - Raise a status a retrying transport gave up on as the error category its body names, like
ModelQuotaExceededErrorby @dsfaccini in #13485 - Stop counting OpenRouter's
is_byokflag as a usage detail by @pydanty in #13025 - Map Gemini
IMAGE_RECITATIONandTOO_MANY_TOOL_CALLSfinish reasons tocontent_filteranderrorby @pydanty in #10918 - Make
TestModelintegers satisfy mixed inclusive and exclusive bounds, and fractional bounds by @pydanty in #13298 - Add
minimax_model_profileand use it for MiniMax models on Bedrock,OpenAICompatibleProvider,LiteLLMProviderandTogetherProviderby @pydanty in #12693 - Map Mistral Large 4
thinkinglevels to itslow/medium/highreasoning_effortvalues by @pydanty in #12876 - Apply
FunctionToolset'sstrict,sequential,defer_loadingandinclude_return_schemadefaults toToolinstances by @pydanty in #12572 - Make
TestModelstreamed usage matchrun()for tool calls and text by @pydanty in #11877 - Run the token count
count_tokens_before_requestasks for in its own durable unit by @dsfaccini in #13460 - Skip a failing
TieredCompactiontier on model errors, and let tiers omit their trigger by @mpfaffenberger in #13660 - Rename harness
subagents,filesystemandspendpackages to their capability names and align store,ACP*and*Errorclass names by @mpfaffenberger in #13401 - Rename the
DockerSandboxharness capability toDockerContainer, keepingDockerSandboxas a deprecated alias by @adtyavrdhn in #13245 - Rename
BubblewrapSandboxtoBubblewrappedWorkspaceand clarify its docs by @mpfaffenberger in #13179
🚀 Features
- Trim
Coder's default instructions and addCoder(autonomy=...)by @mpfaffenberger in #12542 - Fold
RequestInputintoHandleDeferredToolCalls, whose handler can take a resume token by @DouweM in #13285 - Support Gemini 4 Hydrogen (
gemini-4-hydrogen) onGoogleModelby @dsfaccini in #13299 - Add
is_retryto find retries in message history and list the v2.60.0RetryPromptPartchange as breaking by @DouweM in #11404 - Move benchmark-only
Coderinstructions into opt-inBenchmarkInstructionsby @mpfaffenberger in #13395 - Generalize response-scoped tool call IDs into the
tool_call_ids_are_response_scopedprofile flag by @DouweM in #13128 - Add peer messaging with
Peersinpydantic-ai-harnessby @dsfaccini in #11671 - Add an
anthropic_inference_geosetting for Anthropic data residency by @rscholz98 in #12769 - Add opt-in recursive node registration with
GraphBuilder.add_reachable()by @dsfaccini in #12706 - Add
WindowsWorkspace, a PowerShell workspace for Windows hosts by @mpfaffenberger in #13475 - Add
service_tiersupport toGroqModelby @dsfaccini in #13521 - Add
KubernetesSandboxfor kubernetes-sigs/agent-sandbox pods by @adtyavrdhn in #10612 - Add
E2BSandbox(network=), passing E2B's network options through to a new sandbox by @adtyavrdhn in #13587 - Add
BoxdSandbox(secrets=), naming the boxd secrets a new machine gets by @adtyavrdhn in #13589 - Add
pin(source=)so harness compaction re-injects tool- and model-written pins as framed data, not the user's words by @mpfaffenberger in #13615 - Let
Advisor.max_usestake a callable so a consultation budget can span several runs by @mpfaffenberger in #13617 - Add
DynamicWorkflowToolset.create_executorso subclasses can customize how sub-agent calls are scheduled by @mpfaffenberger in #13623 - Detect loops in streamed thinking, text and tool call arguments in
DetectLoopsby @mpfaffenberger in #12222 - Add
openai_safety_identifiermodel setting by @pydanty in #12258 - Add
DaytonaSandbox(secrets=), mounting Daytona secrets in a new sandbox by @adtyavrdhn in #13590 - Add
OpenSandbox(network_policy=)andOpenSandboxBackend(credential_proxy=), passing OpenSandbox's egress options through by @adtyavrdhn in #13591 - Wait a model error's
retry_afterdurably before DBOS retries a model request, via a sharedmodel_error_retry_afterhelper by @DouweM in #13270 - Add
CapabilityCreation.load_active(workspace), which refuses a storedirectorybelow'operator'authority before loading it by @mpfaffenberger in #13641 - Report
pydantic-ai-harnessin MongoDB handshake driver metadata by @pydanty in #13394 - Add
Reminder(skip_unchanged=True)soSystemRemindersstops re-recording an unchanged lasting reminder by @mpfaffenberger in #13618 - Add
ToolBudgetsto answer over-budget and repeated tool calls instead of raising by @mpfaffenberger in #13646 - Add
DynamicWorkflow(call_scheduler=)to decide when sub-agent calls start by @mpfaffenberger in #13668 - Add
pin_accepted_files, capping the authority of accepted instruction files that have changed by @mpfaffenberger in #13677 - Add
SubAgent(keep_partial_output=), passing a sub-agent's last text to the parent when its own timeout or usage budget stops it by @mpfaffenberger in #13696 - Make
Advisoracceptnative=andlocal=like the otherNativeOrLocalToolcapabilities, deprecatingmodeby @adtyavrdhn in #13149 - Add
authorityandpath_authorityto the sandbox andSSHWorkspacecapabilities by @DouweM in #13213 - Render
when_to_usein theSkillscatalog by @mpfaffenberger in #13619
🐛 Bug Fixes
- Keep
SmolSandboxcommands'envvariables namedporqfrom being overwritten by the launcher by @adtyavrdhn in #13248 - Treat nested CodeMode
ToolFailedcalls as failed results by @pydanty in #13076 - Keep settled sub-agent task histories in their saved files instead of in every
DelegationTasksowner's memory by @DouweM in #13221 - Run
DynamicWorkflowsub-agents durably: in parallel underAWSLambdaDurability, and one at a time underDBOSDurabilityby @mpfaffenberger in #12710 - Add
CodeMode(os_policy=...)to set the sandbox clock and time zone by @mpfaffenberger in #13277 - Preserve multimodal tool return values in
ToolOutputLimitsby @mpfaffenberger in #13281 - Preserve memory content containing NUL in
SqliteMemoryStoreby @mpfaffenberger in #13278 - Keep non-object tool arguments invalid in
BaseToolCallPart.args_as_dictunderpython -Oby @dsfaccini in #13268 - Keep
ConversationStore.savefrom re-storing a serialized output tool conversation as a new branch every turn by @dsfaccini in #13272 - Raise
ModelQuotaExceededErrorfor Anthropic's tier spend cap and user-set spend limits by @dsfaccini in #13269 - Keep
OpenAIResponsesModelruns from failing on aweb_search_callwithoutaction, and read the reported web search count on neweropenaiSDKs by @dsfaccini in #13304 - Send structured tool return items next to a file to the model as JSON, not as escaped JSON strings by @dsfaccini in #13271
- Fix
MCPSamplingModelsystem prompt separator and conditional<system>announcement by @pydanty in #12488 - Raise a gave-up transport status or connection error from Google embeddings, image generation and
GoogleModel.count_tokensasModelAPIErrorby @dsfaccini in #13312 - Offer each on-demand capability as a route of its own on a
DecisionModel, and keep the capability catalog out of its question framing by @DouweM in #8759 - Count a nested
FallbackModel's rejected responses when an outer fallback handles the error it raises by @dsfaccini in #13325 - Save keyword-only evaluator arguments by name in
Datasetfiles, and drop the positional spec schema form for keyword-only parameters by @dsfaccini in #13332 - Raise a Gemini API error from
GoogleImageGenerationModel.generateas its error category, likeModelRateLimitErrorby @dsfaccini in #13335 - Keep output functions with a single aliased parameter from raising
KeyError, and pass**kwargsandSkipJsonSchemaargument values through by @dsfaccini in #13323 - Raise an error status a retrying transport gave up on during a streamed Gemini long decode as
ModelHTTPErrorby @dsfaccini in #13356 - Return an empty task list from
GraphRun.next_taskafter a map over an empty list by @adtyavrdhn in #13357 - Spell IPv6 hosts with
-in theMCPcapability's derivedidby @adtyavrdhn in #13358 - Start the
SpritesSandboxcommandtimeoutonce its exec socket is open by @adtyavrdhn in #13360 - Retry
AdvisorandSubAgentschild runs without inheritedcount_tokens_before_requestwhen their model cannot count tokens by @mpfaffenberger in #10139 - Resolve
ctx.tracerfrom the worker agent inside Temporal activities soMemorytools run by @mpfaffenberger in #10199 - Raise
ModelRequestRejectedErrorfor HTTP 413 by @adtyavrdhn in #13366 - Load the
{SetToolMetadata: [...]}and{SetToolMetadata: 'all'}agent spec short forms instead of failing by @dsfaccini in #13380 - Inline
$defsinzai.glm-5.3tool and output schemas on Bedrock by @dsfaccini in #13187 - Raise a gave-up transport status from OpenAI and Cohere embeddings, OpenAI image generation and
GoogleModelbatch methods asModelHTTPErrorby @dsfaccini in #13327 - Drop
register_tag's late-registrationUserWarningby @dsfaccini in #12450 - Drain many delegated children on
DelegationTasksclose without crashing on a cleanup timeout by @mpfaffenberger in #12972 - Cache opaque Prefect run IDs across retries by @dsfaccini in #11896
- Reject a
TextOutputfunction that takes a model, dataclass orTypedDictwhen the agent is created by @dsfaccini in #13422 - Make the
DatasetandAgentSpecJSON schemas match how a single dict- or model-typed spec parameter loads by @dsfaccini in #13423 - Keep the body of an error status that
HTTPX2TenacityTransportandAsyncHTTPX2TenacityTransportgave up on by @dsfaccini in #13411 - Call a
TextOutputfunction by its aliasedstrparameter's Python name next to aSkipJsonSchemaor**kwargsparameter by @dsfaccini in #13350 - Reveal deferred tools that an OpenAI
tool_search_outputreturns wrapped in aNamespaceToolby @dsfaccini in #13473 - Raise OpenAI API and connection errors from
OpenAIImageGenerationModel.generateas their error category, likeModelRateLimitErrorby @dsfaccini in #13433 - Raise realtime connection errors with an HTTP status as their error category, like
ModelRateLimitErrorby @dsfaccini in #13436 - Add GPT-6.1 Terra to the Bedrock Converse profile gate by @pydanty in #12731
- Run durable function tools with aliased parameters instead of failing revalidation with
Field requiredby @dsfaccini in #13434 - Make the
AgentSpecJSON schema accept theNativeToolflat form{NativeTool: {kind: ...}}by @dsfaccini in #13469 - Keep Bedrock GPT-5.6 and GPT-6 encrypted reasoning out of Claude-on-Bedrock requests by @pydanty in #12943
- Send a request-side
CompactionPartfromOpenAIDecisionsModelas framed user text by @dsfaccini in #13478 - Reuse the run's workspace for durable workspace calls made while a run is prepared under
DBOSDurabilityandPrefectDurabilityby @adtyavrdhn in #13466 - Make the
AgentSpecandDatasetJSON schemas reject empty entries and string-keyed short forms that fail to load by @dsfaccini in #13453 - Delete the input file
batch_createuploaded when a retrying transport gives up on the job's 4xx by @dsfaccini in #13479 - Leave capabilities and evaluators that no spec entry can load out of the
AgentSpecandDatasetJSON schemas by @dsfaccini in #13483 - Raise
ModelContextWindowExceededErrorfor Mistral3059prompt-too-long errors, not for other3051invalid-argument errors by @pydanty in #12882 - Don't take text streamed before a tool call as a durable run's final output when
output_typeis structured by @pydanty in #13241 - Raise a status a retrying transport gave up on as the error category its body names, like
ModelQuotaExceededErrorby @dsfaccini in #13485 - Make the
AgentSpecandDatasetJSON schemas accept keyword-only parameters of**kwargstargets only by name by @dsfaccini in #13494 - [cache] Set a 30-minute
default_cache_retentionfor GPT-6 and GPT-6.1 models on Bedrock Converse by @dsfaccini in #13495 - Register
@dataclass(slots=True)native tool subclasses under theirkindby @dsfaccini in #13499 - Require
ipykernel>=6.30.0forpydantic-ai-harness[ipython]on Python 3.15 by @dsfaccini in #13503 - Await any awaitable returned by
Evaluator.evaluateandReportEvaluator.evaluate, not just coroutines by @pydanty in #13441 - Raise
ModelConnectionErrorwhen the connection drops while theopenaiSDK reads a streamed error body by @pydanty in #12333 - Evaluate ISO-8601 duration strings in
MaxDurationandSpanQueryduration bounds by @pydanty in #12780 - Stop
LocalWorkspaceBackend.runraising a barePermissionErrorwhen neither the process group nor the command can be killed by @pydanty in #12651 - Raise
ModelContextWindowExceededErrorwhen Ollama Cloud reportsexceeded max context lengthby @pydanty in #12112 - Map Cohere
TIMEOUTfinish reason toerrorby @pydanty in #11299 - Apply DeepSeek V4 thinking support and Together's forced-tool-choice restriction to V4.1 ids like
deepseek-v4.1-flashanddeepseek-v4p1-flashby @pydanty in #12566 - Stop counting OpenRouter's
is_byokflag as a usage detail by @pydanty in #13025 - Map Gemini
IMAGE_RECITATIONandTOO_MANY_TOOL_CALLSfinish reasons tocontent_filteranderrorby @pydanty in #10918 - Make
TestModelintegers satisfy mixed inclusive and exclusive bounds, and fractional bounds by @pydanty in #13298 - Drop Gemini's interim thought images from non-streaming
GoogleModelresponses by @pydanty in #8644 - [thinking-profiles] Route Kimi model ids through the Moonshot family profile on
FireworksProvider,VercelProvider,OllamaProviderandCerebrasProviderby @pydanty in #12383 - Fix
TestModeltool-args generation for schemas with list-formtypeby @pydanty in #13097 - Add
minimax_model_profileand use it for MiniMax models on Bedrock,OpenAICompatibleProvider,LiteLLMProviderandTogetherProviderby @pydanty in #12693 - Skip an empty
ThinkingPartinstead of sending bare think tags when replaying assistant history to OpenAI and Bedrock by @pydanty in #13396 - Map Mistral Large 4
thinkinglevels to itslow/medium/highreasoning_effortvalues by @pydanty in #12876 - Send Ollama
max_tokenssetting asmax_tokens, notmax_completion_tokensby @pydanty in #12552 - Apply
FunctionToolset'sstrict,sequential,defer_loadingandinclude_return_schemadefaults toToolinstances by @pydanty in #12572 - Accept a UTF-8 byte order mark in
Dataset.from_fileandAgentSpec.from_fileby @pydanty in #8317 - Make
NativeToolspecs and request telemetry use native tool types defined after import by @dsfaccini in #13559 - Make
TestModelstreamed usage matchrun()for tool calls and text by @pydanty in #11877 - Run the token count
count_tokens_before_requestasks for in its own durable unit by @dsfaccini in #13460 - Pair replayed tool-search calls and results where the API rejects unpaired ones, with
ModelProfile.rejects_unpaired_tool_callsby @dsfaccini in #13489 - Treat a response that reuses a still-open
tool_call_idas unpaired by @gouyu-hou in #12352 - Refuse a sandboxed tool named after a Python builtin in
IPythonCodeModetoo, not justCodeModeby @gouyu-hou in #12767 - Match
write_memoryold_textcopied from the snapshot against aMEMORY.mdwith\r\nline endings by @mpfaffenberger in #13613 - Keep every change when the model calls several
Planningtools in one response by @mpfaffenberger in #13614 - Keep UI events in a list ToolReturn.metadata when ToolOutputLimits spills by @beriki770-ship-it in #12565
- Skip a failing
TieredCompactiontier on model errors, and let tiers omit their trigger by @mpfaffenberger in #13660 - [thinking-profiles] Support
thinkingon Gemma 4 in the Google model profile by @pydanty in #12135 - Close the
SqlitePlanStoreconnection when its schema setup fails on a locked database by @mpfaffenberger in #13626 - Confine
LocalFileOverflowStorewrites to the store root, as reads already are by @dsfaccini in #13632 - Accept an async
api_keycallable inOpenAIProviderby @pydanty in #7886 - Run
FileSystem'swrite_file,edit_fileandcreate_directoryin the order the model sent them by @mpfaffenberger in #13625 - Skip
CREATE TABLEin the harness Postgres media, memory, planning and step stores when their tables exist by @mpfaffenberger in #13675
📦 Dependencies
- Document how
google-genai2.31.0 and later re-send a failed streamed long-decode continuation request by @pydanty in #13449
New Contributors
- @montybot-pydantic[bot] made their first contribution in #13240
- @beriki770-ship-it made their first contribution in #12565
Full Changelog: v2.68.0...v2.69.0