Releases: pydantic/pydantic-ai
Releases · pydantic/pydantic-ai
v1.0.0b1 (2025-08-30)
What's Changed
- Drop support for Python 3.9 by @Kludex in #2725
- Add support for human-in-the-loop tool call approval by @DouweM in #2581
- Deprecate
OpenAIModelProfile.openai_supports_sampling_settings
by @Kludex in #2730 - Gracefully handle errors in evals by @dmontagu in #2295
- Include logfire with pydantic-ai package by @Kludex in #2683
- Remove errors when passing Retrying instead of RetryConfig to TenacityTransport by @DouweM in #2717
- Default
InstrumentationSettings
version
to 2 by @alexmojaki in #2726 - Remove cases and averages from eval span by @DouweM in #2715
- Make many more dataclasses kw-only by @dmontagu in #2738
Full Changelog: v0.8.1...v1.0.0b1
v0.8.1 (2025-08-29)
What's Changed
- Add
gen_ai.system_instructions
attribute to agent run spans by @alexmojaki in #2699 - Bump
temporalio
to 1.16.0 by @DouweM in #2703 - Rename
StreamedRunResult
methods to be consistent withAgentStream
by @DouweM in #2692 - Deprecate specifying a model name without a provider prefix, and the
vertexai
provider name by @DouweM in #2711 - Rename
ModelResponse.provider_request_id
toprovider_response_id
by @DouweM in #2710 - docs: Add
message_history
parameter documentation for CLI methods by @ryx2 in #2695
Full Changelog: v0.8.0...v0.8.1
v0.8.0 (2025-08-26)
What's Changed
- Add elicitation callback support to MCP servers by @yamanahlawat in #2373
- Add
message_history
parameter toagent.to_cli()
by @ryx2 in #2674 - Properly deserialize complex tool arguments with Temporal by @DouweM in #2686
- Fix serialization / deserialization of
FileUrl.media_type
by @mwildehahn in #2677 - Handle missing token details in vLLM/OpenAI-compatible APIs by @DouweM in #2669
- Make AgentStreamEvent union of ModelResponseStreamEvent and HandleResponseEvent by @DouweM in #2689
Full Changelog: v0.7.6...v0.8.0
v0.7.6 (2025-08-26)
What's Changed
- Replace
all_messages_events
withpydantic_ai.all_messages
forInstrumentationSettings(version=2)
by @alexmojaki in #2658 - Fix inability to call response.raise_for_status in AsyncTenacityTransport by @dmontagu in #2668
- Deprecate
OpenAIModel
in favor ofOpenAIChatModel
by @Kludex in #2676 - anthropic: drop new lines on empty system prompt by @Kludex in #2678
- fix(bedrock): skip SystemPromptPart with empty content by @essamgouda97 in #2672
- BREAKING CHANGE: Fix tenacity implementation for improved retry behavior by @dmontagu in #2670
- Add Cerebras provider by @Kludex in #2643
New Contributors
- @essamgouda97 made their first contribution in #2672
Full Changelog: v0.7.5...v0.7.6
v0.7.5 (2025-08-25)
What's Changed
- Handle 'STOP' finish_reason in GeminiStreamedResponse by @ArneZsng in #2631
- Add
price()
method toModelResponse
by @Kludex in #2584 - Include thoughts tokens in output_tokens for Google models by @alexmojaki in #2634
- Add
span_id
andtrace_id
toEvaluationReport
by @Kludex in #2627 - Allow proper type on
AnthropicProvider
when using Bedrock by @akoshel in #2490 - Use new OpenTelemetry GenAI chat span attribute conventions by @alexmojaki in #2349
- Ensure
content
is always set for assistant tool call messages for OpenAI. by @vimota in #2641
New Contributors
- @ArneZsng made their first contribution in #2631
- @akoshel made their first contribution in #2490
- @vimota made their first contribution in #2641
Full Changelog: v0.7.4...v0.7.5
v0.7.4 (2025-08-20)
What's Changed
- Fix bug with google model safety handling by @dmontagu in #2066
- Add
takes_ctx
arg toTool.from_schema
by @dedeswim in #2615 - feat: support Google's url_context builtin tool by @vinnymeller in #2604
- Add missing UrlContextTool into all by @Kludex in #2617
- Drop assertion on Google streaming by @Kludex in #2618
New Contributors
- @dedeswim made their first contribution in #2615
- @vinnymeller made their first contribution in #2604
- @ivo-1 made their first contribution in #2610
Full Changelog: v0.7.3...v0.7.4
v0.7.3 (2025-08-19)
What's Changed
- Deprecate
Usage
in favour ofRequestUsage
andRunUsage
by @samuelcolvin in #2378 - Make
FallbackModel
accept string model names by @vikigenius in #2564 - Move
system_prompt_role
fromOpenAIModel
toOpenAIModelProfile
by @Kludex in #2573 - Add
/cp
command to CLI to copy last response to clipboard by @07pepa in #2386 - Pin temporalio to 1.15.0 as plugins API is still experimental by @DouweM in #2582
- Use
_provider.name
instead of_system
by @Kludex in #2596
New Contributors
- @vikigenius made their first contribution in #2564
- @07pepa made their first contribution in #2386
- @jscheel made their first contribution in #2576
- @cyonii made their first contribution in #2579
Full Changelog: v0.7.2...v0.7.3
v0.7.2 (2025-08-14)
What's Changed
- Let message history end on ModelResponse and execute pending tool calls by @DouweM in #2562
- Ignore leading whitespace when streaming from Qwen or DeepSeek by @DouweM in #2554
- Stop calling MCP server
get_tools
ahead ofagent run
span by @DouweM in #2545 - Remove anthropic-beta default header set in
AnthropicModel
by @jerry-reevo in #2544 - Add
OllamaProvider
by @DouweM in #2554 - Add
profile
andsettings
toHuggingfaceModel
by @DouweM in #2554 - Ask model to try again if it produced a response without text or tool calls, only thinking by @ethanabrooks in #2556
- Forward max_uses parameter to Anthropic WebSearchTool by @eballesteros in #2561
New Contributors
- @ethanabrooks made their first contribution in #2556
- @eballesteros made their first contribution in #2561
Full Changelog: v0.7.1...v0.7.2
v0.7.1 (2025-08-13)
What's Changed
- Add new OpenAI GPT-5 models by @medaminezghal in #2503
- Add support for OpenAI verbosity parameter in Responses API by @ryx2 in #2493
- Add support for
"openai-responses"
model inference string by @Kludex in #2528 - Add
UsageLimits.count_tokens_before_request
using Geminicount_tokens
API by @kauabh in #2137 - Fix
FallbackModel
to respect each model's model settings by @jerry-reevo in #2540
New Contributors
- @spike-spiegel-21 made their first contribution in #2529
- @ryx2 made their first contribution in #2493
Full Changelog: v0.7.0...v0.7.1
v0.7.0 (2025-08-12)
What's Changed
- Let Agent be run in a Temporal workflow by moving model requests, tool calls, and MCP to Temporal activities by @DouweM in #2225
- Let toolsets be built dynamically based on run context by @strawgate in #2366
- Add
event_stream_handler
to agent and run methods by @DouweM in #2458 - History processor replaces message history by @AlexEnrique in #2324
- Add
AbstractAgent
andWrapperAgent
by @DouweM in #2458 - Add
Agent.override(tools=...)
by @DouweM in #2458 - Bump mcp-run-python by @Kludex in #2470
- Fix error when using GPT-5 with a temperature setting by @DouweM in #2483
- Fix KeyError when parsing video metadata without audio track in Google models by @jerry-heygen in #2507
- Make OpenAIResponsesModelSettings.openai_builtin_tools work again by @DouweM in #2520
New Contributors
- @AlexEnrique made their first contribution in #2324
- @jerry-heygen made their first contribution in #2507
Full Changelog: v0.6.2...v0.7.0