P

PydanticAI

P
PydanticAI AI v2.54.0

v2.54.0 (2026-10-02)

What's Changed ⚠️ Compatibility Notes Handle draft-7 list-form items in JsonSchemaTransformer, TestModel and Mistral streamed output, and make TestModel accept boolean subschemas and cap prefixItems at maxItems by @dsfaccini in #9560 Fix ImageGeneration under FallbackModel and dataclasses.replace, and compare Embedder by identity by @dsfaccini in #9477 Refuse a second durable execution engine on a…

P
PydanticAI AI v2.53.0

v2.53.0 (2026-10-01)

🛡️ Security This release fixes one security issue in ConcurrencyLimitedModel. See the advisory for full details and affected versions. GHSA-6fqq-452j-qhrp (high): a streamed request through ConcurrencyLimitedModel or limit_model_concurrency could keep its concurrency slot when the slot was released on a different task than the one that acquired it: after an early exit (the consumer stopped iterati…

P
PydanticAI AI v1.107.7

v1.107.7 (2026-09-29)

🛡️ Security A maintenance release for the v1 line, carrying the v1 backport of the security fix released in 2.52.0. See the advisory for full details and affected versions. GHSA-v36g-jcw9-x7cw (moderate): converting attacker-controlled HTML with deeply nested elements in the local web_fetch tool could consume excessive CPU and memory. Provider-native web fetching is not affected. Reported by @Soun…

P
PydanticAI AI v2.52.0

v2.52.0 (2026-09-29)

🛡️ Security This release fixes one security issue in web_fetch. See the advisory for full details and affected versions. GHSA-v36g-jcw9-x7cw (moderate): converting attacker-controlled HTML with deeply nested elements in the local web_fetch tool could consume excessive CPU and memory. Provider-native web fetching is not affected. Reported by @SounLabs. (#8984) Patched in 2.52.0 (v2) and 1.107.7 (v1…

P
PydanticAI AI v2.51.0

v2.51.0 (2026-09-25)

What's Changed ⚠️ Compatibility Notes Match dated gemini-3.8-live ids, reject google_affective_dialog on Gemini 3.1 Flash Live and 3.8 Live at connect, and raise RealtimeError for Gemini Live close codes by @DouweM in #8761 Raise a UserError for a realtime tool_choice that forces a tool call on OpenAI, Azure OpenAI, and xAI by @DouweM in #8755 🚀 Features Add OpenAI GPT-Live support with OpenAILive…

P
PydanticAI AI v2.50.0

v2.50.0 (2026-09-24)

What's Changed ⚠️ Compatibility Notes Ask a DecisionModel which route to take by name, with one label per route by @DouweM in #8733 Make ModelSelectionContext.messages end with the request being routed, and add ModelSelectionContext.prompt by @DouweM in #8737 Replace the decision model's tool-call lean with an opt-in decision_route_threshold by @DouweM in #8739 🚀 Features Expose OpenAI service_tie…

P
PydanticAI AI v2.49.0

v2.49.0 (2026-09-23)

What's Changed 🚀 Features Add GitHubCopilotOAuthFlow for device authorization by @Kludex in #8618 Add BoolCriteria to say what a bool field's yes and no mean, and let a True/False Enum do the same by @DouweM in #8586 Use what the user wrote about None as the "none of these" option in TypeSafeModel by @DouweM in #8684 Offer whole numbers that are not a rubric as a Choice in TypeSafeModel by @DouweM…

P
PydanticAI AI v2.48.0

v2.48.0 (2026-09-22)

What's Changed 🚀 Features Support genai-prices 0.1.7 and new OpenAI audio models by @adtyavrdhn in #8617 Add OpenAI gpt-6-sol and gpt-6-luna model support by @DouweM in #8635 Add Claude Opus 5.5 (claude-opus-5-5) support by @DouweM in #8637 🐛 Bug Fixes Preserve UIMessage.id across Vercel AI load_messages and dump_messages by @adtyavrdhn in #8623 Preserve AG-UI Message.id across AGUIAdapter.load_me…

P
PydanticAI AI v2.47.0

v2.47.0 (2026-09-21)

What's Changed ⚠️ Compatibility Notes Name a None output route None rather than NoneType by @DouweM in #8590 Raise when UserPromptPart.content is not a str or a sequence, instead of silently sending a dict's keys by @DouweM in #8595 🚀 Features Ask three more field types TypeSafeModel can already answer by @DouweM in #8544 🐛 Bug Fixes Refuse a tuple output field and a self-contained model instead o…

P
PydanticAI AI v2.46.0

v2.46.0 (2026-09-18)

What's Changed 🚀 Features Let TypeSafeModel fill a tool's arguments when Jev can express them by @DouweM in #8501 Add RealtimeSession.wait_for_playback() and let the docs examples finish the reply before closing by @DouweM in #8141 Add supports_text_output to ModelProfile, and run LLMJudge and GEval on a model without it by @DouweM in #8480 Add typesafe_boolean_threshold for what a yes/no has to b…

P
PydanticAI AI v2.45.0

v2.45.0 (2026-09-17)

What's Changed 🚀 Features Add TypeSafeModel for TypeSafe's Jev by @adtyavrdhn in #8450 🐛 Bug Fixes Pass xhigh effort through on Bedrock when the model profile supports it by @willfrey in #8392 Allow gpt-5.6-sol, gpt-5.6-luna, and gpt-5.6-terra on Bedrock Converse by @pydanty in #7825 Resolve a DynamicToolset once per durable run instead of inside every durable unit by @DouweM in #8455 Hold one MCP…

P
PydanticAI AI v2.44.0

v2.44.0 (2026-09-16)

🛡️ Security This release fixes four security issues, all of them reached through web_fetch_tool or OpenTelemetry instrumentation. See each advisory for full details and affected versions. GHSA-vmxc-h2x2-jmf3 (moderate): the cloud-metadata and private-IP blocklists could be bypassed with an IPv6 zone identifier on a URL opted into local network access, via FileUrl(force_download='allow-local') or w…

P
PydanticAI AI v1.107.6

v1.107.6 (2026-09-16)

🛡️ Security A maintenance release for the v1 line, carrying the v1 backports of the four security fixes released in 2.44.0. See each advisory for full details and affected versions. GHSA-vmxc-h2x2-jmf3 (moderate): cloud-metadata and private-IP blocklist bypass via an IPv6 zone identifier, on a URL opted into local network access. Reported by @euriconicacio. (#8402) GHSA-fpf4-vwcp-v4hp (moderate):…

P
PydanticAI AI v2.43.0

v2.43.0 (2026-09-11)

What's Changed 🚀 Features Add a first-run banner describing the run, and open clai sessions with it by @DouweM in #7447 🐛 Bug Fixes Preserve text part boundaries after tool calls in OpenAIChatModel by @KaranJayakumar in #8235 fix(temporal): key tool opt-out checks on operation kind, not an MCP import by @adtyavrdhn in #8257 New Contributors @KaranJayakumar made their first contribution in #8235 Fu…

P
PydanticAI AI v2.42.0

v2.42.0 (2026-09-08)

What's Changed ⚠️ Compatibility Notes Reject invalid DeferredToolResults.approvals values by @adtyavrdhn in #8081 🚀 Features Add a GitHubCopilotProvider for GitHub Copilot's OpenAI-compatible API by @dsfaccini in #8059 🐛 Bug Fixes Honor anthropic_disallows_sampling_settings in BedrockConverseModel by @rscholz98 in #7961 Resolve non-object $ref definitions inline in code-mode function signatures by…

P
PydanticAI AI v2.41.0

v2.41.0 (2026-09-07)

What's Changed 🚀 Features Deprecate fallback_model in favor of fallback_subagent_model on ImageGeneration and XSearch by @dsfaccini in #8077 Add openai-codex provider for ChatGPT/Codex subscription authentication by @mpfaffenberger in #7769 Add a direct image generation API with ImageGenerator by @EgonFerri in #5357 🐛 Bug Fixes Report Anthropic native web searches in RequestUsage.details and price…

P
PydanticAI AI v2.40.0

v2.40.0 (2026-09-04)

What's Changed 🚀 Features Add pydantic_ai.prices.update_in_background() by @adtyavrdhn in #4841 Handle barge-in in the session: handle_barge_in=True, interrupt(played_bytes=...), and played_audio_bytes by @DouweM in #7870 Add provider_factory to infer_realtime_model by @DouweM in #8106 Add @agent.on_event for registering event listeners on an Agent by @DouweM in #8101 Add respond= to RealtimeSessi…

P
PydanticAI AI v2.39.0

v2.39.0 (2026-09-03)

What's Changed 🚀 Features Add OpenAI gpt-6-astra model support by @dsfaccini in #8055 🐛 Bug Fixes Fix the context_subtree() exporter cache and its span-processor leaks by @dsfaccini in #7667 Restore the Instrumentation spec option include_model_request_parameters and sharpen the undeclared-attribute merge error by @DouweM in #8046 Detect Azure content-filter errors for AzureProvider and for AsyncA…

P
PydanticAI AI v2.38.0

v2.38.0 (2026-09-03)

What's Changed ⚠️ Compatibility Notes Give one-off capabilities a default id and a combine rule for repeats by @dsfaccini in #7248 🚀 Features Add context_window to ModelProfile and context_window_used to RunContext by @adtyavrdhn in #4611 Add profile flag to reject streams without finish_reason by @jonashaag in #7096 Add gemini-3.8-flash model by @dsfaccini in #8021 Let application code and capabi…

P
PydanticAI AI v2.37.0

v2.37.0 (2026-08-31)

What's Changed 🚀 Features Add glm-5.3-flash and rework the Z.AI test suite onto cassettes by @dsfaccini in #7887 🐛 Bug Fixes fix: preserve all conditions in pruned span queries by @mikemikimike in #7499 Accept and map Z.AI's non-standard finish_reason values by @zhj12395 in #7685 Emit an AG-UI TEXT_MESSAGE_START for the assistant message that owns a response's tool calls by @dsfaccini in #7699 Rou…

P
PydanticAI AI v2.36.0

v2.36.0 (2026-08-28)

What's Changed ⚠️ Compatibility Notes Add --mcp-config support and tool-call streaming to clai by @Kludex in #1374 🚀 Features Add @durable_operation for capabilities and a public backend API for third-party durable execution engines by @DouweM in #6696 Give instruction parts a stable InstructionPart.id by @DouweM in #6887 Accept async iterables in RealtimeSession.send_audio() and move the voice ex…

P
PydanticAI AI v2.35.3

v2.35.3 (2026-08-27)

What's Changed 🐛 Bug Fixes Route Heroku GLM models through zai_model_profile by @LHMQ878 in #6837 Scope safe_download cookies to original hostnames by @Diwak4r in #7077 Fix DeferredToolRequests.remaining resolving cross-category result IDs by @pydanty in #7626 Identify rejected runtime toolsets in durable execution errors by @pydanty in #6784 Un-cap the dbos extra; add opentelemetry-instrumentatio…

P
PydanticAI AI v2.35.1

v2.35.1 (2026-08-26)

What's Changed 🐛 Bug Fixes Carry Bedrock guardrail trace in ModelResponse.provider_details by @pydanty in #7562 Honor provider_factory when cancelling Temporal responses by @DouweM in #7000 Cap dbos below 2.31.0 to avoid a missing opentelemetry-instrumentation-logging import by @dsfaccini in #7804 Full Changelog: v2.35.0...v2.35.1

P
PydanticAI AI v2.35.0

v2.35.0 (2026-08-25)

What's Changed ⚠️ Compatibility Notes Deprecate RunContext.capability_loaded and available_capability_ids in favor of capability_active and active_capability_ids by @DouweM in #7454 Make inclusive integer maximum reachable in TestModel by @pydanty in #7697 🚀 Features Reduce the default Temporal metric export frequency by @dmontagu in #7768 🐛 Bug Fixes Preserve explicit empty Tool description inste…

P
PydanticAI AI v2.34.0

v2.34.0 (2026-08-24)

What's Changed 🚀 Features Add a LangChain migration skill by @adtyavrdhn in #7679 Add GLM-5.3 support to ZaiModel by @aisk in #7600 🐛 Bug Fixes Fix TestModel generation for equal inclusive bounds by @pydanty in #7642 Render enum $refs as Literal in FunctionSignature by @pydanty in #7579 Fix TestModel generation of falsy JSON Schema const values by @pydanty in #7630 Fix stale UIEventStream part sta…

P
PydanticAI AI v2.33.0

v2.33.0 (2026-08-20)

⚠️ If Anthropic stopped working for you in the last day anthropic 1.0.0 — rebuilt on httpx2, with legacy httpx support removed — reached PyPI on August 20. Every earlier pydantic-ai release, including v2.32.2 cut a few hours before this one, allowed that version without supporting it: a fresh or unpinned install of pydantic-ai[anthropic] could resolve anthropic 1.0.0 and then fail at runtime when…

P
PydanticAI AI v2.32.2

v2.32.2 (2026-08-20)

What's Changed 🐛 Bug Fixes Await async callable instances in pydantic_evals tasks and the evaluate decorator by @pydanty[bot] in #7535 Fix RunContext.cancel() in realtime sessions by @adtyavrdhn in #7528 Recognize m.youtube.com URLs in VideoUrl by @uczltw6 in #7592 Normalize DeepSeek Responses function-call replay by @dsfaccini in #7448 Fail the workflow on UnexpectedModelBehavior and FallbackExce…

P
PydanticAI AI v2.32.1

v2.32.1 (2026-08-19)

What's Changed 🐛 Bug Fixes Reject Agent.run_sync() from synchronous callbacks inside agent runs by @dsfaccini in #7277 Don't send Anthropic thinking blocks with an empty signature by @mpfaffenberger in #7601 Accept any callable as a FunctionModel function or stream_function by @dsfaccini in #7589 Full Changelog: v2.32.0...v2.32.1

P
PydanticAI AI v2.32.0

v2.32.0 (2026-08-18)

What's Changed 🚀 Features Suggest known model names for invalid identifiers by @dsfaccini in #7325 Support xAI attachment search lifecycle by @colesmcintosh in #7156 Surface OpenRouter web-search sources in provider_details["annotations"] by @dsfaccini in #7458 Add instrumentation version 6, emitting tool results under role: 'tool' by @dsfaccini in #7582 🐛 Bug Fixes Run sync hooks in a thread pool…

P
PydanticAI AI v2.31.1

v2.31.1 (2026-08-17)

What's Changed 🐛 Bug Fixes Deny native structured output for Claude Sonnet 5 and Fable 5 on Bedrock by @pydanty[bot] in #7374 Fall back to thinking_level='LOW' for Gemini models that reject MINIMAL by @pydanty[bot] in #7469 Full Changelog: v2.31.0...v2.31.1