Releases: pydantic/pydantic-ai
Releases Β· pydantic/pydantic-ai
v0.5.0 (2025-08-04)
What's Changed
- Breaking Change: The
EvaluationReport.print
andEvaluationReport.console_table
methods now require most arguments be passed by keyword. by @dmontagu in #2163 - Breaking Change: The
source
field of anEvaluationResult
is now of typeEvaluatorSpec
rather than the actual sourceEvaluator
instance, to help with serialization/deserialization by @dmontagu in #2388 - Let more
BaseModel
s use OpenAI strict JSON mode by defaulting toadditionalProperties=False
by @DouweM in #2419 - Allow string format, pattern and others in OpenAI strict JSON mode by @DouweM in #2420
- Include default values in tool arguments JSON schema by @DouweM in #2418
- Fix ImageUrl, VideoUrl, AudioUrl and DocumentUrl not being serializable by @DouweM in #2422
- Fix
test_download_item_no_content_type
test failing on macOS by @strawgate in #2404 - Document performance implications of async vs sync tools by @GuillermoBlasco in #2298
- Document that tools become toolset internally by @HamzaFarhan in #2395
- docs: add missing optional packages in
install.md
by @Kludex in #2412
New Contributors
- @GuillermoBlasco made their first contribution in #2298
Full Changelog: v0.4.11...v0.5.0
v0.4.11 (2025-08-01)
What's Changed
- Add convenience functions to handle AG-UI requests with request-specific deps by @DouweM in #2397
- Support custom thinking tags specified on the model profile by @xjose97x in #2364
- Rename gemini-2.5-flash-lite-preview-06-17 to gemini-2.5-flash-lite as it's out of preview by @ethan01x in #2387
- Fix toggleable toolset example so toolset state is not shared across agent runs by @DouweM in #2396
- Docs: add an example of using RunContext to pass data among tools by @tonyxwz in #2316
New Contributors
- @tonyxwz made their first contribution in #2316
- @ethan01x made their first contribution in #2387
- @xjose97x made their first contribution in #2364
Full Changelog: v0.4.10...v0.4.11
v0.4.10 (2025-07-30)
What's Changed
- Fix parallel tool calling with tools returning ToolReturn with content by @DouweM in #2365
- Always enter Toolset context when running agent by @strawgate in #2361
- Add
priority
service_tier
toOpenAIModelSettings
and respect it inOpenAIResponsesModel
by @akenarsari in #2368 - Add HTTP Referer request header to Vercel AI Gateway provider by @joshualipman123 in #2369
New Contributors
- @akenarsari made their first contribution in #2368
Full Changelog: v0.4.9...v0.4.10
v0.4.9 (2025-07-28)
What's Changed
- Ensure AG-UI state is isolated between requests by @DouweM in #2343
- Refine retry logic for parallel tool calling by @DouweM in #2317
- Fix AgentStream.stream_output and StreamedRunResult.stream_structured with output tools by @DouweM in #2314
- Allow
default
in tool schema with Gemini by @strawgate in #2309
Full Changelog: v0.4.8...v0.4.9
v0.4.8 (2025-07-28)
What's Changed
- Add tenacity utilities/integration for improved retry handling by @dmontagu in #2282
- fix: close initialized MCP server if any MCP server fails to initalize by @hartungstenio in #2312
- Adding thinkingpart to otel_events in ModelResponse by @adtyavrdhn in #2237
- Fix: TypeError in MCPServerSSE due to improper initialization by @tradeqvest in #2319
- Fix: AG-UI assistant text and tool call order by @ChuckJonas in #2328
New Contributors
- @hartungstenio made their first contribution in #2312
- @tradeqvest made their first contribution in #2319
- @ChuckJonas made their first contribution in #2328
Full Changelog: v0.4.7...v0.4.8
v0.4.7 (2025-07-24)
What's Changed
- Add MoonshotAI provider with Kimi-K2 model support by @zachmayer in #2211
- Add Vercel AI Gateway provider by @joshualipman123 in #2277
- Support passing files uploaded to Gemini Files API and setting custom media type by @dprov in #2270
- Parse '' tags in streamed text as thinking parts by @DouweM in #2290
- Rename
MCPServer
sse_read_timeout
toread_timeout
and pass toClientSession
by @AntSan813 in #2240 - Update cohere and MCP, add support for MCP ResourceLink returned from tools by @medaminezghal in #2094
- Ignore empty text alongside tool calls when streaming from Ollama by @DouweM in #2286
- Ignore leading whitespace when streaming text, fixing run_stream + Ollama + Qwen3 by @DouweM in #2294
- Fix AG-UI parallel tool calls by @DouweM in #2301
- Fix initial tool call args not being streamed with AG-UI by @DouweM in #2303
- Handle
None
created
timestamp coming from OpenRouter API by @R0boji in #2247 - Update MCP docs to show you can pass ssl options via the http_client arg by @assadyousuf in #2214
- Include ThinkingPart in messages.md API documentation graph by @lfloeer in #2299
New Contributors
- @R0boji made their first contribution in #2247
- @AntSan813 made their first contribution in #2240
- @joshualipman123 made their first contribution in #2277
- @dprov made their first contribution in #2270
Full Changelog: v0.4.6...v0.4.7
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