Releases: pydantic/pydantic-ai
Releases · pydantic/pydantic-ai
v0.4.6 (2025-07-23)
What's Changed
- Enable URL and binary PDF for Mistral by @pintaf in #2267
- Fix pydantic-evals panel rendering with evaluators by @dmontagu in #2274
- Fix mp3 handling by @dmontagu in #2279
- Handle built-in tool errors better in tool registration by @fswair in #2252
- fix: use
FileUrl.format
to find the extension by @Kludex in #2280 - Correct code snippet for native output by @minhduc0711 in #2271
- chore: simplify output function call with model retry by @bitnahian in #2273
- Reduce duplication between StreamedRunResult and AgentStream by @DouweM in #2275
- chore: add
CLAUDE.md
by @Kludex in #2281 - Speed up function
_estimate_string_tokens
by @misrasaurabh1 in #2156
New Contributors
- @minhduc0711 made their first contribution in #2271
- @pintaf made their first contribution in #2267
Full Changelog: v0.4.5...v0.4.6
v0.4.5 (2025-07-22)
What's Changed
- Add
async with self
inagent_to_a2a
by @Kludex in #2266 - Fix include_content not working as expected by @adtyavrdhn in #2206
- Support streamable HTTP in mcp-run-python by @Kigstn in #2230
- change
format_as_xml
defaults by @samuelcolvin in #2228 - Fix LLMJudge input handling to preserve BinaryContent as separate message part instead of stringifying by @adtyavrdhn in #2173
- validate OpenAI responses by @samuelcolvin in #2226
- Remove duplicate field on GeminiModelSettings by @strawgate in #2269
- Fix AG-UI shared state example by @stevenh in #2272
New Contributors
- @Kigstn made their first contribution in #2230
- @strawgate made their first contribution in #2269
Full Changelog: v0.4.4...v0.4.5
v0.4.4 (2025-07-18)
What's Changed
- Add Toolsets and Deferred Tools by @DouweM in #2024
- Support AG-UI protocol for frontend-agent communication by @stevenh in #2223
- Add identifier field to BinaryContent class by @GDaamn in #2231
- Add OpenAI models o1-pro, o3-pro, o3-deep-research, computer-use by @zachmayer in #2234
- Add grok-4 and groq kimi-k2 models by @zachmayer in #2235
- Remove old Google models by @DouweM in #2220
- Change clai default model to gpt-4.1 by @samuelcolvin in #2227
- Fix VertexAI Empty Model Parts Error by @caesarnine in #2203
- Remove incorrect tool call id from OpenAI tool call delta by @naveen-corpusant in #2210
- Speed up method
AgentRunResult._set_output_tool_return
by 18798% by @misrasaurabh1 in #2196 - Speed up method
Usage.opentelemetry_attributes
by 85% by @misrasaurabh1 in #2198 - Nicer errors under the capture_run_messages context by @alonme in #2219
New Contributors
- @naveen-corpusant made their first contribution in #2210
- @caesarnine made their first contribution in #2203
- @GSemikozov made their first contribution in #2193
- @alonme made their first contribution in #2219
- @GDaamn made their first contribution in #2231
Full Changelog: v0.4.3...v0.4.4
v0.4.3 (2025-07-16)
What's Changed
- Include content.1571 by @adtyavrdhn in #2180
duckduckgo-search
is renamed toddgs
by @basnijholt in #2172- Add base64 encoding to
tool_return_ta
by @adtyavrdhn in #2186 - Bugfix: avoid race condition when refreshing google token by @JadHADDAD92 in #2100
- feat: Add output function tracing by @bitnahian in #2191
- Add Hugging Face as a provider by @hanouticelina in #1911
New Contributors
- @mmabrouk made their first contribution in #2192
- @basnijholt made their first contribution in #2172
- @JadHADDAD92 made their first contribution in #2100
- @bitnahian made their first contribution in #2191
- @hanouticelina made their first contribution in #1911
Full Changelog: v0.4.2...v0.4.3
v0.4.2 (2025-07-10)
What's Changed
- Let model
settings
be passed to model classes by @svilupp in #2136 - Add
StructuredDict
for structured outputs with custom JSON schema by @fswair in #2157 - Handle DeepSeek reasoning_content in streamed responses by @tarruda in #2174
- Drop FastA2A from PydanticAI repository by @Kludex in #2171
- Fix type annotations for
Agent.iter()
by @erosennin in #2168 - Fix chat-app example doc - python code appear twice by @itayB in #2169
- Speed up function
_ensure_decodeable
by 634% by @misrasaurabh1 in #2155
New Contributors
- @misrasaurabh1 made their first contribution in #2155
- @erosennin made their first contribution in #2168
- @itayB made their first contribution in #2169
- @tarruda made their first contribution in #2174
Full Changelog: v0.4.1...v0.4.2
v0.4.1 (2025-07-08)
What's Changed
- Support evaluating sync tasks by @dmontagu in #2150
- Upgrade a2a to spec v0.2.5 by @physicsrob in #2144
- Drop FastA2A as PydanticAI dependency by @Kludex in #2164
New Contributors
- @physicsrob made their first contribution in #2144
Full Changelog: v0.4.0...v0.4.1
v0.4.0 (2025-07-08)
What's Changed
- BREAKING CHANGE: Make
EvaluationReport
andReportCase
into generic dataclasses by @dmontagu in #1799 - Make
ToolDefinition.description
optional and fix Bedrock description handling by @dmontagu in #1507 - Add all audio types supported by Gemini to AudioUrl by @ChenghaoMou in #2151
- Improve number_to_datetime performance by building TypeAdapter only once by @DouweM in #2153
- Retain defaults in non-strict openai schemas by @dmontagu in #1519
Full Changelog: v0.3.7...v0.4.0
v0.3.7 (2025-07-07)
What's Changed
- Make
AgentStream.stream_output
(available insideagent.iter
) stream validated output data instead of raising validation errors by @DouweM in #2134 - Add
model_request_stream_sync
to direct API by @hewliyang in #2116 - Add GitHub Models provider by @sgoedecke in #2114
- Added support for google specific arguments for video analysis by @Sumered in #2110
- Implemented a convenient way to use ACI.dev Tools in PydanticAI by @Kamal-Moha in #2093
- Fix list rendering in documentation by @Viicos in #2145
- Raise consistent deprecation warnings by @Viicos in #2148
- Move docstring warning of model settings as a comment by @Viicos in #2146
New Contributors
- @hewliyang made their first contribution in #2116
- @sgoedecke made their first contribution in #2114
- @Kamal-Moha made their first contribution in #2093
- @Sumered made their first contribution in #2110
Full Changelog: v0.3.6...v0.3.7
v0.3.6 (2025-07-04)
What's Changed
- Deprecate
{FunctionToolCallEvent,FunctionToolResultEvent}.call_id
in favor oftool_call_id
by @proever in #2028 - Indicate to the model that a
RetryPromptPart
not tied to a tool call contains validation feedback rather than a user message by @hovi in #2008 - Update starlette subdomain in docs by @alDuncanson in #2099
- Update client.md - Typo by @kauabh in #2105
- Add support for predicted outputs in OpenAIModelSettings by @webholics in #2106
- Record tool response in tool run span by @alexmojaki in #2109
- Use contextvars for agent overriding, rather than a local attribute by @dmontagu in #2118
- Fix model parameters not being customized in fallback model request stream by @almeidaalajoel in #2120
- simplify weather example by @samuelcolvin in #2129
New Contributors
- @alDuncanson made their first contribution in #2099
- @webholics made their first contribution in #2106
- @almeidaalajoel made their first contribution in #2120
Full Changelog: v0.3.5...v0.3.6
v0.3.5 (2025-06-30)
What's Changed
- Add progress bar on evaluate by @davide-andreoli in #1871
- Fix deprecation warning under Pydantic 2.11 by @medaminezghal in #2076
- fix: async fixtures in conftest.py by @stevenh in #2068
- fix: docs examples python version in tests by @stevenh in #2069
- Set 'us-central1' by default on
GoogleProvider
by @Kludex in #2031 - Move
ThinkingPart
to preceedTextPart
inOpenAIResponsesModel
by @Kludex in #2043 - Fix deprecated kwargs validation to prevent silent failures by @svilupp in #2047
- Support strict mode in NativeOutput by @severinh in #2084
- Let tools return ToolReturn to pass additional content to model, or attach metadata that's not passed to the model by @Wh1isper in #2060
- Add ability to include snippets in docs with inline-named sections for fragments and highlighting by @dmontagu in #2088
- Add Slack Lead Qualifier example by @DouweM in #2079
New Contributors
- @medaminezghal made their first contribution in #2076
- @svilupp made their first contribution in #2047
- @severinh made their first contribution in #2084
Full Changelog: v0.3.4...v0.3.5