Releases: pydantic/pydantic-ai
Releases · pydantic/pydantic-ai
v1.0.18 (2025-10-13)
What's Changed
- Add
render
method toEvaluationReport
class by @dmontagu in #3116 - Omit
previous_response_id
when unset instead of sendingnull
to OpenAI Responses by @DouweM in #3134 - Include all API docs in llms.txt by @DouweM in #3152
- Add anyio and httpcore to Temporal passthrough modules by @slumbi in #3147
- Add Nebius AI Studio provider support by @antoncp in #3124
- Add new
ToolCallPart.id
field for OpenAI Responses by @DouweM in #3151
New Contributors
- @slumbi made their first contribution in #3147
- @antoncp made their first contribution in #3124
- @desertaxle made their first contribution in #3074
Full Changelog: v1.0.17...v1.0.18
v1.0.17 (2025-10-09)
What's Changed
- Let
builtin_tools
be specified at agent run time by @safina57 in #3009 - Make
BinaryImage
work with inline-snapshot by @alexmojaki in #3125 - Document
InstrumentationSettings(version=3)
by @alexmojaki in #3127
Full Changelog: v1.0.16...v1.0.17
v1.0.16 (2025-10-08)
What's Changed
- Add support for datetime.time/timedelta to format_as_xml by @nurikk in #3087
- Ensure graph persistence snapshots are not mutated when run is resumed by @lienminhquang in #3077
- Use
Sequence[ModelMessage]
instead oflist
for method arg types by @moritzwilksch in #3040 - Let agent name be overridden contextually by @MinuraPunchihewa in #3094
- Respect
FileUrl.force_download
flag in OpenAI Chat and Responses models by @nicolas-chaulet in #3106 - Ensure
FileUrl
andBinaryContent
withoutidentifier
are valid by @DouweM in #3110 - Don't include ToolResultPart for external tool call when streaming by @DouweM in #3112
- Fix token usage for anthropic streaming by @alexmojaki in #3111 and #3115
- plain text docs, fix redirects and add logfire by @samuelcolvin in #3096
New Contributors
- @nurikk made their first contribution in #3087
- @lienminhquang made their first contribution in #3077
- @MinuraPunchihewa made their first contribution in #3094
- @nicolas-chaulet made their first contribution in #3106
Full Changelog: v1.0.15...v1.0.16
v1.0.15 (2025-10-03)
What's Changed
- Support image generation and output with Google and OpenAI by @DouweM in #2970
- Add
AgentRunResult.response
convenience method to get latest model response by @DouweM in #2970 - Add
ModelResponse.text
,thinking
,files
,images
,tool_calls
, andbuiltin_tool_calls
convenience methods by @DouweM in #2970 - Add
Agent.run_stream_events()
convenience method wrappingrun(event_stream_handler=...)
by @DouweM in #3084 - Add content (e.g. files) returned by tool to
FunctionToolResultEvent
by @DouweM in #3082 - Set
MCPServer
id
andtool_prefix
inload_mcp_servers
by @DouweM in #3052 - Add latest gemini 2.5 flash(-lite) model names and aliases by @moritzwilksch in #3060
- Support enums in
format_as_xml
by @DouweM in #3064 - Fix dataset serialization when inputs have discriminators with defaults by @DouweM in #3079
- Fix parallel tool call limit enforcement by @tradeqvest in #2978
Full Changelog: v1.0.14...v1.0.15
v1.0.14 (2025-10-02)
What's Changed
- Remove leftover debug
print
statement by @KostyaGukish in #3070 - Fix duplicate output tool return part when concatenating first run messages with follow-up
new_messages
by @DouweM in #3075
New Contributors
- @KostyaGukish made their first contribution in #3070
Full Changelog: v1.0.13...v1.0.14
v1.0.13 (2025-10-01)
What's Changed
- feat: Otel instrumentation version 3 by @bitnahian in #3021
- Don't send strict to HuggingFace API as it's not supported by their types and at least some models by @DouweM in #3062
- Correctly merge
Model.settings
withmodel_settings
in direct mode by @moritzwilksch in #2980 - Expose
server_info
inMCPServer
by @Whadup in #3055 - Support contextually overriding agent instructions by @mwildehahn in #2926
- Update evals attributes by @dmontagu in #2924
New Contributors
Full Changelog: v1.0.12...v1.0.13
v1.0.12 (2025-09-30)
What's Changed
- Support Anthropic built-in memory tool by @DouweM in #3042
- Support text, JSON, XML and YAML
DocumentUrl
andBinaryContent
on OpenAI by @pulphix in #2851 - Prefer
structuredContent
MCP tool result when present by @shaheerzaman in #2854 - Expose
.messages
,.toolsets
types in top-levelpydantic_ai
to aid IDE auto-import by @moritzwilksch in #2957 - Add cost metric to the pydantic-evals output by @dmontagu in #2984
- Add retry args to
pydantic_evals.Dataset.evaluate_sync
by @m7mdhka in #3022 - Change type of common_tools to work with agent with any deps type by @lukekh in #3037
- Don't error when Gemini returns more than one candidate response by @DouweM in #3043
- Handle Ollama responses without
finish_reason
and document Ollama Cloud by @DouweM in #3045 - Add custom Vertex AI Model Garden example by @stefannae in #2868
- Fix StructuredDict with nested JSON schemas using $ref by @ChiaXinLiang in #2570
New Contributors
- @m7mdhka made their first contribution in #3022
- @lukekh made their first contribution in #3037
- @pulphix made their first contribution in #2851
- @stefannae made their first contribution in #2868
- @ChiaXinLiang made their first contribution in #2570
Full Changelog: v1.0.11...v1.0.12
v1.0.11 (2025-09-29)
What's Changed
- Support OpenAI image detail on
ImageUrl
andBinaryContent
viavendor_metadata
by @moritzwilksch in #2987 - Support callable classes as history processors by @bitnahian in #2988
- Add
claude-sonnet-4-5
to known model names by @DouweM in #3033 - Add
operation.cost
metric to instrumented models by @alexmojaki in #3013 - Fix streaming gpt-oss using Ollama by @DouweM in #3035
- Raise error when using Anthropic thinking with output tools by @DouweM in #3025
- Make
OutputObjectDefinition
public onpydantic_ai.output
by @moritzwilksch in #2991 - Update
pyproject.toml
to be PEP639 compliant by @Kludex in #3001 - Bump temporalio to 1.18.0 by @DouweM in #3027
- Bump genai-prices to 0.0.28 by @DouweM in #3030
- Document that Gemini requires native or prompted output mode for structured output streaming by @DouweM in #3032
- Update Ollama docs instructions by @slkoo-cc in #2993
- Update docs and tests for DBOS v2.0 by @qianl15 in #3004
New Contributors
Full Changelog: v1.0.10...v1.0.11
v1.0.10 (2025-09-19)
What's Changed
- Fix OTel for built-in tools returning a list (e.g. Anthropic web search) by @DouweM in #2959
- Drop assertion that Google streaming chunk has candidates by @DouweM in #2960
- Retry model request that produced an empty response by @DouweM in #2961
- Clarify
Agent(retries=...)
description by @DouweM in #2963 - Stop redundantly encoding binary data as base64 when sending to Google genai SDK by @DouweM in #2962
- Use model class names as tags in
format_as_xml
and add option to include field titles and descriptions as attributes by @giacbrd in #2313
Full Changelog: v1.0.9...v1.0.10
v1.0.9 (2025-09-18)
What's Changed
- Stream built-in tool calls from OpenAI, Google, Anthropic and return them on next request (required for OpenAI reasoning) by @DouweM in #2877
- Include built-in tool calls and results in OTel messages by @DouweM in #2954
- Add
RunContext.max_retries
and.last_attempt
by @DouweM in #2952 - Fix
StreamedResponse.model_name
for Azure OpenAI with content filter by @DouweM in #2951 - Fix TemporalAgent dropping model-specific
ModelSettings
(e.g.openai_reasoning_effort
) by @DouweM in #2938 - Don't send item IDs to Responses API for non-reasoning models by @DouweM in #2950
- Update DBOS version by @qianl15 in #2939
Full Changelog: v1.0.8...v1.0.9