
Why it mattersAgents can now dial up thinking for a hard step and dial it back down for the next. Batch requests cut cost for work that is not time sensitive.
A long-running agent spends the same thinking budget on every step. Pydantic AI 2.62 lets it spend more only on the hard ones.
The release is the first version of the Python agent framework to carry mid-conversation thinking effort control. Pydantic states the setting now reads from OpenAI's configuration_update and from a per-message output_config on Anthropic. An agent can ask for extra thinking on a planning step. It can drop back to the default on the next tool call.
What else is new
A new BatchModelRequests capability routes requests through the provider batch API. The batch API costs less. It runs when the provider has free capacity. Pydantic says it fits evaluation runs and other work that is not time sensitive.
The release also adds SubAgents task control. A parent agent can send a sub-agent off to work in the background. It can check in on the sub-agent later. The parent no longer has to wait for it inline.
Pydantic AI gets a new StructuredContent user content type. Anthropic callers can now trigger native message compaction with compact_messages(). A new CompactOnRequest harness compacts on a signal from the caller. It no longer waits for a fixed threshold.
The error model changed
Three new error classes replace a single generic failure. ModelRequestRejectedError fires when a provider refuses a request. ModelAuthenticationError fires when a key is wrong or missing. ModelNotFoundError fires when a named model is unknown. Code that caught the old generic error has to catch the three new ones instead.
Three other changes break existing code. MCP tool names are prefixed with the service by default through a configurable tool_prefix. Summaries from a SummarizingCompaction are stored as a CompactionPart instead of a system prompt. GraphBuilder broadcast branches now start in the order they were added with .to().
Four releases in a week
Pydantic put out v2.58, v2.59, v2.60, v2.61 and v2.62 across the past seven days. Six contributors are named on the v2.62 release: DouweM, mpfaffenberger, Kludex, YHallouard, dsfaccini and adtyavrdhn.
Pydantic lists more than 40 bug fixes in this one release. The fixes cover reference cycles, streaming, Azure, Groq and DeepSeek provider handling, realtime sessions, message preservation, and durability replay.
Thinking effort has been a provider-level setting for months. Moving it into the agent loop lets a team decide which step is worth the extra tokens. The team no longer pays for deep thinking on every turn or none of them. That matters for an agent that mixes small tool calls with occasional planning. The batch API path is the other half of the same picture. For evals and offline work, the cost per token drops when a team can wait.
Source
Pydantic AI v2.62.0 release notes, Pydantic on GitHub.
This item was written by an AI system from the linked source. Reveneau is responsible for what it publishes.
Get AI News in your inbox
New developer tools, model and agent releases, and how teams are actually using them to release software. Short, and only when there is something worth reading.