What's Changed
⚠️ Compatibility Notes
- Let
Peers(network)join anInMemoryPeerNetworkunder the agent'sname, and renamePeerNetworktoPeerConnectionby @dsfaccini in #13777 - Add
StavProviderfor the Stav European inference gateway by @bwentzel in #12750 - Add Otari as an OpenAI-compatible gateway provider by @tbille in #13584
- Add
authtoStackOne, deprecatingapi_key, to match the other hosted MCP capabilities by @mpfaffenberger in #13735 - Add
grep_tool_resultandunit='bytes'reads forToolOutputLimitsspills by @mpfaffenberger in #13752 - Run remote
CodeModeturns as Temporal activities so long snippets don't trip the deadlock detector by @adtyavrdhn in #13756 - Add
DeferredToolRequests.validated_argsso an approver sees the arguments a deferred tool call will run with by @dsfaccini in #13693 - Deprecate
DEPRECATED_ANTHROPIC_MODELS, which Pydantic AI no longer uses by @dsfaccini in #13795 - Pause again when a deferred pause whose step also ran other tools is resumed without
deferred_tool_resultsby @adtyavrdhn in #13051 - Keep a run paused when content is queued at a
DeferredToolRequestsorPendingModelResponsepause, and haveBackgroundToolswait for its tasks at aDeferredToolRequestspause by @adtyavrdhn in #13054 - Keep approval-required and external tools native under
CodeMode(tools='all')by @mpfaffenberger in #13742 - Type the in-process MCP server arm of
MCPToolsetClientas a protocol instead ofmcp.server.fastmcp.FastMCP, so strict pyright accepts it on FastMCP 3 and 4 by @adtyavrdhn in #13721
🚀 Features
- Let
Peers(network)join anInMemoryPeerNetworkunder the agent'sname, and renamePeerNetworktoPeerConnectionby @dsfaccini in #13777 - Add
anthropic_previous_message_idsetting for Anthropic message threads by @Harshil-Jani in #12259 - Add
StavProviderfor the Stav European inference gateway by @bwentzel in #12750 - Add
titleandmetadatatoConversationRecord, set withConversationStore.update()by @DouweM in #12311 - Add Otari as an OpenAI-compatible gateway provider by @tbille in #13584
- Add
DenyUnansweredharness capability to answer deferred calls by @pydanty in #12584 - Route agent runs with
ModelRouterby @DouweM in #9046 - Add
ReportStaleFilesto tell the model when workspace files it read change or are deleted by @mpfaffenberger in #13750 - Add
ToolBridge, which keeps the tool list fixed behindtool_search,tool_describeandtool_callso the prompt cache holds for large or changing tool sets by @mpfaffenberger in #13744 - Add
Shell(secret_env=), masking the secrets it injects in what the tools return by @mpfaffenberger in #13622 - Add
authtoStackOne, deprecatingapi_key, to match the other hosted MCP capabilities by @mpfaffenberger in #13735 - Add
grep_tool_resultandunit='bytes'reads forToolOutputLimitsspills by @mpfaffenberger in #13752 - Raise an HTTP 408 from a provider as
ModelTimeoutErrorby @adtyavrdhn in #13838 - Add
WrapUpAtLimitsharness capability to end a run with a final answer instead ofUsageLimitExceededby @mpfaffenberger in #13670 - Add
LabelCrossModelHistoryto tell the model when earlier assistant turns came from another model by @mpfaffenberger in #13749 - Allow, ask about, or deny tool calls and shell commands by rule with
PermissionRulein HarnessPermissionsby @mpfaffenberger in #13751 - Add
ReportRemainingBudgetto tell the model how much of its usage limits and spend budgets is left on every request by @mpfaffenberger in #13747 - Add
CurrentTimeso an agent knows today's date, or the current hour, in a time zone you pick by @mpfaffenberger in #13754 - Add
ReportToolErrorsto send an unhandled tool exception to the model as a failed tool result instead of ending the run by @mpfaffenberger in #13745 - Add
RequireVerificationto send a coding agent back to run its checks when it tries to finish after an unverified edit by @mpfaffenberger in #13753 - Run remote
CodeModeturns as Temporal activities so long snippets don't trip the deadlock detector by @adtyavrdhn in #13756 - Add
Goalto keep unattended runs working until a caller-defined completion check passes by @mpfaffenberger in #13733 - Support Gemini 4 Neon (
gemini-4-neon) onGoogleModelby @dsfaccini in #13928
🐛 Bug Fixes
- Keep the stored xAI function name when replaying
WebSearchToolcalls by @pydanty in #10021 - Add
DeferredToolRequests.validated_argsso an approver sees the arguments a deferred tool call will run with by @dsfaccini in #13693 - Cut every URL in a
PlaywrightBrowserattach error to its origin, not only the exactcdp_urlby @dsfaccini in #13796 - Deprecate
DEPRECATED_ANTHROPIC_MODELS, which Pydantic AI no longer uses by @dsfaccini in #13795 - Stop rebuilding the active-capability set for every deferred capability on every hook by @adtyavrdhn in #13812
- Skip serializing model request span attributes when the span is sampled out by @adtyavrdhn in #13813
- Pause again when a deferred pause whose step also ran other tools is resumed without
deferred_tool_resultsby @adtyavrdhn in #13051 - Keep the stale-thinking-block recovery of
AnthropicModel.count_tokensfor later counts when the request carries aModelSettingsDeltaPartby @dsfaccini in #13833 - Send a lost Sprite create again in
SpritesSandboxBackendinstead of only looking it up by @adtyavrdhn in #13827 - Keep a run paused when content is queued at a
DeferredToolRequestsorPendingModelResponsepause, and haveBackgroundToolswait for its tasks at aDeferredToolRequestspause by @adtyavrdhn in #13054 - Restore empty
tool_argswhen Anthropic streams a zero-argumentmcp_tool_useby @adtyavrdhn in #13834 - Skip Anthropic content blocks and deltas of a type the SDK doesn't know, with a warning by @adtyavrdhn in #13836
- Classify Bedrock
ModelErrorExceptionand Groq 498 errors by @adtyavrdhn in #13837 - Keep approval-required and external tools native under
CodeMode(tools='all')by @mpfaffenberger in #13742 - Close the debounce generator of
stream_text()andstream_response()when the consumer stops early, instead of leaving it to the garbage collector by @dsfaccini in #13859 - Fix realtime retained-audio and
ImageUrlerrors that read "a openai realtime session", and givesession.send()WAV errors their own wording by @dsfaccini in #13794 - Skip attribute docstrings in durable capability-operation schemas, which take seconds to read on Python 3.11 and 3.12 by @dsfaccini in #13891
- [gh-aw] Write session frames larger than the capture pipe whole instead of failing the run with
Errno 11by @dsfaccini in #13915 - Say which
FunctionToolsetdefaults reach aToolinstance, in its docstrings anddocs/toolsets.mdby @dsfaccini in #13621
New Contributors
- @Harshil-Jani made their first contribution in #12259
- @bwentzel made their first contribution in #12750
- @tbille made their first contribution in #13584
Full Changelog: v2.70.0...v2.71.0