unstale

pypi / pydantic-ai-slim

pydantic-ai-slim

What changed in pydantic-ai-slim 1 to 2, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-21.

7 breaking16 security21 new APIs and options3 performance11 behavior and defaults57 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli 0.2.1 on npm

pydantic-ai-slim 2110 changes

Breaking changes 7

  • Escapes tool names in discovery announcements and no longer recognizes announcements by their text.

    2.58.0release notes

  • Events are emitted after store reads so DBOS recovery with an event_stream_handler replays in order; existing workflows may not recover after upgrading.

    2.58.0release notes

  • A GPT-Live connection drop without a reconnect policy raises RealtimeError instead of a raw websockets exception.

    2.58.0release notes

  • Now aligns with the exchange boundary that wait_for_reply() waits for; use PartEndEvents to react when a particular response ends.

    2.58.0release notes

  • Raises instead of returning a response when a model request hook rejects with ModelRetry.

    2.58.0release notes

  • A resumed 'suspended' response's usage is counted only in the run that produced it.

    2.58.0release notes

  • Native tool_search is no longer granted to this model.

    2.57.0release notes

Security 11

  • Provider-native MCP configuration no longer exposes server URLs, authorization tokens, or custom header values in OpenTelemetry request traces; URL-based MCP capabilities also no longer expose URL-embedded credentials in identifiers.

    1.107.8, 2.58.0release notesrelease notes

  • Vercel AI and AG-UI adapters no longer execute available tools with client-chosen arguments when server-side message history is non-empty and the system prompt is server-managed.

    2.58.0release notes

  • Pydantic AI: Concurrency-limited models can keep their slot when a streamed request ends early

    2.53.0security advisory

  • Pydantic AI: Excessive resource use when local web fetching converts nested HTML

    1.107.7, 2.52.0security advisory

  • Pydantic AI: Event loop blocked by quadratic title extraction in web_fetch

    1.107.6, 2.44.0security advisory

  • Pydantic AI OpenTelemetry instrumentation: exception events on tool and agent run spans include content when include_content=False

    1.107.6, 2.44.0security advisory

  • Pydantic AI: SSRF cloud-metadata blocklist bypass via IPv6 zone identifiers

    1.107.6, 2.44.0security advisory

  • Pydantic AI Web chat UI (Agent.to_web(), clai web): the local chat endpoint does not validate the Host header

    1.107.5, 2.30.0security advisory

  • Pydantic AI Web chat UI (Agent.to_web(), clai web): a website visited by the developer can trigger agent runs and server-side tool execution on the local chat endpoint

    1.107.4, 2.28.0security advisory

  • Pydantic AI OpenTelemetry instrumentation: retry prompt content is not redacted when include_content=False

    1.107.4, 2.27.1security advisory

  • Pydantic AI: Unbounded memory use when downloading remote content via web_fetch or FileUrl

    1.107.2, 2.24.0security advisory

New APIs and options 21

  • Steers a running delegated task.

    2.58.0release notes

  • UI adapter dispatch_request() accepts timeout=.

    2.58.0release notes

  • Runs realtime sessions on ElevenLabs Agents.

    2.58.0release notes

  • Sets how many times the provider SDK retries a request.

    2.58.0release notes

  • Sets a timeout covering all attempts and stream consumption of one model request.

    2.58.0release notes

  • Adds a provider that lets app users sign in with ChatGPT and use their plan.

    2.58.0release notes

  • Deletes answered tool rounds from the OpenAI Realtime conversation.

    2.58.0release notes

  • Requests reasoning summaries from the GPT-Live backend.

    2.58.0release notes

  • RealtimeConnection yields lifecycle events through this public module.

    2.58.0release notes

  • UI adapter run_stream_native() accepts timeout=.

    2.58.0release notes

  • UI adapter run_stream() accepts timeout=.

    2.58.0release notes

  • Provides the deadline for a run bounded with timeout=.

    2.58.0release notes

  • Set unknown_names='skip' to ignore include and exclude names that no library has.

    2.58.0release notes

  • Request-scoped system prompts are sent natively as Anthropic clear_at system messages.

    2.58.0release notes

  • Bounds a whole agent run.

    2.58.0release notes

  • Any module can define a ToolKind with typed tool parts, and unknown kinds remain loadable.

    2.58.0release notes

  • Adds a Harness reviewer that lets a model approve low-risk tool calls before a person sees them.

    2.57.0release notes

  • Adds dataset_name to EvaluationReport.

    2.57.0release notes

  • Adds a method to relay MCP Apps tool calls.

    2.57.0release notes

  • Adds read_resource_contents and forwards MCP Apps tool results to AG-UI and Vercel AI frontends.

    2.57.0release notes

  • Adds MetaProvider for Meta Muse models, with meta: using the Responses API.

    2.57.0release notes

Performance 3

  • Stores each message once instead of repeating history in every snapshot.

    2.58.0release notes

  • Stores each message once instead of repeating history in every snapshot.

    2.58.0release notes

  • Stores each message once instead of repeating history in every snapshot.

    2.58.0release notes

Behavior and default changes 11

  • The profile's supports_auto_cache decides whether automatic Anthropic caching is used; legacy AsyncAnthropicBedrock uses it for Claude Opus 4.7 and later.

    2.58.0release notes

  • Enqueued messages stream to Vercel AI and AG-UI frontends as history they send back but do not render.

    2.58.0release notes

  • WarnNearLimits warnings are sent as request-scoped system prompts.

    2.58.0release notes

  • With Temporal tracing enabled, pass an explicit id= to URL-based MCP after in-flight workflows complete; changing it renames the activities.

    2.58.0release notes

  • A native tool is treated as unsupported when the model cannot apply its domain, usage, or external web access settings.

    2.58.0release notes

  • Can return images and PDFs, and describes other binary files.

    2.58.0release notes

  • Warns when a model ignores settings such as timeout, max_retries, or stop_sequences.

    2.58.0release notes

  • BackgroundTools completions now receive namespaced origin and tool_call_id metadata.

    2.57.0release notes

  • Realtime history, usage, and reply waits now come from the session core.

    2.57.0release notes

  • Realtime history, usage, and reply waits now come from the session core.

    2.57.0release notes

  • Requests are priced at their reported service tier.

    2.57.0release notes

Fixes and other changes 57

  • Streams returns of tool calls skipped after a final result to AG-UI frontends.

    2.58.0release notes

  • Preserves separate UserPromptParts through a round trip.

    2.58.0release notes

  • Ignores deeply nested ReasoningMessage.encrypted_value JSON.

    2.58.0release notes

  • Fixes UseEnumMemberDocstrings enums, Choices, and BoolCriteria failing in strict schemas.

    2.58.0release notes

  • Uses automatic prompt caching through anthropic_cache.

    2.58.0release notes

  • Fixes tool_choice='none' failing after a tool call.

    2.58.0release notes

  • Clears tool results in batches instead of on every request past the threshold.

    2.58.0release notes

  • Resolves the default output mode once per run so toggling thinking per step keeps tools stable.

    2.58.0release notes

  • Falls back on stream errors raised before the first event.

    2.58.0release notes

  • Writes mapping keys that are not valid XML names to a key attribute.

    2.58.0release notes

  • No longer return DeferredToolRequests to a parent that cannot resolve them.

    2.58.0release notes

  • Closes the AsyncInferenceClient it builds when the provider or agent exits.

    2.58.0release notes

  • Rewrites nested $refs when merging JSON schema definitions.

    2.58.0release notes

  • Walks propertyNames and contains when inlining JSON Schema definitions.

    2.58.0release notes

  • Forces a single tool natively instead of filtering tools.

    2.58.0release notes

  • Sends tool results in call order so UI round trips keep the prompt cache.

    2.58.0release notes

  • Adds a tool-call ID length profile setting and rewrites IDs rejected by Mistral models.

    2.58.0release notes

  • Keeps an unsaved token refresh instead of reverting to stored credentials it spent.

    2.58.0release notes

  • Stops continuing an OpenAI response once its preceding history or the response itself has changed.

    2.58.0release notes

  • Ends a response created without an id when a malformed response.done closes it.

    2.58.0release notes

  • Processes streamed responses as well.

    2.58.0release notes

  • A realtime reply cut off by the user is recorded as interrupted after generation finishes, and seeded interrupted speech is marked.

    2.58.0release notes

  • Updates together with the usage it reports.

    2.58.0release notes

  • Replacing the client's system prompt no longer removes mid-run system prompts.

    2.58.0release notes

  • Escapes context-file blocks and sends the nested-directory pointer as a SystemPromptPart.

    2.58.0release notes

  • Labels a symlinked instruction file with its target's name, so CLAUDE.md -> AGENTS.md reads AGENTS.md.

    2.58.0release notes

  • Keeps every usage counter so durable runs retain one-hour cache writes and reasoning tokens; declares cache_write_1h_tokens and output_reasoning_tokens.

    2.58.0release notes

  • A resumed 'suspended' response's usage is counted only in the run that produced it.

    2.58.0release notes

  • Non-native ThinkingParts are carried in a user turn for models that imitate assistant formatting.

    2.58.0release notes

  • Sends tool-call arguments as compact JSON so UI round trips keep the prompt cache.

    2.58.0release notes

  • Preserves tools reveals when a Vercel AI frontend rebuilds history from the event stream.

    2.58.0release notes

  • A resumed 'suspended' response's usage is counted only in the run that produced it.

    2.58.0release notes

  • Streams returns of tool calls skipped after a final result to Vercel AI frontends.

    2.58.0release notes

  • Keeps parallel tool calls in one ModelResponse when loading messages.

    2.58.0release notes

  • Preserves separate UserPromptParts through a round trip.

    2.58.0release notes

  • No longer waits forever when a realtime tool batch receives no reply after a call is cancelled.

    2.58.0release notes

  • Waits between continuation polls are durable DBOS.sleep steps under DBOSDurability and DBOSAgent.

    2.57.0release notes

  • Warns when response handlers are skipped on a streamed request.

    2.57.0release notes

  • GoogleModel now supports Gemini agentic media processing.

    2.57.0release notes

  • A backend response that ends while the session closes is now counted as a request.

    2.57.0release notes

  • Closes the HTTP client for a model built from a model name and reuses one client per name inside async with agent.

    2.57.0release notes

  • Gemini tool-call thought signatures are now sent back from OpenAIChatModel.

    2.57.0release notes

  • In default 'auto' mode, current-turn tool calls now receive an empty thinking field when needed.

    2.57.0release notes

  • Unavailable tool_choice names are no longer sent in allowed_tools.

    2.57.0release notes

  • Planning tool loops remain in the prompt cache, and a leading CachePoint is attached to the previous user message.

    2.57.0release notes

  • Cleanup is awaited after early exit and cancellation.

    2.57.0release notes

  • Realtime output now records and streams one part per output item even when its transcript arrives late.

    2.57.0release notes

  • Run context copies inside Temporal activities and Render child tasks retain available_tool_names and active_capability_ids.

    2.57.0release notes

  • Skills now honor disable-model-invocation and user-invocable, and skip stray skill library paths.

    2.57.0release notes

  • The partial response of an interrupted stream is now charged.

    2.57.0release notes

  • Concurrency slots are released after streamed request cleanup.

    2.57.0release notes

  • Token-based compaction now retains more recent history.

    2.57.0release notes

  • A tool's prepare function now has its own retry count under .prefixed(), .renamed(), and PrefixTools.

    2.57.0release notes

  • The discriminator mapping now references multimodal URL choices.

    2.57.0release notes

  • Unset optional fields are omitted from UIMessage JSON so the AI SDK accepts it.

    2.57.0release notes

  • User prompts quoting its [WarnNearLimits] marker are no longer deleted.

    2.57.0release notes

  • Sessions can reconnect past max_duration when a reconnect policy is set.

    2.57.0release notes

pydantic-ai-slim 15 changes

Security 5

  • Pydantic AI: Unvalidated UploadedFile references in UI adapters allow server-side file access using the application's credentials

    1.106.0security advisory

  • pydantic-ai: SSRF blocklist bypass via IPv4-compatible, SIIT/IVI, and local NAT64 IPv6 addresses (incomplete fix of CVE-2026-46678)

    1.102.0security advisory

  • Pydantic AI: SSRF cloud-metadata blocklist bypass via IPv4-mapped IPv6 (Incomplete fix of CVE-2026-25580)

    1.99.0security advisory

  • Pydantic AI has Server-Side Request Forgery (SSRF) in URL Download Handling

    1.56.0security advisory

  • Pydantic AI has Stored XSS via Path Traversal in Web UI CDN URL

    1.51.0security advisory