P

PydanticAI

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

P
PydanticAI AI v2.31.0

v2.31.0 (2026-08-14)

What's Changed 🚀 Features Allow a UIEventStream to be built without a run_input, and give AGUIEventStream its own thread_id/run_id by @dsfaccini in #7292 🐛 Bug Fixes Attribute failed FallbackModel spans to the failing model, not the fallback: wrapper by @strawgate in #7018 Pass openai through Temporal workflow sandboxes by @adtyavrdhn in #7464 New Contributors @echoVic made their first contributio…

P
PydanticAI AI v1.107.5

v1.107.5 (2026-08-13)

What's Changed 🛡️ Security GHSA-q2xc-rrxj-58x9: the local dev web chat UI (Agent.to_web(), clai web) didn't validate the Host header, so DNS rebinding from a website you visit could reach it and run the served agent with your local process's tools and credentials. Fixed in pydantic-ai/pydantic-ai-slim 1.107.5 by validating Host against localhost/loopback/LAN addresses by default; deployments reach…

P
PydanticAI AI v2.30.0

v2.30.0 (2026-08-13)

What's Changed 🛡️ Security GHSA-q2xc-rrxj-58x9: the local dev web chat UI (Agent.to_web(), clai web) didn't validate the Host header, so DNS rebinding from a website you visit could reach it and run the served agent with your local process's tools and credentials. Fixed in pydantic-ai/pydantic-ai-slim 2.30.0 by validating Host against localhost/loopback/LAN addresses by default; deployments reache…

P
PydanticAI AI v2.29.0

v2.29.0 (2026-08-12)

What's Changed 🚀 Features Support FastMCP 4 and MCP SDK v2 in MCPToolset alongside FastMCP 3 by @adtyavrdhn in #6738 Add Azure AI Voice Live via the azure_voice_live setting by @DouweM in #6642 🐛 Bug Fixes Fix silent truncation of gzip response bodies by @ChaoGlenXu in #7388 Include parameter descriptions in rendered tool signatures by @adtyavrdhn in #6487 Fix inherited realtime WebRTC and Azure f…

P
PydanticAI AI v2.28.0

v2.28.0 (2026-08-11)

🛡️ Security Fixes a high-severity vulnerability in the development web chat UI (Agent.to_web(), clai web): the chat endpoint didn't check the request's content type, so a plain cross-origin request from a website open in the developer's browser could reach the endpoint without a CORS preflight and trigger the served agent to run and execute its tools with the local process's privileges and credent…

P
PydanticAI AI v2.27.1

v2.27.1 (2026-08-10)

🛡️ Security This release fixed an information-disclosure issue: retry-prompt content (validation feedback sent back to the model, which can quote invalid values from its output) was not redacted by InstrumentationSettings(include_content=False) when the retry was not tied to a tool call. Now disclosed as GHSA-3gh4-cghq-f8v4 (low). Fixed here in 2.27.1 (#7357); v1 users should upgrade to 1.107.4 or…

P
PydanticAI AI v1.107.4

v1.107.4 (2026-08-11)

Note: an earlier v1.107.3 tag/release was cut and deleted tonight — a build-tooling issue (#7394: hatchling 1.32.0 emitted a package-metadata version PyPI's publish validator didn't yet accept) blocked its publish before anything reached PyPI, so nothing under that version number was ever installable. This release (1.107.4) carries the same fixes with the build issue resolved. 🛡️ Security This rel…

P
PydanticAI AI v2.27.0

v2.27.0 (2026-08-07)

What's Changed 🚀 Features Add xai_agent_count to XaiModelSettings by @pydanty[bot] in #7155 Round-trip CompactionPart through the Vercel AI and AG-UI adapters by @DouweM in #7287 Add SnowflakeModel and SnowflakeProvider for Snowflake Cortex by @ayirpown in #6150 🐛 Bug Fixes Honor include_binary_content=False in every OTel serialization sink by @dsfaccini in #7131 Keep ToolReturn.tools in the redac…

P
PydanticAI AI v2.24.0

v2.24.0 (2026-08-04)

🛡️ Security This release included a fix for an availability vulnerability — unbounded memory use when downloading remote content via the local web_fetch tool or FileUrl media downloads — now disclosed as GHSA-v2xh-2vp8-57h8. Fixed in 2.24.0 (#7141); v1 users should upgrade to 1.107.2 or later. What's Changed 🐛 Bug Fixes Fix Google provider dropping an explicit timeout=0 by @pydanty[bot] in #7114 F…

P
PydanticAI AI v1.107.2

v1.107.2 (2026-08-07)

🛡️ Security Fixes an availability vulnerability: unbounded memory use when downloading remote content via the local web_fetch tool or FileUrl media downloads, which could exhaust process memory and crash the worker. Patched versions enforce a default 50 MiB download cap. See GHSA-v2xh-2vp8-57h8. Patched in 1.107.2 (v1) and 2.24.0 (v2). What's Changed 🐛 Bug Fixes Bound HTTP response body sizes for…

P
PydanticAI AI v2.26.0

v2.26.0 (2026-08-06)

What's Changed 🚀 Features Support hiding function tools until revealed — via tool search, load_capability, or ToolReturn.tools — using each provider's native deferral/addition channel by @DouweM in #7104 Add first-party run cancellation: AgentRun.cancel(), RunContext.cancel(), RunCancelled by @DouweM in #6497 Add Model.resolve_prompt_cache_retention() to resolve effective prompt-cache retention fr…

P
PydanticAI AI v2.25.0

v2.25.0 (2026-08-05)

What's Changed 🚀 Features Forward xAI FileSearchTool collections search options by @pydanty[bot] in #7154 🐛 Bug Fixes fix(azure): send max_tokens for Mistral models, not max_completion_tokens by @feiiiiii5 in #6929 Omit server attributes for a malformed base_url port and forward base_url through WrapperModel by @dsfaccini in #7136 Fix thinking="minimal" for GPT-5.6 models by @daikeren in #7082 Deg…

P
PydanticAI AI v2.23.0

v2.23.0 (2026-08-03)

What's Changed 🚀 Features Add Bedrock support for ModelSettings.extra_headers by @kkauy in #4825 Restore stable gemini-3-pro-image and gemini-3.1-flash-image Gateway aliases by @adtyavrdhn in #7069 Add cost to RunUsage and cost_limit to UsageLimits by @Kludex in #2684 Add ToolAvailabilityDeltaPart with native tool_addition and additional_tools rendering by @DouweM in #6793 🐛 Bug Fixes Validate bed…