Source · release

Pydantic AI v2.78.0

Author
Pydantic
Published
2 December 2026
Added
3 December 2026
Original
https://github.com/pydantic/pydantic-ai/releases/tag/v2.78.0

Summary

Pydantic AI 2.78.0 (2026-12-02) makes WrapUpAtLimits wrap up before cost and timeout limits, makes fallback models move on when a provider rejects a request, and makes agent-graph waits durable. Only the first part of the release notes could be read, so later items may be missing.

Key points

  • Upgrade with pip install -U pydantic-ai==2.78.0.
  • Limits: WrapUpAtLimits now wraps up at cost_limit and before the run's timeout=; LimitName gains 'cost_limit' and 'timeout'. WrapUpAtLimits(timeout_margin=None) restores the old behaviour (raise).
  • Fallbacks: new ModelFeatureUnsupportedError and ModelRequestRejectedError; FallbackModel and ModelFallback try the next model instead of raising. A new ModelResponseRejectedEvent appears in streams and in the Vercel AI and AG-UI adapters.
  • Output tools: their call and return parts carry tool_kind='output'; use is_output_tool_part().
  • Durability: agent-graph waits use BaseDurabilityCapability.durable_sleep, so they survive on AWS Lambda, Absurd, and pgtask. Realtime sessions are refused inside durable workflow code.
  • Pax CLI: trailing prompt argument, stdin via -, and --output-format for JSON, which makes it scriptable.
  • Rename: CurrentTime is now AnnounceCurrentTime (old name kept as a deprecated alias).

Why it matters

Unattended agents now stop gracefully before hitting a spend or time limit instead of failing mid-task, which matters for scheduled and batch runs.