github pydantic/pydantic-ai v2.74.0
v2.74.0 (2026-11-24)

latest release: v1.107.11
25 minutes ago

What's Changed

⚠️ Compatibility Notes

  • Add the computer tool contract to core: pydantic_ai.computer_use and ComputerTool by @adtyavrdhn in #11006
    • Adds ComputerTool to NATIVE_TOOLS_REQUIRING_CONFIG: it needs a computer tool to run its calls.
  • [cache] Send static instructions as leading input messages on GPT-6.2, which never caches top-level instructions by @dsfaccini in #14095
    • Continuing a GPT-6.2 response through an explicit openai_previous_response_id='resp_…' without its message_history now inherits that response's static instructions. Pass the message_history, or profile=OpenAIModelProfile(openai_responses_stable_instructions_as_input=False).
  • Stop summing Gemini's running usage totals when streaming through OpenAIChatModel by @dsfaccini in #14285
    • Streaming a gemini* model through OpenAIProvider now reports the endpoint's final usage totals instead of their sum, so cost figures drop and UsageLimits token limits trip later.

🚀 Features

  • Warn with DeprecatedModelWarning on requests to claude-opus-4-5 by @dsfaccini in #14290
  • Add the computer tool contract to core: pydantic_ai.computer_use and ComputerTool by @adtyavrdhn in #11006
  • Harness: add the ComputerUse() capability and the Display protocols it drives by @adtyavrdhn in #11037
  • Add DockerContainer(desktop=True) for computer use by @adtyavrdhn in #11040
  • OpenAI: send the computer tool 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 desktop to SpritesSandbox for ComputerUse by @adtyavrdhn in #12965
  • Add desktop to BoxLiteSandbox for ComputerUse by @adtyavrdhn in #12966
  • Add desktop to BoxdSandbox for ComputerUse, driven by boxd's computer API by @adtyavrdhn in #12968
  • Add desktop to SmolSandbox for ComputerUse by @adtyavrdhn in #12967
  • Add desktop to RenderSandbox for ComputerUse by @adtyavrdhn in #13986
  • Add desktop to ModalSandbox for ComputerUse by @adtyavrdhn in #12964
  • Add desktop to KubernetesSandbox for ComputerUse by @adtyavrdhn in #13988
  • Anthropic: send the computer tool as each Claude model's computer use tool by @adtyavrdhn in #11039
  • Add desktop to OpenSandbox for ComputerUse by @adtyavrdhn in #13987
  • Google: send the computer tool as Google's computer use tool on Gemini by @adtyavrdhn in #14307
  • [cache] Send static instructions as leading input messages on GPT-6.2, which never caches top-level instructions by @dsfaccini in #14095
  • Send a tool's text output to Qwen3 Next as a JSON string field with needs_json_string_tool_returns by @DouweM in #12366

🐛 Bug Fixes

  • Keep a custom identifier on BinaryContent and FileUrl across VercelAIAdapter round trips by @dsfaccini in #14281
  • Stop summing Gemini's running usage totals when streaming through OpenAIChatModel by @dsfaccini in #14285
  • Classify OpenRouter context-window overflow nested in metadata.raw as ModelContextWindowExceededError by @pydanty in #14231
  • Keep the stored id on the user message in AGUIAdapter.dump_messages when an activity message follows it by @rscholz98 in #13161

Full Changelog: v2.73.0...v2.74.0

Don't miss a new pydantic-ai release

NewReleases is sending notifications on new releases.