Releases: pydantic/pydantic-ai
Releases · pydantic/pydantic-ai
v1.29.0 (2025-12-09)
What's Changed
- Add support for aspect ratio in Gemini image generation by @mwildehahn and @ajac-zero in #3672
- Pass
container_idback to Anthropic API by @mattbrandman in #3637 - Upgrade temporalio to 1.20.0 by @akrivka in #3679
- Fix error when OpenRouter response includes file annotations by @dsfaccini in #3671
- Suppress broken resource errors if cancelling by @dmontagu in #3675
- Fix GoogleModel thinking signature not stored on tool calls when streaming by @jerry-heygen in #3647
- Don't require
anthropicdependency when using Anthropic model with other provider by @dsfaccini in #3652
New Contributors
Full Changelog: v1.28.0...v1.29.0
v1.28.0 (2025-12-08)
What's Changed
- Adds native structured output support for
claude-haiku-4-5by @dsfaccini in #3670 - Support
us-gov.and other multi-character Bedrock geo prefixes by @Leundai in #3645 - Allow missing content in streamed OpenRouter reasoning details by @ajac-zero in #3674
- Remove typings stubs by @dsfaccini in #3673
New Contributors
Full Changelog: v1.27.0...v1.28.0
v1.27.0 (2025-12-04)
What's Changed
- feat: Allow dynamic configuration of built-in tools via RunContext by @AlanPonnachan in #3600
- Support tool and resource caching for MCP servers that support change notifications by @dsfaccini in #3560
- Support raw CoT reasoning from LM Studio and other OpenAI Responses-compatible APIs by @dsfaccini in #3559
- Fix structured output with nested definitions with Gemini via OpenRouter by @dsfaccini in #3618
- fix: Copy
extra_headersto allowmodel_settingsreuse by @Wh1isper in #3628 - Add
VercelAIAdapter.dump_messagesto convert Pydantic AI messages to Vercel AI messages by @dsfaccini in #3392 - Disable use of
tool_choice=requiredfor deepseek-reasoner by @ZeroAurora in #3644 - Use custom reasoning field for OpenRouter by @xcpky in #3626
New Contributors
- @AlanPonnachan made their first contribution in #3600
Full Changelog: v1.26.0...v1.27.0
v1.26.0 (2025-12-02)
What's Changed
- Support JSON object output for Deepseek provider by @xcpky in #3601
- Clarify
FallbackModelbehavior onValidationErrors by @dsfaccini in #3603 - Add latest Grok (xAI) models by @darjeeling in #3613
- Automatically omit TTL from
cache_controlwhenAnthropicModelis used with Bedrock client by @Wh1isper in #3616 - Add custom reasoning field support to OpenAI model profiles by @ZeroAurora in #3536
- Add
gateway/...:...to Known Model Names by @dsfaccini in #3593
New Contributors
- @darjeeling made their first contribution in #3613
- @ZeroAurora made their first contribution in #3536
Full Changelog: v1.25.1...v1.26.0
v1.25.1 (2025-11-28)
What's Changed
- Make
FastMCPToolsetwork with DBOS by @qianl15 in #3540 - Fix
OpenRouterModelerror whennative_finish_reasonisNoneby @reuben-if in #3584 - Fix error when OpenRouter API returns
Nonetool call arguments by @barp in #3571
New Contributors
- @reuben-if made their first contribution in #3584
Full Changelog: v1.25.0...v1.25.1
v1.25.0 (2025-11-27)
What's Changed
- Support
gemini-3-pro-image-previewwith Nano Banana Pro by @DouweM in #3576 - Return tool error to Google in 'error' key by @DouweM in #3583
Full Changelog: v1.24.0...v1.25.0
v1.24.0 (2025-11-26)
What's Changed
- Support native JSON output and strict tool calls for Anthropic by @dsfaccini in #3457
- Support Pydantic validation context by @NicolasPllr1 in #3448
- Support logprobs output from Responses API by @tim-becker in #3535
- Support instructions-only agent run with
OpenAIResponsesModelby @Cody-learns in #3470 - Enable
PLW1514rule (useutf-8encoding) by @Danipulok in #3524 - Replace direct
_model_nameaccess withmodel_nameproperty in OpenAI models and streamed responses by @BBYNAI in #3564 - Update docs on multi-modal file URLs being downloaded or sent directly by @marmor7 in #3492
New Contributors
- @Danipulok made their first contribution in #3524
- @Cody-learns made their first contribution in #3470
- @marmor7 made their first contribution in #3492
- @tim-becker made their first contribution in #3535
Full Changelog: v1.23.0...v1.24.0
v1.23.0 (2025-11-25)
What's Changed
- Add Anthropic built-in
WebFetchToolsupport by @sarth6 in #3427 - Allow
user_promptin HITL by @Wh1isper in #3528 - Add
anthropic_cache_messagesmodel setting and automatically strip cache points over the limit by @Wh1isper in #3442 - Add Gemini 3 Pro support to
OpenRouterModelby @zeyuyuyu in #3548 - Ensure
openrouter_reasoningmodel setting is sent to API by @xcpky in #3545 - Don't close custom httpx client provided to
MCPServerHTTPby @DouweM in #3534 - Fix double counting of request tokens in evals by @dmontagu in #3553
- Fix
pydantic_graph.beta.GraphRunGeneratorExithandling by @michgur in #3525 - Add test to ensure we allow message history starting with assistant message (model response) by @restless in #3519
- Remove
README.mdfrom wheel forpydantic-aiby @johnslavik in #3521 - Upgrade
Ruffto v0.14.6 by @Viicos in #3547 - Use
model_nameproperty inOpenAIChatModelchat completion create request by @BBYNAI in #3543 - Pin
huggingface-hubto<1by @Kludex in #3557 - Add docs examples to use the Gateway aside from the
gateway/<provider>:<model>shorthand by @dsfaccini in #3484
New Contributors
- @restless made their first contribution in #3519
- @johnslavik made their first contribution in #3521
- @michgur made their first contribution in #3525
- @zeyuyuyu made their first contribution in #3548
- @BBYNAI made their first contribution in #3543
- @sarth6 made their first contribution in #3427
Full Changelog: v1.22.0...v1.23.0
v1.22.0 (2025-11-21)
What's Changed
- Add OpenRouterModel as OpenAIChatModel subclass with additional feature support by @ajac-zero in #3089
- Make
FallbackModelfall back on all model API errors, not just HTTP status 400+ by @dsfaccini in #3494 - Don't skip model request when history ends on response but there are new instructions by @DouweM in #3509
- Revert "feat: enforce message history starts with user message" by @DouweM in #3508
- Don't send Google messages with 0 parts by @DouweM in #3511
- Immediately raise error when response is empty because of token limit by @DouweM in #3512
- Relax UserError into a warning when state deps is not provided with AG-UI by @MikeRyanDev in #3510
- Add type stubs for some third-party libraries by @lars20070 in #3443
- Add document to allowed
cacheable_typesfor anthropic by @marpulli in #3513 - Don't insert empty
ThinkingPartwhenGoogleresponse ends in text withthought_signatureby @DouweM in #3516 - Fix deprecated
GeminiModelstructured output and tool call thought signatures by @DouweM in #3517
New Contributors
Full Changelog: v1.21.0...v1.22.0
v1.21.0 (2025-11-20)
What's Changed
- Feature: MCP client Resources support by @fennb in #3024
- Expose MCP server instructions in
MCPServer.instructionsproperty by @mochow13 in #3431 - Add
BinaryContent.from_pathconvenience method by @dsfaccini in #3482 - Enforce message history starts with user message by @Pavanmanikanta98 in #3440
- Always strip Markdown fences from structured output by @DouweM in #3475
- Fix Gemini nested tool argument schemas by removing
titlefrom$defsby @conradlee in #3487 - Fix issue with Gemini and Prefect by removing unused
GoogleModel._urlby @DouweM in #3499
New Contributors
- @Pavanmanikanta98 made their first contribution in #3440
- @fennb made their first contribution in #3024
Full Changelog: v1.20.0...v1.21.0