What's Changed
⚠️ Compatibility Notes
- Add the
computertool contract to core:pydantic_ai.computer_useandComputerToolby @adtyavrdhn in #11006- Adds
ComputerTooltoNATIVE_TOOLS_REQUIRING_CONFIG: it needs acomputertool to run its calls.
- Adds
- [cache] Send static instructions as leading
inputmessages on GPT-6.2, which never caches top-levelinstructionsby @dsfaccini in #14095- Continuing a GPT-6.2 response through an explicit
openai_previous_response_id='resp_…'without itsmessage_historynow inherits that response's static instructions. Pass themessage_history, orprofile=OpenAIModelProfile(openai_responses_stable_instructions_as_input=False).
- Continuing a GPT-6.2 response through an explicit
- Stop summing Gemini's running usage totals when streaming through
OpenAIChatModelby @dsfaccini in #14285- Streaming a
gemini*model throughOpenAIProvidernow reports the endpoint's final usage totals instead of their sum, so cost figures drop andUsageLimitstoken limits trip later.
- Streaming a
🚀 Features
- Warn with
DeprecatedModelWarningon requests toclaude-opus-4-5by @dsfaccini in #14290 - Add the
computertool contract to core:pydantic_ai.computer_useandComputerToolby @adtyavrdhn in #11006 - Harness: add the
ComputerUse()capability and theDisplayprotocols it drives by @adtyavrdhn in #11037 - Add
DockerContainer(desktop=True)for computer use by @adtyavrdhn in #11040 - OpenAI: send the
computertool as OpenAI's native computer tool on GPT-5.4 and later by @adtyavrdhn in #11038 - Add
DaytonaSandbox(desktop=True)for computer use by @adtyavrdhn in #11210 - Add
E2BSandbox(desktop=True)for computer use by @adtyavrdhn in #11211 - Add
desktoptoSpritesSandboxforComputerUseby @adtyavrdhn in #12965 - Add
desktoptoBoxLiteSandboxforComputerUseby @adtyavrdhn in #12966 - Add
desktoptoBoxdSandboxforComputerUse, driven by boxd's computer API by @adtyavrdhn in #12968 - Add
desktoptoSmolSandboxforComputerUseby @adtyavrdhn in #12967 - Add
desktoptoRenderSandboxforComputerUseby @adtyavrdhn in #13986 - Add
desktoptoModalSandboxforComputerUseby @adtyavrdhn in #12964 - Add
desktoptoKubernetesSandboxforComputerUseby @adtyavrdhn in #13988 - Anthropic: send the
computertool as each Claude model's computer use tool by @adtyavrdhn in #11039 - Add
desktoptoOpenSandboxforComputerUseby @adtyavrdhn in #13987 - Google: send the
computertool as Google's computer use tool on Gemini by @adtyavrdhn in #14307 - [cache] Send static instructions as leading
inputmessages on GPT-6.2, which never caches top-levelinstructionsby @dsfaccini in #14095 - Send a tool's text output to Qwen3 Next as a JSON string field with
needs_json_string_tool_returnsby @DouweM in #12366
🐛 Bug Fixes
- Keep a custom
identifieronBinaryContentandFileUrlacrossVercelAIAdapterround trips by @dsfaccini in #14281 - Stop summing Gemini's running usage totals when streaming through
OpenAIChatModelby @dsfaccini in #14285 - Classify OpenRouter context-window overflow nested in
metadata.rawasModelContextWindowExceededErrorby @pydanty in #14231 - Keep the stored id on the user message in
AGUIAdapter.dump_messageswhen an activity message follows it by @rscholz98 in #13161
Full Changelog: v2.73.0...v2.74.0