Releases: pydantic/pydantic-ai
Releases · pydantic/pydantic-ai
v0.3.0 (2025-06-18)
Breaking Changes
See #1142 — Adds support for thinking parts.
We now convert the thinking blocks ("<think>..."</think>"
) in provider specific text parts to
PydanticAI ThinkingPart
s. Also, as part of this release, we made the choice to not send back the
ThinkingPart
s to the provider - the idea is to save costs on behalf of the user. In the future, we
intend to add a setting to customize this behavior.
What's Changed
Full Changelog: v0.2.20...v0.3.0
v0.2.20 (2025-06-18)
What's Changed
- Handle
McpError
from MCP tool calls by @ppcantidio in #1999 - Add
process_tool_call
hook to MCP servers to modify tool args, metadata, and return value by @stevenh in #2000 - Respect
ModelSettings.timeout
inGoogleModel
by @DouweM in #2006 - feat: add
RunContext
support to history processors by @Wh1isper in #2002
New Contributors
- @ppcantidio made their first contribution in #1999
- @stevenh made their first contribution in #2000
Full Changelog: v0.2.19...v0.2.20
v0.2.19 (2025-06-16)
What's Changed
- Proper check if callable is async by @Kludex in #1972
- More flexible method infer_provider by @hovi in #1945
- Ignore dynamic instructions returning an empty string by @giacbrd in #1961
- uprev Pyodide to 0.27.6 by @samuelcolvin in #1944
- refactor: updated tools doc with function naming: roll_die → roll_dice by @yamanahlawat in #1986
- Set Anthropic
max_tokens
to 4096 by default by @Kludex in #1994 - feat: add
history_processors
parameter toAgent
for message processing by @Kludex in #1970 - Yield events for unknown tool calls by @proever in #1960
- Always set a parameters schema on a Gemini function declaration, even when it's an empty object by @DouweM in #1998
New Contributors
- @hovi made their first contribution in #1945
- @giacbrd made their first contribution in #1961
- @yamanahlawat made their first contribution in #1986
- @proever made their first contribution in #1960
Full Changelog: v0.2.18...v0.2.19
v0.2.18 (2025-06-13)
What's Changed
- Reuse last request from message history if no user prompt was provided by @DouweM in #1955
- Prevent Anthropic API errors from empty message content by @mike-luabase in #1934
- Add MCP Streamable HTTP implementation by @Kludex in #1965
- feat(openai): expose Responses API id as vendor_id by @sarunas-zebra in #1949
- Use
GoogleModel
instead ofGeminiModel
on inference by @Kludex in #1881
New Contributors
- @sarunas-zebra made their first contribution in #1949
Full Changelog: v0.2.17...v0.2.18
v0.2.17 (2025-06-12)
What's Changed
- Add token usage metrics to
InstrumentedModel
by @alexmojaki in #1898 - Add
service_tier
toOpenAIModelSettings
by @empezarcero in #1923 - Allow users to supply
httpx.AsyncClient
inMCPServerHTTP
by @mpfaffenberger in #1925 - Don't send sampling settings like
temperature
andtop_p
to OpenAI reasoning models by @DouweM in #1956 - Support field
fileData
(direct file URL) forGeminiModel
andGoogleModel
by @vricciardulli in #1136
New Contributors
- @Deriverx2 made their first contribution in #1946
- @amihalik made their first contribution in #1912
- @empezarcero made their first contribution in #1923
- @mpfaffenberger made their first contribution in #1925
Full Changelog: v0.2.16...v0.2.17
v0.2.16 (2025-06-08)
What's Changed
- Stop sharing tool retry count across all runs of the same agent by @dmontagu in #1918
- Add support for
HerokuProvider
by @Kludex in #1933 - Add
stop_sequences
to Google models by @Kludex in #1935 - Handle model response timestamps in milliseconds rather than seconds by @DouweM in #1937
- Add convenience method to use LangChain community tools by @matthewfranglen in #1832
- Infer the right type on output when callables are provided by @Kludex in #1931
- Revert pyodide to a version that doesn't print to stdout when installing packages by @samuelcolvin in #1930
New Contributors
- @matthewfranglen made their first contribution in #1832
Full Changelog: v0.2.15...v0.2.16
v0.2.15 (2025-06-05)
What's Changed
Full Changelog: v0.2.14...v0.2.15
v0.2.14 (2025-06-03)
What's Changed
Full Changelog: v0.2.13...v0.2.14
v0.2.13 (2025-06-03)
What's Changed
- Make parallel_evaluation_example more robust by @DouweM in #1861
- Ensure tool call parts with custom argument model validation errors are serializable by @DouweM in #1862
- Add option to pass expected output to LLMJudge by @hinnefe2 in #1853
- Fix unexpected part error when Google model returns empty text delta by @Blue9 in #1875
- Generate ToolCallPart.tool_call_id when OpenAI-compatible API returned an empty string by @DouweM in #1892
- docs: Fix import for BaseModel in graph example code by @briann in #1894
- Add new _GeminiThoughtPart to adhere to Gemini response by @dnouri in #1897
New Contributors
- @hinnefe2 made their first contribution in #1853
- @Blue9 made their first contribution in #1875
- @briann made their first contribution in #1894
- @dnouri made their first contribution in #1897
Full Changelog: v0.2.12...v0.2.13
v0.2.12 (2025-05-29)
What's Changed
- Add
vendor_id
andvendor_details.finish_reason
to Gemini/Google model responses by @davide-andreoli in #1800 - Fix units of
sse_read_timeout
timedelta
by @alexmojaki in #1843 - Support functions as
output_type
, as well as lists of functions and other types by @DouweM in #1785 - Enhance Gemini usage tracking to collect comprehensive token data by @kiqaps in #1752
- docs: add scope when loading credentials from file in google by @Kludex in #1850
- Add support for Claude 4 Sonnet and Opus models in Bedrock by @samtin0x in #1838
- Add
ModelProfile
to let model-specific behaviors be configured independent of the model class by @DouweM in #1835 - Add new provider classes for Together AI, Fireworks AI, and Grok with automatic model profile selection by @DouweM in #1842
- Fix weather agent example with UI by @vp777 in #1851
New Contributors
- @davide-andreoli made their first contribution in #1800
- @samtin0x made their first contribution in #1838
- @vp777 made their first contribution in #1851
Full Changelog: v0.2.11...v0.2.12