Pydantic AI v2.77.0 (2026-11-27)
Pydantic AI v2.77.0 brings breaking storage and streaming changes, introduces new ConversationStore backends (SQLite, Postgres, MongoDB), refactors authority checks for SubAgents, and updates history compaction behavior.
原始内容为英文;当前页面提供中文导航与来源说明,具体事实请以原文为准。
为什么值得关注
Pydantic AI release v2.77.0 contains significant architectural updates and compatibility adjustments across several core systems: - Persistence & Stores: Adds SQLite, Postgres, and MongoDB backends for ConversationStore. Renames SqliteConversationStore and ConversationConflict in the Pax session-browser store to SqliteSessionStore and SessionConflict, with deprecation warnings on the old names. - Skills: Skills without missing directories now skips unreadable or missing library paths with warnings rather than failing (override with missing directories='error'). SkipReason has a new enum value. - Streaming & Compaction: RunContext.request compaction() and compact history() introduce CompactionStartEvent and CompactionEndEvent to the AgentStreamEvent union. Streamed responses from Anthropic, Google, or OpenAI that end before a provider terminal event now return state='incomplete'. - SubAgents & Authority: SubAgents skips definition files loaded below 'operator' authority. Working directory delegate workspaces are restricted to the parent directory's lowest authority. In-flight durable runs using SubAgents must finish before upgrading due to realpath recording changes. - Usage Limits: XSearch and ImageGeneration fallback subagent requests and tokens now count against the run's UsageLimits. - Prompt & Message Structure: Memory and Planning run-start context are placed before user prompts inside the initial ModelRequest. Compaction receipts are now sent as CompactionReceiptPart instead of UserPromptPart. Unified thinking displays summarized thinking for Anthropic and Claude on…
可执行摘要
Pydantic AI v2.77.0 introduces breaking changes: SqliteConversationStore is renamed to SqliteSessionStore, AgentStreamEvent union adds CompactionStartEvent/CompactionEndEvent, and premature stream terminates now set response state='incomplete'. It also changes SubAgents loading rules based on authority, counts fallback subagent requests toward UsageLimits, places Memory/Planning context before the prompt, and alters…
- Agent 实用度
- 89/100
- 可信度
- 96%
- 机器格式
- JSON + Markdown
开发者应核对什么
- Update imports referencing SqliteConversationStore and ConversationConflict to SqliteSessionStore and SessionConflict.
- Update type-checking and exhaustive pattern matches (e.g., assert never) over AgentStreamEvent to account for CompactionStartEvent and CompactionEndEvent.
- Update type-checking pattern matches over SkipReason to handle its new value.
- Review stream termination logic: adjust checks expecting state == 'complete' or state != 'incomplete' to properly handle responses ending before provider terminal events.