What's Changed
⚠️ Compatibility Notes
- Attach a workspace a capability function supplies before
for_run, sofor_runcan readctx.workspaceby @DouweM in #10528- A
for_runnow sees a workspace a capability function supplies, where it used to see an unattached placeholder. When nothing else supplies the workspace, the run now calls its capability functions before the other capabilities'for_runinstead of alongside them, and under durable execution a capability whosefor_runreadsctx.workspaceonly when it's.attached, next to such a function, now adds steps to the history of a run already in flight. Inpax, a plugin that wraps its workspace factory in another capability, such asBubblewrappedWorkspace(DynamicCapability(...)), and returns a sandbox now fails the run instead of running in the sandbox: return the workspace capability from the capability function directly, or supply it up front.
- A
- Configure
paxinput bindings, queue delivery, and non-modal questions by @dsfaccini in #13162- Pax's
USER_ONLY_SETTINGSgains the five newinput.*settings, so a comparison of it to a fixed set sees five more values.LivePrompt.keysnow passesPromptKeysa new optionalunknowncallback. With noinput.*setting changed, the keys, busy delivery, the question and approval picker and the composer frame stay as before. Two things do change: a queued prompt held for editing is left out of the footer's queued count, and the launch hints also name/input.
- Pax's
- Route agent-graph waits through
BaseDurabilityCapability.durable_sleep, making them durable on AWS Lambda, Absurd and pgtask by @DouweM in #13274- On AWS Lambda, Absurd and pgtask, a run that waits between polls of a background response or a
BatchModelRequestsbatch now suspends the execution for each wait, and the engine runs it again, instead of sleeping in the process. Let AWS Lambda executions that are waiting on a background response or batch finish before you deploy the upgrade: replayed mid-poll, they fail as a non-deterministic replay. Absurd and pgtask tasks recorded before the upgrade still replay, but they wait once more through each wait they had already done.
- On AWS Lambda, Absurd and pgtask, a run that waits between polls of a background response or a
- Fail a
CodeModerun when a DBOS replay diverges insiderun_code, and drop the elapsed-time limit under every durable engine by @adtyavrdhn in #13527- Under
DBOSDurabilityandAWSLambdaDurability, a replay that diverges insideCodeMode'srun_codenow fails the run instead of returning a result built from another step's checkpoint. Deploy changed agent code as a new DBOS application version or Lambda published version, as the engine docs already require.CodeMode'smax_duration_secondsresource limit is now off under every durable engine, not only Temporal, even when set explicitly: move time-bounded work into a tool, or use a remote pool'srequest_timeoutas the wall-clock bound.
- Under
- Make
WrapUpAtLimitswrap up atcost_limitand before the run'stimeout=, keeping output tools on the final request by @mpfaffenberger in #14164WrapUpAtLimitswith acost_limitor a runtimeout=now returns a wrapped-up answer instead of raisingUsageLimitExceededorRunTimedOutonce the next step is projected not to fit. PassWrapUpAtLimits(timeout_margin=None)to keep raisingRunTimedOutat the deadline.LimitNamegains'cost_limit'and'timeout', so an exhaustive match on it has to handle the two new values, andDEFAULT_WRAP_UP_PROMPTis reworded.
- Rename
CurrentTimetoAnnounceCurrentTime, keepingCurrentTimeas a deprecated alias by @DouweM in #14447- The harness capability
CurrentTimeis renamedAnnounceCurrentTime, andpydantic_ai_harness.current_timemoves topydantic_ai_harness.announce_current_time. The old name, the old module and aCurrentTimespec block still work, with aHarnessDeprecationWarning. The options and the defaultiddon't change.CurrentTimeis now a subclass ofAnnounceCurrentTime, soisinstance(AnnounceCurrentTime(), CurrentTime)isFalse.
- The harness capability
- Refuse realtime sessions in durable workflow code, and document the supported recipe by @DouweM in #14526
- With a durability capability such as
TemporalDurability,DBOSDurability,PrefectDurabilityor a Harness engine's, on the agent or passed for one call, an agent's realtime session,answer_webrtc_offer(),create_client_secret()andhang_up()now raiseUserErrorin the code the engine replays (a workflow, flow or orchestration, an AWS Lambda durable handler, or an Absurd or pgtask task). They used to run there unrecorded. Open the session outside the workflow, or start durable work from a tool, as the realtime deployment docs' "Durable execution" section shows; inside a durable activity, step or task they still run, andDBOSAgentandPrefectAgentnow allow them there too, which they used to refuse.
- With a durability capability such as
- Run a trailing positional prompt in
pax, read it from stdin with-, and print non-string output as JSON with--output-formatby @DouweM in #14702- In a one-shot
pax -prun, an agent output that isn't astrnow prints as JSON (pydantic_core.to_json) instead ofstr(). An example is an agent loaded with-athat setsoutput_type=City. A script that read the oldstr()text needs to parse JSON. Astroutput prints as before.
- In a one-shot
- Mark output tool call and return parts with
tool_kind='output'and addis_output_tool_part()by @DouweM in #14707- An output tool's
ToolCallPart, and the return parts answering it, now carrytool_kind='output', so a test that compares them with==or a snapshot needs the field added. The Vercel AI adapter addsproviderMetadata: {'pydantic_ai': {'tool_kind': 'output'}}to output tool chunks and dumpedUIMessageparts, and the AG-UI adapter puts the marker in theencrypted_valueof output tool calls and results, so frontends that snapshot or strictly validate these events see it. A Prefect flow retried across the upgrade re-runs, once, the model-request and tool tasks whose history holds output tool parts, because their cache keys change.
- An output tool's
- Retry a
FallbackModelon Temporal unless every model failed with a non-retryable error by @DouweM in #14770- On Temporal,
FallbackExceptionGroupis no longer non-retryable, as the v2.77.0 Temporal docs listed it. AFallbackModelwhose models all failed with retryable errors (rate limits, outages, dropped connections), or whosefallback_onresponse handler rejected every response, now has its model request activity retried by the activity's retry policy instead of failing at once, and under the default unlimited policy it retries until a model answers or the activity times out, as a single model already did; a chain whose models all failed with non-retryable errors (authentication, quota, context window, aUserError) still fails on its first attempt. To keep failing at once, add'FallbackExceptionGroup'to the retry policy'snon_retryable_error_types, or setmaximum_attempts.
- On Temporal,
- [mcp-context] Stop MCP sampling on a kept-alive stdio connection from hanging on the agent's own concurrency limiter by @pydanty in #14914
- In a plain
agent.run()on a kept-alive stdioMCPToolsetwith a legacy session (FastMCP 3, or FastMCP 4 withClient(mode='legacy')), a samplingConcurrencyLimitedModelthat shares the agent'sConcurrencyLimiteris refused withUserErroragain, as on v2.76.0, and the agent gets that as the tool's error. This includes a limiter with spare capacity, whose runs completed on v2.77.0. Give the sampling model its ownConcurrencyLimiter.
- In a plain
- Record
ToolReturn.contentas returned so durable runs reject non-UserContentitems like plain runs by @DouweM in #14921- A durable run whose tool returns
ToolReturn.contentitems that aren'tUserContent, such as an{'kind': 'image-url', 'url': ...}dict, now raises the sameValueErroras a plain run, after the tool-execution hooks, instead of continuing with the dict rebuilt as anImageUrl,DocumentUrlorUploadedFile. On Temporal, an uncaught one fails the workflow task, which Temporal retries until a fix is deployed; returnUserContentitems, or replace them in anafter_tool_executehook. On Absurd, a tool call with such content isn't checkpointed and runs again when the task replays, and on every engine a worker on v2.77.0 or earlier can't resume a run that recorded such content, so let runs whose hooks repair it finish before you roll back or run mixed versions.
- A durable run whose tool returns
- Fall back past a model whose profile can't serve the request, with a new
ModelFeatureUnsupportedErrorby @DouweM in #14983- A request that a model's profile can't serve (Native, Tool, text or image output, or a forced
tool_choice) now raisesModelFeatureUnsupportedError, aUserErrorthat is also aModelRequestRejectedError.except ModelAPIErrorandexcept AgentRunErrorhandlers, customfallback_onandretry_onpredicates, andon_model_request_errorhooks now see it, so checkisinstance(e, ModelFeatureUnsupportedError)first to keep treating it as a configuration error.FallbackModelandModelFallbacknow move on to the next model instead of raising, and when every model is incapable they raise aFallbackExceptionGroup, which a plainexcept UserErrordoesn't catch: to keep raising on the first incapable model, leave the error out offallback_on, as inFallbackModel(..., fallback_on=lambda e: isinstance(e, ModelAPIError) and not isinstance(e, ModelFeatureUnsupportedError)), and give a Temporal workflow in flight across the upgrade worker versioning or a patch if its own code caught thatUserErroraroundagent.runand kept issuing commands.
- A request that a model's profile can't serve (Native, Tool, text or image output, or a forced
- Accumulate streamed OpenAI text in linear time, and stop padding
raw_contentup tocontent_indexby @dsfaccini in #15077- With
OpenAIResponsesModelstreaming raw reasoning (response.reasoning_text.delta, which gpt-oss models and DeepSeek send),ThinkingPart.provider_details['raw_content']now has one entry percontent_index, in the order the indices first arrive. A gap no longer pads the list with'', and a negative index gets its own entry instead of counting from the end of the list or raisingIndexError. Code that reads an entry at itscontent_indexposition can get a different entry from a stream that sends its indices out of order, and the next request sends the entries back in that order, so use a non-streaming request to get them incontent_indexorder; streams that send their indices in order are unchanged.
- With
- Let Pax use a System One decision model for
smart_search, relevance compaction, and asystem_onetool by @mpfaffenberger in #15123- Pax's
DEFAULT_PLUGINSgains the built-insystem_onedeclaration, so existing installs list a new enabledsystem_onerow in/plugins. It adds nothing untilrun.decision_modelis set, and/plugins disable system_oneturns it off.
- Pax's
- Add
ModelResponseRejectedEventto set a rejected streamed response apart from the retry, in the event stream and the Vercel AI and AG-UI adapters by @dsfaccini in #15126AgentStreamEventandHandleResponseEventgainModelResponseRejectedEvent, so an exhaustive match over them stops type-checking. A run that rejects a streamed response now emits the event, plus adata-model-response-rejectedpart in its own step through the Vercel AI adapter, or aCUSTOMevent and a new assistant message for the retry through AG-UI; on a streamed request with anafter_model_requesthook, the hook runs and the response's usage is counted when the model stream ends, not when the consumer leaves it. Durable runs with anevent_stream_handlerneed no upgrade step on Temporal, DBOS or Prefect, but on AWS Lambda, Azure Durable Task, Absurd and pgtask, let in-flight runs finish before upgrading (the Absurd and pgtask READMEs don't say so yet): a Lambda or Azure replay that meets a rejection breaks on the new handler step, and an Absurd or pgtask replay skips the rejection event and delivers one event twice.
- Stream
MistralModelcontent as text, not as an output tool call, when text output is allowed by @dsfaccini in #15129- With
MistralModel, consider a streamed run whose output type allows text alongside output tools (output_type=[str, M]), or arequest_streamcall with output tools andallow_text_output=True. When the model writes an output tool's JSON as content, it now returns that content as text instead ofM, asagent.runandrequest()already did. Use a structured-only output type (M,ToolOutput(M)orNativeOutput(M)) when the output must beM, or parse the text withM.model_validate_json(output).
- With
- Report Pax to herdr as
pax, and let a distribution of Pax report its own name by @mpfaffenberger in #15136- Pax's herdr plugin now reports
agentandsourceaspaxinstead ofclai2, also when Pax runs as the deprecatedclai2command. Herdr's sidebar andherdr agent listnow show Pax panes aspax, so herdr scripts that matchclai2inherdr agent listorpane.getoutput need to matchpax. For sidebar rows, use[ui.sidebar.agents] rows. Therows_by_agent.clai2key the docs used to suggest makes herdr reject the whole config file.
- Pax's herdr plugin now reports
- Stream
MistralModelcontent as text, not as an output tool call, when text output is not allowed by @dsfaccini in #15188- With
MistralModel, a streamed run whose output type doesn't allow text (output_type=MorToolOutput(M)), or arequest_streamcall with output tools andallow_text_output=False, now streams content the model writes, instead of calling the output tool, as aTextPart, asagent.runandrequest()already did. When that content isM's JSON,output_type=Mstill returnsM, but parsed once the response ends and with no partial outputs, whileToolOutput(M)asks the model to call the tool and retries. For structured output that the model writes as content, useNativeOutput(M)orPromptedOutput(M); output tool calls the model makes natively stream as before.
- With
- Re-send a nested instruction file that changed since
RepoContextsurfaced it by @dsfaccini in #15190- When a nested instruction file changes after a note in the conversation inlined it,
RepoContext's nested traversal now sends it again as a newContextFilePartat the message tail. To compare the two, a run's first traversal of such a directory makes the workspace calls a first surface makes. A Temporal or DBOS run that traversed an already-surfaced directory before the upgrade makes more workspace calls on replay than it recorded, so let such runs finish, or version the deployment, before upgrading.
- When a nested instruction file changes after a note in the conversation inlined it,
- Install the published gh-aw engine's runtime from hash-locked, exact versions by @dsfaccini in #15200
- A gh-aw workflow that imports the engine definition from
mainnow installs the exact hash-locked versions insrc/pydantic_ai_harness/gh-aw/requirements.txton its next recompile, wheels only. Before, it installed the newest versions that met the floors. A package that the workflow'ssteps:installs andrequirements.txtalso pins ends at the pinned version. To keep another version of a pinned package, install it in the workflow'spre-agent-steps:, which run after the engine's install. A workflow's ownengine: version:that differs from the definition's still installs by name, with a warning.
- A gh-aw workflow that imports the engine definition from
- Run a union output function whose argument is
Optional[...],X | Noneor a type alias, instead of raisingTypeErroror returning the argument by @dsfaccini in #15204- With
NativeOutput([...])orPromptedOutput([...]), an output function whose argument isOptional[X],X | Noneor a type alias now runs when the model picks it. It used to be skipped, so the raw argument became the output, or to raiseTypeError, and code that read that raw argument now gets the function's return value. A value thatbefore_output_processoron_output_validate_errorreturns now goes to such a function, or to a type alias listed directly as a union member, when that's the first member in union order whose type the value matches, instead of going to a later member or becoming the output as is.
- With
- Return an inline user image from
AGUIAdapter.load_messagesasBinaryImage, not plainBinaryContentby @dsfaccini in #15329AGUIAdapter.load_messagesnow returns an inline user image asBinaryImageinstead of plainBinaryContent, asModelMessagesTypeAdapterandVercelAIAdapteralready do. This covers images from a data source and from a retiredbinarypart'sdata. The loaded image no longer compares equal to a plain imageBinaryContent, andtype(item) is BinaryContentisFalse. Check it withisinstance(item, BinaryContent)oritem.is_image, and build expected images asBinaryImagewhen you compare reloaded history. Model requests don't change.
- Raise failed AWS credential refreshes as
ModelConnectionErroron Bedrock, soFallbackModelfalls back by @pydanty in #15409- On
BedrockConverseModelandBedrockEmbeddingModel, a failed AWS credential refresh now raisesModelConnectionError, with botocore's error as its__cause__. This coversCredentialRetrievalErrorandMetadataRetrievalError, such as an ECS or EC2 metadata endpoint that doesn't answer. Anexcept,fallback_on=,retry_on=or Temporalnon_retryable_error_typesthat names those classes orBotoCoreErrorno longer matches; nameModelConnectionErrorinstead.FallbackModelnow falls back andRetryOnModelErrorsretries. A Temporal agent with aFallbackModelfalls back at once instead of Temporal retrying the request, and a Temporal agent that listsModelAPIErroras non-retryable no longer retries the failure.
- On
- Send gpt-oss's mid-conversation system prompts as
<system>blocks on every host by @DouweM in #15427- gpt-oss providers that used to send a mid-conversation
SystemPromptPartas asystemmessage now send it as a<system>block in a user turn. These includeCrusoeProvider,CerebrasProvider,TogetherProvider,AzureProvider,VLLMProvider,OllamaProvider, andOpenAIProviderwith abase_urlthat serves gpt-oss. The system prompt also gets the framing announcement from the first request, so a conversation already in progress misses the prompt cache once. To keep the native role, passprofile={'supports_inline_system_prompts': True}to the model.
- gpt-oss providers that used to send a mid-conversation
- Refuse
get_output()andstream_output()afterStreamedRunResult.cancel()by @DouweM in #15545- After
StreamedRunResult.cancel(),get_output()andstream_output()now raise the sameUserErrorasresult, instead of returning an output validated from the interrupted response. Astream_output()loop still running whencancel()is called raises at its next step. Read what was received fromresponseorall_messages()instead. Callingcancel()on a response the provider had already finished no longer marks the run complete at that point. The response is recorded,resultbecomes available andafter_runruns once the stream is consumed, for example withget_output().
- After
- Run a Temporal wait's
askon the worker's copy ofHandleDeferredToolCallsandAskUser, not the sandbox's by @DouweM in #15567- Rolling deploys on Temporal: new runs schedule an activity type that workers on v2.77.0 or earlier don't register. Upgrade every worker on the task queue before new runs start, as the Temporal docs say.
- Send
reasoning_effortforthinkingonmistral:mistral-large-latest, which is now Mistral Large 4 by @dsfaccini in #15648- A run on
mistral-large-latestthat setsthinkingnow sendsreasoning_effort('low','medium'or'high'), which it used to drop.thinking=Falsesends'low'. On a private deployment whosemistral-large-lateststill points at a model without reasoning, such asmistral-large-2512, that request now fails with a 400. Removethinkingthere, since it had no effect.
- A run on
- Stop type names from one
get_conflicting_type_namescall leaking intoFunctionSignaturerenders with another set by @dsfaccini in #15654- From v2.67.0,
render,render_definitionandrender_type_definitionsreused the names from the lastFunctionSignature.get_conflicting_type_namescall even when given another set. That set could be hand-built, come from another call, or be derived from the returned one, such asnames | otherorfrozenset(names). Those renders now get the v2.66 names back: a type whose name is in the set is prefixed with the name of the function rendered. To keep a call's names, pass the set thatget_conflicting_type_namesreturned itself.
- From v2.67.0,
- Include a
SpeechParttranscript in the plain-text output ofrun_stream()by @dsfaccini in #15656- When a model emits text and speech in one response,
run_stream()with plain-text output now includes theSpeechParttranscript in the text fromget_output()andstream_output(), asrun()does. An output validator or output hook now sees the joined text, andrun_stream()raisesUnexpectedModelBehaviorwhen the validator or hook rejects it. Change the validator or hook to accept the transcript.stream_text()still leaves the transcript out, and so does output that a schema or aTextOutputfunction parses.
- When a model emits text and speech in one response,
- Fix
MistralModelgaps:thinkingon DeepSeek V4.1 Flash and GLM-5.3, strict tools,extra_headers, client timeouts, usage details and error mapping by @dsfaccini in #15691-
Three request changes on
MistralModel:thinkingondeepseek-v4-1-flash-1017and the GLM-5.3 IDs (zai-glm-5-3,zai-glm-5-3-flash,zai-glm-5,zai-glm-latest,glm-5-latest) now sendsreasoning_effortinstead of being dropped.extra_headersis now sent instead of being dropped with a warning.- A tool or
ToolOutputwithstrict=Truenow sendsfunction.strict, which Mistral enforces, on models whose profile has no JSON schema transformer.
To keep the earlier request, leave
thinkingunset, or remove the header or thestrict=True. -
Three behavior changes:
- A stream that ends before its terminal chunk has
state='incomplete'instead of'complete'. - An error from a legacy
httpx.AsyncClientraises a model error, such asModelConnectionError, instead of the rawhttpxerror, so catchModelAPIError. - The client
MistralProvidercreates now times out at its documented 600 s instead of the SDK's 300 s. A customhttp_clientwith its own timeout now times out at that value. Set thetimeoutmodel setting to choose a timeout per request.
- A stream that ends before its terminal chunk has
-
MistralReasoningEffortgains'minimal'and'xhigh', so an exhaustivematchon it stops type-checking. -
MistralModel(json_mode_schema_prompt=...),SIMPLE_JSON_TYPE_MAPPINGandVALID_JSON_TYPE_MAPPINGnow warn withPydanticAIDeprecationWarning. UsePromptedOutput(template=...)or the profile'sprompted_output_templateinstead.
-
- Support
tool_choice='required'and forced output tools for GPT-5.6 Sol, GPT-6 Sol and Astra, and GPT-6.1 Sol and Terra onBedrockConverseModelby @dsfaccini in #15800- On
BedrockConverseModel, requests with tools to GPT-5.6 Sol, GPT-6 Sol and Astra, and GPT-6.1 Sol and Terra now carry atoolChoice. A run with an output tool sends{'any': {}}, and function tools in a run that can end with text send{'auto': {}}.tool_choice='required'and a single forced tool are now sent instead of raisingUserError. To keep the previous requests, passprofile={'bedrock_supports_tool_choice': False}toBedrockConverseModel.
- On
- End a UI stream with the protocol error event when the
on_cancelcallback raises by @dsfaccini in #15806- When a UI adapter's
on_cancelcallback raises, the stream now ends with the protocol's error event, such as AG-UI'sRUN_ERRORor Vercel AI'serrorchunk, as anon_completefailure already does. Before, the exception propagated fromrun_stream(),dispatch_request()ortransform_stream(). To keep the exception propagating, overrideon_errorin a subclass of the adapter's event stream and re-raise it.
- When a UI adapter's
- End an AG-UI stream at the
RUN_ERRORthaton_completeyields, and closeon_completeandon_cancelgenerators when the stream is closed by @dsfaccini in #15819- On AG-UI,
RUN_FINISHEDno longer follows aRUN_ERRORthaton_completeyields on a successful run. Callingaclose()on a UI adapter's event stream, such as the oneAGUIAdapter.run_stream()returns, while anon_completeoron_cancelgenerator is suspended now runs that callback'sfinallybeforeaclose()returns, and raises any exception the cleanup raises. Before, the cleanup ran later in another task and its exception went to the event loop's exception handler. To keepaclose()from raising, catch and log errors in the callback'sfinally.
- On AG-UI,
- Fail an
AGUIAdapterresume that gives oneinterruptIdtwo different answers, instead of applying the last by @dsfaccini in #15820- An AG-UI
resumethat lists oneinterruptIdmore than once with different answers now ends the run with aRUN_ERROR, and no tool runs. Before, the last entry's answer was applied.AGUIAdapter.deferred_tool_resultsraisesUserErrorfor such input. Send oneResumeEntryper interrupt with the user's final answer; repeating an identical entry still works.
- An AG-UI
- Run a
SubAgentsdelegation toselfoutside the durable unit on every durable engine by @DouweM in #15831- On Prefect and Render Workflows, a
SubAgentsrun that delegates only toselfand is in flight during the upgrade can't reuse its recordeddelegate_taskresult. If the child's tools aren't idempotent, let such runs finish before upgrading.
- On Prefect and Render Workflows, a
🚀 Features
- Support
WebSearchandWebFetchwith DeepSeek Flash through a newDeepSeekResponsesModelby @dsfaccini in #14962 - Record
Permissionsallow/ask/deny decisions as span attributes, so a denied call is distinguishable in a trace by @mpfaffenberger in #14986 - Add
WorkLogandResetCompaction, which clear the context and point the model at a searchable log of its earlier work by @dsfaccini in #14957 - Make
WrapUpAtLimitswrap up atcost_limitand before the run'stimeout=, keeping output tools on the final request by @mpfaffenberger in #14164 - Add
ModelResponseRejectedEventto set a rejected streamed response apart from the retry, in the event stream and the Vercel AI and AG-UI adapters by @dsfaccini in #15126 - Re-send a nested instruction file that changed since
RepoContextsurfaced it by @dsfaccini in #15190 - Let
DynamicWorkflowrun scripts on remote Monty workers withmonty_sandboxby @adtyavrdhn in #14941 - Fall back past a model whose profile can't serve the request, with a new
ModelFeatureUnsupportedErrorby @DouweM in #14983 - Mark output tool call and return parts with
tool_kind='output'and addis_output_tool_part()by @DouweM in #14707 - Route agent-graph waits through
BaseDurabilityCapability.durable_sleep, making them durable on AWS Lambda, Absurd and pgtask by @DouweM in #13274 - Send MP3 and MP4 tool results to
gemini-4-neoninside itsGoogleInteractionsModelfunction_resultby @DouweM in #15065 - Add a
StructuredJudgeevaluator that asks a judge typed questions and reports each answer, several in one request by @DouweM in #8529 - Record when the model was asked and how long it took as
ModelResponse.request_timestampandModelResponse.durationby @DouweM in #15345 - Advertise models, embedded context, and coding tool cards in
pax acpby @mpfaffenberger in #15739 - Support
WebSearchandWebFetchwith DeepSeek Flash on Chat Completions through a newDeepSeekChatModelby @dsfaccini in #15664 - Add Amazon Ergo 1.0 support on Bedrock Converse by @dsfaccini in #15757
- Add Cloudflare Workers AI support by @dsfaccini in #10557
- Let
PostgresConversationStorerun on a caller'sconnection=, so a save joins the application's transaction by @dsfaccini in #15814 - Add
HatchetDurability, a Hatchet durable execution backend by @DouweM in #15743 - Run a Temporal wait's
askon the worker's copy ofHandleDeferredToolCallsandAskUser, not the sandbox's by @DouweM in #15567 - Send OpenAI web search results back on later requests with
openai_include_web_search_resultsby @dsfaccini in #15773 - Collapse context-gathering tool calls in Pax and drop the empty
run_codeheader by @mpfaffenberger in #15305 - Show
AGENTS.md updatedin the Pax status row after an instruction file reloads, and the appended text in/system_promptby @dsfaccini in #15191 - Add
pax acpto serve Pax's stock agent over the Agent Client Protocol by @mpfaffenberger in #15139 - Let Pax set a per-model context window in
/model settingsand default it from vLLM'smax_model_lenby @mpfaffenberger in #15134 - Let Pax use a System One decision model for
smart_search, relevance compaction, and asystem_onetool by @mpfaffenberger in #15123 - Add
/auto-compactandthreshold_tokensto set when Pax compacts automatically by @adtyavrdhn in #14929 - Run a trailing positional prompt in
pax, read it from stdin with-, and print non-string output as JSON with--output-formatby @DouweM in #14702 - Configure
paxinput bindings, queue delivery, and non-modal questions by @dsfaccini in #13162
🐛 Bug Fixes
- Raise
GraphBuildingErrorinstead ofAssertionErroror a hang whenGraphBuilder.build(validate_graph_structure=False)meets a join that no start node reaches by @dsfaccini in #15073 - [mcp-context] Stop MCP sampling on a kept-alive stdio connection from hanging on the agent's own concurrency limiter by @pydanty in #14914
- Accumulate streamed OpenAI text in linear time, and stop padding
raw_contentup tocontent_indexby @dsfaccini in #15077 - Run a union output function whose argument is a
TypedDictorNewTypeinstead of returning the argument by @pydanty in #14931 - Stop
graph.iter()waiting forever whenoverride_next([])drops a join's task while an outer join is open by @dsfaccini in #15117 - Keep
run_idandconversation_idstable when a durable run re-enters on Absurd, pgtask, AWS Lambda and Render by @mpfaffenberger in #14642 - Stop
CancelledErrorescapingasync with graph.iter()when the run ends while other tasks still run by @dsfaccini in #15074 - Raise a
RuntimeErrorthat names the map when a map'sdownstream_join_idis not the ID of a join by @dsfaccini in #15130 - Cap
fastmcp-slimbelow 4.2.6 so a dropped kept-alive stdioMCPToolsetstops its server by @dsfaccini in #15177 - Look up a Responses stream that ended before
response.completedin the OpenAI conversation beforeopenai_conversation_idtrims through it by @dsfaccini in #15038 - Say when a
read_tool_resultoffset is past the end of a spilled result by @mpfaffenberger in #14982 - Stream
MistralModelcontent as text, not as an output tool call, when text output is allowed by @dsfaccini in #15129 - Replace the
Parent fork run not founderror with one that names the join, its parent fork and the fix by @dsfaccini in #15092 - Stream
MistralModelcontent as text, not as an output tool call, when text output is not allowed by @dsfaccini in #15188 - Leave no overrides in force when
Agent.override()raises by @dsfaccini in #15144 - Keep the parameters whose type hints resolve in the
AgentSpecandDatasetJSON schemas by @dsfaccini in #14773 - Run a union output function whose argument is
Optional[...],X | Noneor a type alias, instead of raisingTypeErroror returning the argument by @dsfaccini in #15204 - Fix
new_messages()for a resumed run when a history processor removes or inserts a message after the requestReinjectSystemPromptrebuilt by @dsfaccini in #15206 - Fail a
CodeModerun when a DBOS replay diverges insiderun_code, and drop the elapsed-time limit under every durable engine by @adtyavrdhn in #13527 - Mask
secret_envin live shell output events by @adtyavrdhn in #15068 - Record content in a durable unit only if the worker allows it by @adtyavrdhn in #14312
- Keep a custom
identifieronBinaryContentandFileUrlacrossAGUIAdapterround trips by @dsfaccini in #15212 - Stop naming an agent
selfwhen one of its own methods callsrun()or another entry point by @dsfaccini in #15219 - Build each
PartEndEventfrom its own part, so a stream with many parts stays linear and a tool call without a name no longer ends the wrong part by @dsfaccini in #15210 - Record a failed streamed model request's error on its
chatspan by @dsfaccini in #15203 - Infer the agent name from the caller in
Agent.iter,WrapperAgent.iterandWrapperAgent.compact_historyby @dsfaccini in #15218 - Stop a threaded run of an unnamed agent from raising
AssertionError: Name already setby @dsfaccini in #15308 - Point a failed run's
pydantic_ai.new_message_indexat the run's own messages inpydantic_ai.all_messagesby @dsfaccini in #15209 - Return an inline user image from
AGUIAdapter.load_messagesasBinaryImage, not plainBinaryContentby @dsfaccini in #15329 - Answer 422, not 500, from
UIAdapter.dispatch_requestwhen a client file field fails validation by @dsfaccini in #15332 - Stop keyed
FileStepStorewrites from re-reading every earlier snapshot file and event line by @DouweM in #15019 - Run an argv named like a shell builtin as the program in
DaytonaSandboxBackendandSpritesSandboxBackendby @DouweM in #15009 - Match
Skillsincludeandexcludenames after NFKC normalization, so a lowered skill selected with compatibility characters is offered by @DouweM in #14605 - Stop
OpenSandboxBackendfrom reattaching after every operation onceaclose()ran mid-operation by @DouweM in #15006 - Keep calls a tool deferred while running in the
DeferredToolRequeststhatrun_stream()ends on by @DouweM in #15062 - Deliver
EnqueuedMessagesEventfor content queued when a Temporal run continues as new by @DouweM in #14404 - Carry a
ModelFallbackcandidate's model-name string across the durable step boundary by @adtyavrdhn in #13249 - Keep native tool returns ahead of function tool calls when
AGUIAdapterloads messages by @adtyavrdhn in #13375 - Summarize a history larger than
SummarizingCompaction's summarizer window in chunks by @DouweM in #14824 - Record
ToolReturn.contentas returned so durable runs reject non-UserContentitems like plain runs by @DouweM in #14921 - Refuse realtime sessions in durable workflow code, and document the supported recipe by @DouweM in #14526
- Raise
ModelConnectionErrorwhen a stream misses thefinish_reasonthatopenai_chat_streaming_requires_finish_reasonrequires by @DouweM in #14769 - Attach a workspace a capability function supplies before
for_run, sofor_runcan readctx.workspaceby @DouweM in #10528 - Stop
BackgroundToolsadvertising background calls in sequential runs, and warn that its tools run in the foreground by @DouweM in #14445 - Record and count the usage of a streamed attempt the provider billed before it failed by @DouweM in #14399
- Document how providers cache instructions, and pin GPT-6.2 leading-input instructions to OpenAI's own API by @DouweM in #14529
- Close a discarded Vercel AI tool call with
tool-input-errorso the frontend doesn't run it by @DouweM in #14638 - Correct the
RunContext.model_settingsdocstring on whatwrap_model_requestsees after its handler by @dsfaccini in #15416 - Handle strings holding a lone surrogate in
ToolCallPart.args_as_dict()andToolReturnPart.structured_content()by @dsfaccini in #15352 - Stop
GoogleInteractionsModelraisingTypeErrorthrough a caller-builtClienton anhttpx2client that sets no timeout by @dsfaccini in #15636 - Classify a ChatGPT subscription's
usage_limit_reachederror asModelQuotaExceededErrorby @DouweM in #15443 - Answer 422 from
AGUIAdapter.build_run_inputfor a lone surrogate when the body also carries unsupported content by @dsfaccini in #15605 - Send
reasoning_effortforthinkingonmistral:mistral-large-latest, which is now Mistral Large 4 by @dsfaccini in #15648 - Include a
SpeechParttranscript in the plain-text output ofrun_stream()by @dsfaccini in #15656 - Stop type names from one
get_conflicting_type_namescall leaking intoFunctionSignaturerenders with another set by @dsfaccini in #15654 - Close
Agent,Provider,FallbackModelandMCPToolsetwhen their exit runs inside a cancelled AnyIO scope by @dsfaccini in #15651 - Raise clear errors for unsupported
AudioUrl/ImageUrl/VideoUrl.formatby @adtyavrdhn in #13374 - Drop non-dict
provider_detailssent by a client to the Vercel AI and AG-UI adapters by @adtyavrdhn in #13367 - Keep
ToolReturn.toolswhenToolOutputLimitsreduces a result by @DouweM in #15462 - Retry a
FallbackModelon Temporal unless every model failed with a non-retryable error by @DouweM in #14770 - Keep Prefect cache keys stable when a capability without an
idcontributes tools by @DouweM in #15340 - Stop
FallbackCompactiondropping a background summary that fits as stale by @DouweM in #15580 - Return
-32002(Resource not found) for unknown ACP sessions by @mpfaffenberger in #15738 - Move draft-07
definitionsunder$defsin strict tool schemas on plainAsyncAnthropicclients, so their$refs resolve by @dsfaccini in #15392 - Inline tool schemas for DeepSeek V3.2 on Bedrock, which sends
$refobject arguments as JSON strings by @DouweM in #15561 - Fix
MistralModelgaps:thinkingon DeepSeek V4.1 Flash and GLM-5.3, strict tools,extra_headers, client timeouts, usage details and error mapping by @dsfaccini in #15691 - Require
opentelemetry-api>=1.37.0inpydantic-evalsso online evaluation events export by @dsfaccini in #15772 - Refuse
get_output()andstream_output()afterStreamedRunResult.cancel()by @DouweM in #15545 - End an AG-UI stream at the
RUN_ERRORthat anon_erroroverride oron_cancelcallback yields by @pydanty in #15399 - Number the section tags in
LLMJudgeandGEvalprompts when the judged content contains one by @dsfaccini in #15695 - End a UI stream with the protocol error event when the
on_cancelcallback raises by @dsfaccini in #15806 - Preserve Vercel AI
ToolReturnmetadata across serialization by @dsfaccini in #15780 - Support
tool_choice='required'and forced output tools for GPT-5.6 Sol, GPT-6 Sol and Astra, and GPT-6.1 Sol and Terra onBedrockConverseModelby @dsfaccini in #15800 - Raise failed AWS credential refreshes as
ModelConnectionErroron Bedrock, soFallbackModelfalls back by @pydanty in #15409 - Restrict
tool.uv.environmentsand the harnesssmolandboxliteextras to CPython by @dsfaccini in #15837 - Release a run's deps by reference counting when a tool raises under
end_strategy='exhaustive'by @dsfaccini in #15813 - End an AG-UI stream at the
RUN_ERRORthaton_completeyields, and closeon_completeandon_cancelgenerators when the stream is closed by @dsfaccini in #15819 - Fail an
AGUIAdapterresume that gives oneinterruptIdtwo different answers, instead of applying the last by @dsfaccini in #15820 - Add GPT-6.2 Sol and Astra to the Bedrock Converse profile gate by @pydanty in #14580
- Keep the signature of a
ThinkingPartwithout text in AG-UI streams by @pydanty in #15424 - Run a
SubAgentsdelegation toselfoutside the durable unit on every durable engine by @DouweM in #15831 - Give durable model request hooks the guarded run context, so
ctx.enqueue()refuses as in other durable hooks by @DouweM in #15343 - Share the
CompactOnRequesttoolset with its per-run copies so durable engines accept it by @DouweM in #15394 - Send gpt-oss's mid-conversation system prompts as
<system>blocks on every host by @DouweM in #15427 - Fall back to Pax's plaintext credential files when the Secret Service collection stays locked by @mpfaffenberger in #15143
- Report Pax to herdr as
pax, and let a distribution of Pax report its own name by @mpfaffenberger in #15136 - Report Pax
/compacttoken totals against the context size the status row shows by @mpfaffenberger in #15132 - Keep Pax session-browser delete confirmation open across idle keyboard polls by @pydanty in #15094
- Move Pax into the project directory of a resumed Claude Code or Codex session by @mpfaffenberger in #15093
- Keep the extras Pax was installed with in
/updateand the install hints by @DouweM in #14814 - Keep event loop errors, such as Windows
WinError 10054on socket teardown, off thepaxTUI by logging them toasyncio.logby @mpfaffenberger in #14641 - Fix relative docs links in the
OpenAICompactionand two Anthropic docstrings that pointed one directory too shallow by @dsfaccini in #15091 - Print Pax headless resume warnings to
stderrby @pydanty in #15612
Full Changelog: v2.77.0...v2.78.0