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.

By 0xScorPionSon

8 min read

Pydantic AI v2.75.0 & v2.74.0: Breaking Changes, 6 Security Fixes, and Upgrade Guide

Pydantic AI v2.75.0 Security Patches and Breaking Changes Architecture

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 the openai SDK floor from 3.31.0 to 3.50.0 across extras, raised the coder extra to pillow>=12.3.0 (downscaling images read by Coder to 1024px on the longest side), and bumped boxd to >=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, and GHSA-7xcv-6766-v6v5), added pydantic_ai.computer_use.ComputerTool and desktop sandboxes across Docker, Modal, E2B, Daytona, Render, Sprites, Kubernetes, BoxLite, Smol, Boxd, and OpenSandbox, plus CDPBrowser.
  • v2.75.0 (Nov 25, 2026): Enforced workspace and MCP capability authority boundaries (lowest_authority_under, with_authority()), added ModelEmptyResponseError and ModelInvalidResponseError, shipped RunContext.submit_output() and Temporal ExternalEventWaiter for durable AskUser / HandleDeferredToolCalls waits, extended ClearToolResults with keep_turns and tool-specific targeting, required truststore>=0.10.5 to prevent concurrent httpx2 startup crashes, and updated Gemini thinking-token and thinking_budget handling.

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:

  1. Authority-Scoped Instructions (with_authority & lowest_authority_under): Workspace files below 'operator' authority no longer enter system instructions in RepoContext, Skills, or Memory. Similarly, any capability lowered with with_authority()—including an MCP capability 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 extra realpath workspace calls at run start, requiring Temporal worker versioning or a new DBOS app version for in-flight workflows.
  2. Fallback Behavior on Empty/Invalid Responses: ModelEmptyResponseError and ModelInvalidResponseError (subclasses of both ModelAPIError and UnexpectedModelBehavior) now trigger FallbackModel and ModelFallback automatically on empty streams, OpenAI Chat completions without choices, or malformed JSON. Any except ModelAPIError: block placed ahead of except UnexpectedModelBehavior: will now intercept these errors.
  3. Gemini Thinking Token Accounting: When calling gemini* models via OpenAIChatModel / OpenAIProvider, thinking tokens are now included in output_tokens and output_reasoning_tokens. Existing UsageLimits thresholds tuned before 2.75.0 will trip earlier unless adjusted or overridden with OpenAIModelProfile(openai_chat_completion_tokens_omit_reasoning=False).
  4. Gemini 2.5 Flash Reroute Guard: Passing thinking=False on gemini-2.5-flash via the Gemini API now sends thinking_budget=128 instead of 0 ahead of Google's scheduled December 1, 2026 reroute to gemini-3.5-flash-lite (where thinking_budget=0 returns HTTP 400).
  5. Instruction String Interning & Pax Approval Signatures: ModelMessagesTypeAdapter now shares a single string object across equal instructions (== works; is identity checks break), and pydantic_ai_pax.runtime.permissions.approval_handler now requires a resume token in its HandleDeferredToolCalls handler.

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:

  1. Pin Exact Paired Versions: Keep pydantic-ai>=2.75.0 and pydantic-ai-harness>=0.75.0 aligned (each 0.x Harness release pins its matching pydantic-ai-slim minor/patch version). If you are on the 1.x LTS branch for pydantic-evals only, upgrade to 1.107.11 for the GHSA-7xcv-6766-v6v5 fix.
  2. Drain Durable Workers: On Temporal, DBOS, or Prefect, deploy 2.75.0 behind a new worker build ID or app version so in-flight runs do not hit nondeterminism errors from the new realpath workspace checks and framed MCP instructions.
  3. Audit PlaywrightBrowser Dependencies: Verify your browser agents do not rely on RTCPeerConnection, WebTransport, WebSocketStream, or FedCM, which are now disabled under default enforced egress policies.
  4. Re-Calibrate UsageLimits: Check any UsageLimits configured for Gemini models accessed via OpenAIProvider, as reasoning tokens now count toward output_tokens.
  5. Verify PyPI Provenance: Install with uv add pydantic-ai==2.75.0 or pip install --require-hashes to 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

More on Packages

Packages

LangChain Core 1.8.5 & Anthropic 1.7.13: Python 3.10 Removal, Supply-Chain Fixes & Upgrade Guide

LangChain shipped langchain-core==1.8.5 and langchain-anthropic==1.7.13 on November 25, 2026, alongside partner updates across text-splitters, Qdrant, Ollama, Perplexity, Hugging Face, and Fireworks. We break down PyPI adoption telemetry (38.49M weekly downloads), the Python 3.10 EOL breaking change, security relocks (pygments CVE-2026-4539, mistune, filelock, tornado), and safe upgrade steps.

8 min read

Tell us what is not working

A thirty-minute call, no deck and no obligation. You will leave with a straight answer about whether this is worth building - including if that answer is no.

Start a project

Direct line

hello@codebumble.net
Dhaka, Bangladesh  :   local timeCalls in English or Bangla