Skip to content

Releases: pydantic/pydantic-ai

v1.22.0 (2025-11-21)

22 Nov 00:22
5544e9f

Choose a tag to compare

What's Changed

  • Add OpenRouterModel as OpenAIChatModel subclass with additional feature support by @ajac-zero in #3089
  • Make FallbackModel fall 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_types for anthropic by @marpulli in #3513
  • Don't insert empty ThinkingPart when Google response ends in text with thought_signature by @DouweM in #3516
  • Fix deprecated GeminiModel structured 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)

21 Nov 01:24
556ee09

Choose a tag to compare

What's Changed

  • Feature: MCP client Resources support by @fennb in #3024
  • Expose MCP server instructions in MCPServer.instructions property by @mochow13 in #3431
  • Add BinaryContent.from_path convenience 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 title from $defs by @conradlee in #3487
  • Fix issue with Gemini and Prefect by removing unused GoogleModel._url by @DouweM in #3499

New Contributors

Full Changelog: v1.20.0...v1.21.0

v1.20.0 (2025-11-18)

19 Nov 00:36
1b576dd

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v1.19.0...v1.20.0

v1.19.0 (2025-11-17)

18 Nov 00:47
e7b2f82

Choose a tag to compare

What's Changed

  • Let metadata be passed to CallDeferred and ApprovalRequired exceptions and end up on DeferredToolRequests by @cjohnhanson in #3345
  • Add AnthropicModel count_tokens and support UsageLimits.count_tokens_before_request by @nathan-gage in #3458
  • Fix bug with running graphs in temporal workflows by @dmontagu in #3460
  • Fix Gateway with Temporal by adding sniffio to sandbox passthrough modules by @DouweM in #3455
  • Fix Gateway links in code blocks by @NicolasPllr1 in #3444

New Contributors

Full Changelog: v1.18.0...v1.19.0

v1.18.0 (2025-11-14)

14 Nov 23:54
359c6d2

Choose a tag to compare

What's Changed

  • Add Anthropic prompt caching support by @ronakrm in #3363
  • Bump openai to v2.8.0 (v1 still supported), add GPT-5.1 to known model names by @DouweM in #3419
  • Bump google-genai to v1.50.1 and remove patches by @DouweM in #3340
  • Bump temporalio to v1.19.0 and use SimplePlugin by @DouweM in #3214

New Contributors

Full Changelog: v1.17.0...v1.18.0

v1.17.0 (2025-11-13)

14 Nov 00:26
6fe5146

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v1.16.0...v1.17.0

v1.16.0 (2025-11-13)

13 Nov 12:40
1df9ca6

Choose a tag to compare

What's Changed

  • refactor(gateway): add upstream_provider back by @Kludex in #3391

Full Changelog: v1.15.0...v1.16.0

v1.15.0 (2025-11-12)

13 Nov 00:53
365b67b

Choose a tag to compare

What's Changed

  • Wrap BedrockConverseModel errors in ModelHTTPError to work well with FallbackModel by @cjermain in #3377
  • Add unique run_id to run, run result, and message (request, response) classes by @adtyavrdhn in #3366
  • Add BedrockConverseModel.count_tokens so it works with UsageLimits.count_tokens_before_request by @DenysMoskalenko in #3367

Full Changelog: v1.14.1...v1.15.0

v1.14.1 (2025-11-11)

12 Nov 00:13
b8d2904

Choose a tag to compare

What's Changed

  • Fix Vercel AI tool input/output always showing up as a JSON string rather than object by @DouweM in #3399
  • Make ModelRetry hashable by @nathan-gage in #3394
  • Don't run CI steps that require secrets on PRs from fork branch to fork main by @lars20070 in #3385

New Contributors

Full Changelog: v1.14.0...v1.15.0

v1.14.0 (2025-11-10)

10 Nov 23:30
aa1fe33

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v1.13.0...v1.13.1