Packages
Pydantic AI v2.75.0 & v2.74.0: Breaking Changes, 6 Security Fixes, and Upgrade Guide
Pydantic AI v2.75.0 and Harness 0.75.0 arrive on PyPI with MCP instruction authority gating, ModelEmptyResponseError fallbacks, and Gemini reasoning token updates right after v2.74.0 patched six security advisories. Here is the full breaking-change and upgrade breakdown.
8 min read
Pydantic AI v2.75.0 & v2.74.0: Breaking Changes, 6 Security Fixes, and Upgrade Guide
Executive Summary
On November 25, 2026, the Pydantic team released pydantic-ai v2.75.0 alongside pydantic-ai-harness 0.75.0 on PyPI, just one day after v2.74.0 shipped patches for six medium-severity security advisories across browser egress filtering, OpenTelemetry secret redaction, and online evaluation baggage handling. Both packages target Python >=3.11 under the MIT license and ship with PyPI Trusted Publishing provenance attestations verified on November 25, 2026.
For AI engineers running production agents, v2.75.0 introduces high-impact behavioral and compatibility changes rather than simple bug fixes. Capabilities lowered via with_authority()—including Model Context Protocol (MCP) servers and RepoContext/Skills/Memory workspace files below 'operator' authority—no longer inject instructions into the system prompt, moving instead to framed user-channel data. Simultaneously, FallbackModel and ModelFallback now catch ModelEmptyResponseError and ModelInvalidResponseError by default, and OpenAIChatModel now counts Gemini thinking tokens inside output_tokens, directly affecting UsageLimits ceilings.
Upgrading to 2.75.0 (with pydantic-ai-harness==0.75.0) is recommended for any team using PlaywrightBrowser, ElevenLabsAgentsRealtimeModel, or pydantic-evals, provided Temporal and DBOS durable workflows drain in-flight runs before worker rollout.
Adoption Telemetry & Version Changelog
Ecosystem Footprint and Package Metadata
Built by the maintainers of Pydantic Validation, pydantic-ai sits at the center of Python's typed agent stack alongside pydantic-ai-harness, pydantic-evals, pydantic-graph, genai-prices, and pydantic-monty. According to Pydantic's official platform overview, pydantic-ai records 5M+ downloads in the last 30 days across an open-source ecosystem exceeding 80K+ GitHub stars, while an August 5, 2026 PyPIStats benchmark by KERNEL placed pydantic-ai at ~20.5M monthly PyPI downloads.
| Package / Component | Latest Version (Verified Nov 25, 2026) | Python Floor | License | PyPI Artifact Size (Wheel / sdist) |
|---|---|---|---|---|
pydantic-ai |
2.75.0 (Nov 25, 2026) |
>=3.11 (3.11–3.15) |
MIT | 10.6 kB / 32.4 kB |
pydantic-ai-harness |
0.75.0 (Nov 25, 2026) |
>=3.11 (3.11–3.15) |
MIT | 2.3 MB / 1.9 MB |
pydantic-evals |
2.74.0 / 1.107.11 (Nov 24, 2026) |
>=3.11 |
MIT | Bundled / LTS backport |
Recent Release Cadence (v2.73.0 → v2.75.0)
The Pydantic AI GitHub Releases log shows rapid daily shipping across November 23–25, 2026:
v2.73.0(Nov 23, 2026): Raised theopenaiSDK floor from3.31.0to3.50.0across extras, raised thecoderextra topillow>=12.3.0(downscaling images read byCoderto 1024px on the longest side), and bumpedboxdto>=0.3.3,<0.4.v2.74.0(Nov 24, 2026): Patched six security advisories (GHSA-wm3r-gc4c-q7qg,GHSA-p2q8-3252-77c3,GHSA-g87v-g79r-whvj,GHSA-mj96-6529-3cpf,GHSA-gm2p-369w-rcgv, andGHSA-7xcv-6766-v6v5), addedpydantic_ai.computer_use.ComputerTooland desktop sandboxes across Docker, Modal, E2B, Daytona, Render, Sprites, Kubernetes, BoxLite, Smol, Boxd, and OpenSandbox, plusCDPBrowser.v2.75.0(Nov 25, 2026): Enforced workspace and MCP capability authority boundaries (lowest_authority_under,with_authority()), addedModelEmptyResponseErrorandModelInvalidResponseError, shippedRunContext.submit_output()andTemporalExternalEventWaiterfor durableAskUser/HandleDeferredToolCallswaits, extendedClearToolResultswithkeep_turnsand tool-specific targeting, requiredtruststore>=0.10.5to prevent concurrenthttpx2startup crashes, and updated Gemini thinking-token andthinking_budgethandling.
Security Patches, Breaking Changes & Internals
Six Security Advisories Patched in v2.74.0
All six advisories disclosed in the v2.74.0 release notes carry medium severity and target agent-specific attack surfaces—browser SSRF/egress bypasses, telemetry secret leakage, and evaluation integrity spoofing:
| Advisory / CVE ID | Affected Package & Fixed Version | Root Cause & Mitigation |
|---|---|---|
GHSA-wm3r-gc4c-q7qg (CVE-2026-136639) |
pydantic-ai-harness (0.74.0) |
PlaywrightBrowser private-address block did not refuse IPv6 site-local addresses (fec0::/10), allowing attacker-influenced URLs to reach internal hosts on networks routing that range. |
GHSA-p2q8-3252-77c3 (CVE-2026-136640) |
pydantic-ai-harness (0.74.0) |
PlaywrightBrowser allowed IPv6 addresses embedding cloud metadata IPs under a network's own NAT64 prefix and ISATAP forms; now aligned with core URL download guards. |
GHSA-g87v-g79r-whvj (CVE-2026-136638) |
pydantic-ai-harness (0.74.0) |
URLs with a backslash in the query string were parsed as having no host, bypassing allowed_domains and blocked_domains for script/asset requests. |
GHSA-mj96-6529-3cpf (No CVE listed) |
pydantic-ai-harness (0.74.0) |
PlaywrightBrowser egress policy omitted RTCPeerConnection (WebRTC), WebTransport, WebSocketStream, and FedCM; patched builds strip these APIs from pages/frames and launch Chromium with them disabled. |
GHSA-gm2p-369w-rcgv (CVE-2026-136642) |
pydantic-ai / pydantic-ai-slim (2.74.0) |
OpenTelemetry spans for ElevenLabsAgentsRealtimeModel logged elevenlabs_agents_custom_llm_extra_body and elevenlabs_agents_dynamic_variables in full—including secret__* auth tokens; 2.58.0–2.62.0 ignored include_content=False. |
GHSA-7xcv-6766-v6v5 (CVE-2026-136643) |
pydantic-evals (2.74.0 & 1.107.11) |
Inbound OpenTelemetry baggage headers could overwrite unset gen_ai.evaluation.result attributes (error.type, gen_ai.evaluation.score.value), spoofing pass/fail eval telemetry. |
Breaking Changes & Compatibility Gotchas in v2.75.0
Engineers upgrading from 2.73.x or earlier should audit five concrete behavioral shifts documented in the v2.75.0 compatibility notes:
- Authority-Scoped Instructions (
with_authority&lowest_authority_under): Workspace files below'operator'authority no longer enter system instructions inRepoContext,Skills, orMemory. Similarly, any capability lowered withwith_authority()—including anMCPcapability and its server instructions—now delivers its instructions as framed data on the user channel rather than in the system prompt. Note that durable runs record extrarealpathworkspace calls at run start, requiring Temporal worker versioning or a new DBOS app version for in-flight workflows. - Fallback Behavior on Empty/Invalid Responses:
ModelEmptyResponseErrorandModelInvalidResponseError(subclasses of bothModelAPIErrorandUnexpectedModelBehavior) now triggerFallbackModelandModelFallbackautomatically on empty streams, OpenAI Chat completions withoutchoices, or malformed JSON. Anyexcept ModelAPIError:block placed ahead ofexcept UnexpectedModelBehavior:will now intercept these errors. - Gemini Thinking Token Accounting: When calling
gemini*models viaOpenAIChatModel/OpenAIProvider, thinking tokens are now included inoutput_tokensandoutput_reasoning_tokens. ExistingUsageLimitsthresholds tuned before2.75.0will trip earlier unless adjusted or overridden withOpenAIModelProfile(openai_chat_completion_tokens_omit_reasoning=False). - Gemini 2.5 Flash Reroute Guard: Passing
thinking=Falseongemini-2.5-flashvia the Gemini API now sendsthinking_budget=128instead of0ahead of Google's scheduled December 1, 2026 reroute togemini-3.5-flash-lite(wherethinking_budget=0returns HTTP 400). - Instruction String Interning & Pax Approval Signatures:
ModelMessagesTypeAdapternow shares a single string object across equal instructions (==works;isidentity checks break), andpydantic_ai_pax.runtime.permissions.approval_handlernow requires a resume token in itsHandleDeferredToolCallshandler.
Updated Usage Example (v2.75.0 Authority & Fallback Pattern)
The following snippet demonstrates how to isolate untrusted MCP server instructions using with_authority(), configure explicit fallback exclusions if you do not want schema mismatches to trigger model fallback, and size UsageLimits for reasoning-inclusive token accounting:
from pydantic_ai import Agent, ModelAPIError, UnexpectedModelBehavior, UsageLimits
from pydantic_ai.capabilities import FallbackModel, MCP
# Lower third-party MCP server authority so its instructions stay in framed user data
untrusted_mcp = MCP("https://partner.example.com/mcp").with_authority("user")
agent = Agent(
model=FallbackModel(
"openai:gpt-6.1-sol",
"anthropic:claude-fable-5-2",
# Optional: exclude schema/empty-response errors from triggering fallback
fallback_on=lambda err: isinstance(err, ModelAPIError)
and not isinstance(err, UnexpectedModelBehavior),
),
capabilities=[untrusted_mcp],
)
result = agent.run_sync(
"Summarize recent partner inventory updates.",
usage_limits=UsageLimits(output_tokens_limit=8000),
)
print(result.output)
Ecosystem Comparison & Upgrade Checklist
Python & TypeScript Agent SDK Comparison
When deciding whether to upgrade pydantic-ai or adopt an alternative orchestration package, engineering teams typically weigh runtime typing, durable execution support, and MCP/sandbox primitives. Download volumes below reflect KERNEL's August 5, 2026 PyPIStats/npm audit alongside Pydantic's November 2026 overview:
| Package / Framework | Ecosystem & Latest Signal | Monthly Adoption Snapshot | Core Abstraction | Built-in Security & Sandbox Primitives |
|---|---|---|---|---|
pydantic-ai |
Python >=3.11 (v2.75.0, Nov 25, 2026) |
5M+ last 30d (pydantic.dev); ~20.5M Aug 2026 (KERNEL) |
Typed Agent + composable Capability + 9 durable engines |
with_authority(), PromptInjectionDefender, ArtifactScanning, hardened PlaywrightBrowser, 11+ sandboxes |
LangGraph |
Python (v1.0+) |
~71.6M Aug 2026 (KERNEL) |
Explicit StateGraph nodes/edges + checkpointers |
Graph-level human-in-the-loop interrupts; external sandboxing |
OpenAI Agents SDK |
Python, TypeScript | ~35.5M Aug 2026 (KERNEL) |
Lightweight handoffs & guardrails | Native OpenAI Responses guardrails & tracing |
Google ADK |
Python, Go, Java, Kotlin, TS | ~18.7M Aug 2026 (KERNEL) |
Multi-language agent toolkit | Vertex AI / Google Cloud IAM integration |
CrewAI |
Python | ~13.8M Aug 2026 (KERNEL) |
Role-based multi-agent crews | Role scoping & task guardrails |
Safe Upgrade & Pinning Checklist
Before bumping pydantic-ai to 2.75.0 and pydantic-ai-harness to 0.75.0 in pyproject.toml, run through these five verification steps:
- Pin Exact Paired Versions: Keep
pydantic-ai>=2.75.0andpydantic-ai-harness>=0.75.0aligned (each0.xHarness release pins its matchingpydantic-ai-slimminor/patch version). If you are on the1.xLTS branch forpydantic-evalsonly, upgrade to1.107.11for theGHSA-7xcv-6766-v6v5fix. - Drain Durable Workers: On Temporal, DBOS, or Prefect, deploy
2.75.0behind a new worker build ID or app version so in-flight runs do not hit nondeterminism errors from the newrealpathworkspace checks and framed MCP instructions. - Audit
PlaywrightBrowserDependencies: Verify your browser agents do not rely onRTCPeerConnection,WebTransport,WebSocketStream, orFedCM, which are now disabled under default enforced egress policies. - Re-Calibrate
UsageLimits: Check anyUsageLimitsconfigured for Gemini models accessed viaOpenAIProvider, as reasoning tokens now count towardoutput_tokens. - Verify PyPI Provenance: Install with
uv add pydantic-ai==2.75.0orpip install --require-hashesto leverage PyPI's GitHub Actions Trusted Publishing attestations.
Frequently Asked Questions (FAQ)
1. Does upgrading to pydantic-ai 2.75.0 fix all six November 2026 security advisories?
Yes. All six advisories (CVE-2026-136638, CVE-2026-136639, CVE-2026-136640, CVE-2026-136642, CVE-2026-136643, and GHSA-mj96-6529-3cpf) were patched in 2.74.0 (pydantic-ai-harness 0.74.0 and pydantic-evals 2.74.0 / 1.107.11), and those fixes carry forward into 2.75.0 and 0.75.0.
2. Why did pydantic-ai 2.75.0 move lowered MCP instructions out of the system prompt?
When a capability or workspace file has an authority level below 'operator', placing its instructions in the system prompt gives third-party or workspace-sourced text elevated trust. Moving lowered instructions to framed user-channel data reduces indirect prompt-injection risk while keeping 'operator'-level capabilities unchanged.
3. Will pydantic-ai 2.75.0 break existing Temporal or DBOS workflows?
It can cause nondeterminism errors if an in-flight workflow from <2.75.0 resumes on a 2.75.0 worker, because RepoContext, Skills, and Memory now record extra realpath workspace calls at run start and lowered MCP capabilities emit framed user-channel data. Use Temporal worker versioning or a new DBOS app version during rollout.
4. What happens to gemini-2.5-flash with thinking=False in 2.75.0?
Through the Gemini API, thinking=False now sends thinking_budget=128 instead of 0 ahead of Google's December 1, 2026 reroute to gemini-3.5-flash-lite, preventing HTTP 400 errors after the cutover. Vertex AI and gemini-2.5-flash-lite continue using 0.
5. What Python and OpenAI SDK versions are required for pydantic-ai 2.75.0?
pydantic-ai 2.75.0 requires Python >=3.11 (supporting 3.11 through 3.15) and enforces openai >= 3.50.0 (raised in v2.73.0) alongside truststore >= 0.10.5 (added in v2.75.0).
Sources
- PyPI:
pydantic-ai2.75.0 Release & Provenance (Nov 25, 2026) - PyPI:
pydantic-ai-harness0.75.0 Release & Provenance (Nov 25, 2026) - GitHub Releases:
pydantic/pydantic-ai(v2.75.0,v2.74.0,v2.73.0, Nov 23–25, 2026) - Pydantic Official Overview: Stack & Adoption Metrics (Verified Nov 2026)
- KERNEL: AI Agent Frameworks — The Top 8 to Use in 2026 (Aug 6, 2026)
- VibeLeaderboard:
pydantic-aiv2.75.0 Release Tracker (Nov 26, 2026)