Releases: pydantic/pydantic-ai
Releases ยท pydantic/pydantic-ai
v0.2.7 (2025-05-24)
What's Changed
- Support streaming tool calls from models that pass args as None when there are no function parameters by @DouweM in #1802
- Stream tool calls and structured output from Anthropic as it's received instead of in one go by @DouweM in #1669
- Remove hardcoded
n
parameter from OpenAIModel requests by @kiqaps in #1807 - Add
tool_prefix
option to MCP servers and error on conflicting tool names by @Wh1isper in #1266 - Allow
RunContext
to not be documented whenrequire_parameter_descriptions=True
as it's not passed to the model anyway by @Kevsnz in #1750 - Clean up dataclasses reprs by @dmontagu in #1812
- Addition: Make
prog_name
customizable by @fswair in #1804 - Use
AsyncBeta
instead ofAsyncAnthropic
by @Kludex in #1818
New Contributors
- @kiqaps made their first contribution in #1807
- @Kevsnz made their first contribution in #1750
- @fswair made their first contribution in #1804
Full Changelog: v0.2.6...v0.2.7
v0.2.6 (2025-05-20)
What's Changed
- Add
prepare_tools
param to Agent class by @rmaceissoft in #1474 - fix: remove forgotten print on
GoogleModel
by @Kludex in #1780 - fasta2a: be more strict on agent card by @Kludex in #1781
- fix: rename
prepare_tools
to_prepare_tools
by @Kludex in #1789 - fix: create prompt history file when using
Agent.to_cli()
by @Kludex in #1791 - fix: add
'openrouter'
string toOpenAIModel
provider param by @Kludex in #1792
New Contributors
- @rmaceissoft made their first contribution in #1474
Full Changelog: v0.2.5...v0.2.6
v0.2.5 (2025-05-20)
What's Changed
- fasta2a: make
capabilities
required onAgentCard
by @Kludex in #1733 - Fix formatting of ints in eval reports by @dmontagu in #1738
- Bugfix: record instructions properly on agent run span when using structured output by @dmontagu in #1740
- Add ability to specify the evaluation name for all provided Evaluators by @dmontagu in #1725
- Add
include_binary_content
flag toInstrumentationSettings
, rename OTel attribute key fromcontent
tobinary_content
forBinaryPart
s by @alexmojaki in #1739 - Add logprobs to OpenAI model settings and response by @eliassoares in #1238
- Added
vendor_id
to the model response. by @peterHoburg in #1547 - Fix ImportError when opentelemetry is not installed by @dmontagu in #1773
- Add licenses to all packages. by @tobiasraabe in #1775
- Add OpenRouter provider by @Kludex in #1778
- Add Google GenAI provider by @Kludex in #1751
New Contributors
- @eliassoares made their first contribution in #1238
- @peterHoburg made their first contribution in #1547
- @iandolge made their first contribution in #1762
- @tobiasraabe made their first contribution in #1775
Full Changelog: v0.2.4...v0.2.5
v0.2.4 (2025-05-14)
What's Changed
clai
should not requireOPENAI_API_KEY
by @samuelcolvin in #1724
New Contributors
Full Changelog: v0.2.3...v0.2.4
v0.2.3 (2025-05-13)
What's Changed
- cli: add current path to
sys.path
by @Kludex in #1703 - evals: use the correct render object on
include_metadata
andinclude_expected_output
by @lionpeloux in #1700 - Add A2A server by @Kludex in #1537
- Allow definition of Model Settings for LLMJudge by @assadyousuf in #1662
- improve messages coverage by @samuelcolvin in #1704
- Add
direct
public API by @samuelcolvin in #1599 - Ensure CLI prompt history directory and file exist before usage by @zboyles in #1707
New Contributors
- @lionpeloux made their first contribution in #1700
- @assadyousuf made their first contribution in #1662
- @zboyles made their first contribution in #1707
Full Changelog: v0.2.2...v0.2.3
v0.2.2 (2025-05-13)
What's Changed
- Add
to_cli()
method toAgent
by @AndrewHannigan in #1642
New Contributors
- @AndrewHannigan made their first contribution in #1642
Full Changelog: v0.2.1...v0.2.2
v0.2.1 (2025-05-13)
What's Changed
- Add AWS Profile Feature by @prescod in #1634
- Change Agent.is_?_node() to use TypeIs instead by @chasewalden in #1622
- Add newline separation between Anthropic system prompts by @timesler in #1638
- cli: store prompt and config under
~/.pydantic-ai
by @Kludex in #1701 - otel: send
BinaryContent
information by @Kludex in #1603
New Contributors
- @prescod made their first contribution in #1634
- @chasewalden made their first contribution in #1622
Full Changelog: v0.2.0...v0.2.1
v0.2.0 (2025-05-12)
Breaking Changes
See #1647 โ usage makes sense as part of ModelResponse
, and could be really useful in "messages" (really a sequence of requests and response). In this PR:
- Adds
usage
toModelResponse
(field has a default factory ofUsage()
so it'll work to load data that doesn't have usage) - changes the return type of
Model.request
to justModelResponse
instead oftuple[ModelResponse, Usage]
Other Changes
- Add support for non-string enums in Gemini by @zaidhaan in #1564
- Fix parallel tool calls on Bedrock with Nova and Claude models by @pandersen-uncharted in #1656
- Fix Anthropic streaming by @samuelcolvin in #1686
- Fix serializability of ModelRequestParameters by @dmontagu in #1690
- Stop incorrectly treating side-by-side JSON schema $refs as recursion by @DouweM in #1697
- Set
ToolCallPartDelta.tool_call_id
when known from previous delta by @DouweM in #1694
New Contributors
Full Changelog: v0.1.11...v0.2.0
v0.1.11 (2025-05-10)
v0.1.10 (2025-05-06)
What's Changed
- Allow setting
temperature
to 0 onBedrockConverseModel
by @pandersen-uncharted in #1631 - Add
extra_headers
toModelSettings
by @ramanan-ravi in #1644 - Add
thinking_config
toGeminiModel
by @Kludex in #1609
New Contributors
- @pandersen-uncharted made their first contribution in #1631
- @ramanan-ravi made their first contribution in #1644
Full Changelog: v0.1.9...v0.1.10