Packages

Pydantic AI v2.76: Breaking Changes, 6 Security Fixes, and ComputerUse

Pydantic AI v2.74.0 through v2.76.0 (released November 24–26, 2026, ahead of v2.77.0 on PyPI on November 28) resolve six medium-severity security advisories across PlaywrightBrowser egress filtering and OpenTelemetry tracing, add native ComputerUse sandboxes, and introduce breaking changes to FileSystemToolset offsets and error handling.

By 0xScorPionSon

9 min read

Pydantic AI v2.76: Breaking Changes, 6 Security Fixes, and ComputerUse

Pydantic AI v2.76 architecture showing Agent Core, Playwright Guard, OTel Eval, and ComputerUse

Executive Summary

  • Featured package & ecosystem: pydantic-ai (alongside pydantic-ai-slim, pydantic-ai-harness, pydantic-evals, and pydantic-ai-pax) on Python / PyPI, distributed under the MIT license (Pydantic AI GitHub Releases, pepy.tech).
  • Exact latest versions & verification date: GitHub release notes cover v2.74.0 (November 24, 2026), v2.75.0 (November 25, 2026), and v2.76.0 (November 26, 2026), while PyPI package telemetry on pepy.tech lists 2.77.0 released on November 28, 2026—verified as of November 30, 2026 (Pydantic AI GitHub Releases, pepy.tech).
  • AI & agent relevance: v2.74.0–v2.76.0 unify native ComputerUse across OpenAI (GPT-5.4+), Anthropic Claude, and Google Gemini over 10+ desktop sandboxes, add GoogleInteractionsModel and CodeMode(allow_final_output=True), and harden with_authority() so lower-authority MCP/workspace instructions move out of the system prompt (Pydantic AI GitHub Releases).
  • Primary upgrade takeaway: Teams running pydantic-ai-harness (PlaywrightBrowser), ElevenLabsAgentsRealtimeModel, or pydantic-evals online evaluation should upgrade to 2.74.0+ (and 1.107.11+ for pydantic-evals v1) to patch six medium-severity GHSAs, while auditing callers of FileSystemToolset.read_file(offset=...), result.conversation, and FallbackModel exception handlers before bumping to 2.76.0 (Pydantic AI GitHub Releases).

Adoption Telemetry and November 2026 Version Changelog

Originally open-sourced in October 2024, Pydantic AI reached 1.0.0 on September 5, 2025, and stabilized its harness-first V2 architecture on June 23, 2026 (Pydantic Version Policy, TwitterAPI.io Comparison). As of November 2026, adoption metrics across PyPI and GitHub reflect rapid production uptake:

  • PyPI downloads: 218,833,710 total downloads and 7,028,543 downloads in the last 30 days per pepy.tech, while Pydantic's homepage reports 5M+ monthly downloads across the AI stack (pepy.tech, Pydantic).
  • GitHub footprint: Approximately 21,100 GitHub stars on pydantic/pydantic-ai as of late November 2026, MIT-licensed (TwitterAPI.io Comparison, Pydantic AI GitHub).
  • November 2026 release cadence: Between November 11 (v2.68.0) and November 28 (v2.77.0), maintainers shipped nearly daily releases expanding durable execution (nine engines including Temporal, DBOS, Prefect, Restate, AWS Lambda, Azure Durable Task, and Apache Airflow), sandboxed ComputerUse, and multi-layered security fixes (Pydantic AI GitHub Releases, Pydantic Agent Frameworks Guide).

Key Milestones: v2.74.0 through v2.76.0 (November 24–26, 2026)

Release Date Major Additions & Architectural Shifts
v2.74.0 Nov 24, 2026 Patches 6 GHSAs (pydantic-ai, pydantic-ai-harness 0.74.0, pydantic-evals); adds pydantic_ai.computer_use (ComputerTool, ComputerUse()), native desktop support across Docker/Modal/E2B/Kubernetes/Daytona/Render sandboxes, and CDPBrowser (Pydantic AI GitHub Releases)
v1.107.11 Nov 24, 2026 V1 backport patching GHSA-7xcv-6766-v6v5 (CVE-2026-136643) in pydantic-evals (Pydantic AI GitHub Releases)
v2.75.0 Nov 25, 2026 Adds ModelEmptyResponseError / ModelInvalidResponseError fallback handling, RunContext.submit_output(), Temporal ExternalEventWaiter, lowest_authority_under framing in RepoContext/Skills/Memory, and with_authority() framing for MCP server instructions (Pydantic AI GitHub Releases)
v2.76.0 Nov 26, 2026 Adds stateless GoogleInteractionsModel, CodeMode(allow_final_output=True), pydantic_ai.root_conversation_id span rollup, per-tool ui_visibility, 1-indexed FileSystemToolset.read_file offsets, and gemini-2.5-pro/flash DeprecatedModelWarning (Pydantic AI GitHub Releases)

Note on v2.77.0: While pepy.tech lists 2.77.0 as published on PyPI on November 28, 2026, the pydantic/pydantic-ai GitHub Releases page displayed v2.76.0 as its latest published release notes at the time of inspection (pepy.tech, Pydantic AI GitHub Releases).

Security Patches, Breaking Changes, and Internals

Six Security Advisories Patched in v2.74.0 (and v1.107.11)

The v2.74.0 release bundle closes four browser-egress bypasses in pydantic-ai-harness (PlaywrightBrowser), one credential-leakage bug in ElevenLabsAgentsRealtimeModel, and one telemetry-spoofing bug in pydantic-evals (Pydantic AI GitHub Releases):

Advisory / CVE Severity Affected Package & Root Cause Fixed Version
GHSA-wm3r-gc4c-q7qg (CVE-2026-136639) Medium PlaywrightBrowser (block_private_addresses=True) did not block IPv6 site-local addresses (fec0::/10), letting attacker-influenced URLs fetch internal targets (Pydantic AI GitHub Releases) pydantic-ai-harness 0.74.0
GHSA-p2q8-3252-77c3 (CVE-2026-136640) Medium PlaywrightBrowser allowed IPv6 addresses embedding cloud metadata IPs under a network's NAT64 prefix and ISATAP forms of private addresses (Pydantic AI GitHub Releases) pydantic-ai-harness 0.74.0
GHSA-g87v-g79r-whvj (CVE-2026-136638) Medium PlaywrightBrowser parsed URLs with a backslash in the query as hostless and permitted hostless script/asset requests, bypassing allowed_domains/blocked_domains (Pydantic AI GitHub Releases) pydantic-ai-harness 0.74.0
GHSA-mj96-6529-3cpf Medium PlaywrightBrowser egress policy did not cover RTCPeerConnection (WebRTC), WebTransport, WebSocketStream, or FedCM; patched release strips these APIs under enforced policy (note: worker WebTransport, cdp_url worker WebSocketStream, isolated sandboxed iframes, and pre-attachment docs remain open per advisory) (Pydantic AI GitHub Releases) pydantic-ai-harness 0.74.0
GHSA-gm2p-369w-rcgv (CVE-2026-136642) Medium With OTel enabled, ElevenLabsAgentsRealtimeModel logged elevenlabs_agents_custom_llm_extra_body and elevenlabs_agents_dynamic_variables (including secret__ auth tokens) in trace spans even with include_content=False on 2.58.0–2.62.0 (Pydantic AI GitHub Releases) pydantic-ai / pydantic-ai-slim 2.74.0
GHSA-7xcv-6766-v6v5 (CVE-2026-136643) Medium Online evaluation let inbound OpenTelemetry baggage overwrite unset attributes on gen_ai.evaluation.result events (such as error.type and gen_ai.evaluation.score.value) (Pydantic AI GitHub Releases) pydantic-evals 2.74.0 & 1.107.11

Earlier in November, v2.70.0 (pydantic-ai-harness 0.70.0, November 17, 2026) also patched two High-severity ReDoS vulnerabilities (GHSA-m4cr-m4qc-9hh3 in ToolOutputLimits with strip_ansi=True and GHSA-5m5q-5qj4-gx9h in JWT secret redaction) (Pydantic AI GitHub Releases).

Breaking API Diffs and Compatibility Gotchas (v2.74.0–v2.76.0)

Upgrading from v2.73.x or earlier requires checking six behavioral changes documented in the release notes (Pydantic AI GitHub Releases):

  1. 1-indexed FileSystemToolset.read_file offsets (v2.76.0, #13250): FileSystemToolset.read_file(..., offset=N) and ReadFileArgs/ReadFileCallPart with explicit offset are now 1-indexed. Passing offset=0 raises an error (triggering a model retry), and existing callers passing 0-indexed offset=N must increment to N + 1.
  2. History compaction & result.conversation (v2.76.0, #13211): When a capability trims or summarizes history mid-run (SummarizingCompaction, RelevanceCompaction), result.conversation now retains every message added during the run so the next turn summarizes the full history instead of chaining prior summaries. Apps that want to forward only the compacted history must pass result.all_messages() as message_history=.
  3. New FallbackModel / ModelFallback exception hierarchy (v2.75.0, #12108): Empty streams, OpenAI Chat completions without choices, and malformed JSON/schema bodies now raise ModelEmptyResponseError or ModelInvalidResponseError. Both subclass ModelAPIError and UnexpectedModelBehavior: FallbackModel falls back on them by default, and any except ModelAPIError: block placed ahead of except UnexpectedModelBehavior: will now intercept them.
  4. Gemini 2.5 deprecation warnings (v2.76.0, #14679): Requests to gemini-2.5-pro and gemini-2.5-flash via GoogleModel or GoogleInteractionsModel emit DeprecatedModelWarning (a UserWarning). Projects running pytest with filterwarnings = error will fail unless migrated or explicitly filtered.
  5. Gemini thinking-token accounting (v2.75.0, #14297): Streaming or non-streaming gemini* models via OpenAIProvider now include thinking tokens inside output_tokens and output_reasoning_tokens, which increases reported token counts and trips UsageLimits ceilings earlier.
  6. Authority framing & durable replay (v2.75.0, #11837, #14457): Workspace files and MCP/capability instructions below 'operator' authority are now sent as framed data on the user channel rather than system prompts. For Temporal or DBOS durable workflows, maintainers warn to let in-flight runs finish (or use Temporal worker versioning / a new DBOS app version) before upgrading to avoid nondeterminism errors.

Updated Usage Example (v2.76.0)

The snippet below illustrates the updated v2.76.0 patterns for passing result.all_messages() across compacted turns and handling the new ModelEmptyResponseError / ModelInvalidResponseError hierarchy safely:

from pydantic_ai import Agent
from pydantic_ai.exceptions import ModelAPIError, ModelEmptyResponseError, ModelInvalidResponseError, UnexpectedModelBehavior

agent = Agent("openai:gpt-5.4", instructions="Summarize repository diffs concisely.")

def run_compacted_turn(prompt: str, prior_result=None):
    history = prior_result.all_messages() if prior_result is not None else None
    try:
        return agent.run_sync(prompt, message_history=history)
    except (ModelEmptyResponseError, ModelInvalidResponseError) as exc:
        raise RuntimeError(f"Model returned unusable output: {exc}") from exc
    except UnexpectedModelBehavior as exc:
        raise RuntimeError(f"Agent behavior validation failed: {exc}") from exc
    except ModelAPIError as exc:
        raise RuntimeError(f"Transport or provider API failure: {exc}") from exc

Ecosystem Comparison and Upgrade Checklist

When evaluating pydantic-ai (v2.76.0) against peer Python agent SDKs in late 2026, the primary architectural split is typed data/capability composition versus explicit state-graph control flow or single-vendor lock-in (Pydantic Agent Frameworks Guide, TwitterAPI.io Comparison).

Framework License Model Providers Durable Execution Key Trade-Offs (Verified Nov 2026)
pydantic-ai (v2.76.0) MIT 30+ providers + any OpenAI-compatible endpoint 9 external engines (Temporal, DBOS, Prefect, Restate, AWS Lambda, Azure Durable Task, Airflow, Absurd, pgtask) Python-only library (no hosted control plane); requires choosing and operating your own durable engine (Pydantic Agent Frameworks Guide)
LangGraph / LangChain MIT ~90 chat model integrations (separate packages) Built-in checkpointers (Postgres, SQLite, in-memory) Explicit StateGraph nodes & edges; no external durable engine integrations documented; tracing centers on LangSmith (Pydantic Agent Frameworks Guide, TwitterAPI.io Comparison)
OpenAI Agents SDK MIT OpenAI Responses API primary; LiteLLM/Any-LLM adapters (beta) 4 engines (Temporal, DBOS, Restate, Dapr) Lightweight handoffs & guardrails, also in TypeScript; tracing defaults to OpenAI dashboard (Pydantic Agent Frameworks Guide)
Microsoft Agent Framework MIT OpenAI, Azure OpenAI, Foundry, Anthropic, Bedrock, Gemini, Ollama Durable Task extension (Azure Functions / self-hosted) Python, .NET, and Go preview; Unified support covers Azure AI service issues only (Pydantic Agent Frameworks Guide)
Strands Agents (AWS) Apache 2.0 Amazon Bedrock default + ~20 providers Temporal plugin (public preview); local/S3 sessions Python and TypeScript; AWS Support covers AWS services rather than the SDK itself (Pydantic Agent Frameworks Guide)

Safe Upgrade & Pinning Checklist

  1. Audit read_file offset calls: Search your codebase (grep -rn "read_file(.*offset" .) and shift any 0-indexed offset arguments by +1 before upgrading to 2.76.0 (Pydantic AI GitHub Releases).
  2. Drain durable workflows first: If using Temporal or DBOS with RepoContext, Skills, Memory, or with_authority(), drain in-flight runs or bump worker versioning before deploying 2.75.0+ (Pydantic AI GitHub Releases).
  3. Review UsageLimits and CI warning filters: Account for Gemini thinking tokens in OpenAIChatModel output counts and decide whether to migrate gemini-2.5-pro/flash calls or filter DeprecatedModelWarning (Pydantic AI GitHub Releases).
  4. Pin minimum patched versions in pyproject.toml: Require pydantic-ai>=2.76.0 (or pydantic-ai-slim>=2.76.0), pydantic-ai-harness>=0.74.0, and pydantic-evals>=2.74.0 (or >=1.107.11 on V1) to ensure all six November 24 advisories are closed (Pydantic AI GitHub Releases).

Frequently Asked Questions

1. Which versions of Pydantic AI fix the six November 24 security advisories?

GHSA-wm3r-gc4c-q7qg, GHSA-p2q8-3252-77c3, GHSA-g87v-g79r-whvj, and GHSA-mj96-6529-3cpf are fixed in pydantic-ai-harness 0.74.0; GHSA-gm2p-369w-rcgv is fixed in pydantic-ai and pydantic-ai-slim 2.74.0; and GHSA-7xcv-6766-v6v5 is fixed in pydantic-evals 2.74.0 and 1.107.11 (Pydantic AI GitHub Releases).

2. Why did FileSystemToolset.read_file break in v2.76.0?

v2.76.0 changed FileSystemToolset.read_file(..., offset=N) and ReadFileArgs/ReadFileCallPart from 0-indexed to 1-indexed line offsets, so offset=0 now raises an error and existing offset=N calls must pass N + 1 (Pydantic AI GitHub Releases).

3. Does pydantic-ai require using Pydantic Logfire?

No. Pydantic AI emits standard OpenTelemetry traces following GenAI semantic conventions and works with any OTLP-compatible backend, though Logfire provides a free tier and one-command setup (Pydantic Agent Frameworks Guide, PyPI).

4. How does pydantic-ai handle durable execution compared to LangGraph?

LangGraph builds persistence in via graph checkpointers, whereas Pydantic AI is a library that delegates crash recovery and long-running workflows to nine external durable execution engines—including Temporal, DBOS, Prefect, Restate, AWS Lambda, and Azure Durable Task (TwitterAPI.io Comparison).

5. What should I check before enabling PlaywrightBrowser on untrusted URLs?

Ensure pydantic-ai-harness>=0.74.0 is installed with block_private_addresses=True (the default), and note the advisory caveat that worker WebTransport, cdp_url worker WebSocketStream, isolated sandboxed iframes, and documents loaded before attachment remain outside the browser-level block (Pydantic AI GitHub Releases).

Sources

  1. Pydantic — Releases · pydantic/pydantic-ai (v2.68.0–v2.76.0, v1.107.11) (November 11–26, 2026)
  2. pepy.tech — pydantic-ai PyPI Download Statistics & Version History (2.77.0) (November 28, 2026)
  3. PyPI — pydantic-ai Project Page (Accessed November 30, 2026)
  4. Pydantic — Best Python AI Agent Frameworks in 2026 (November 2, 2026)
  5. TwitterAPI.io — Pydantic AI vs LangGraph (2026): How to Pick (November 24, 2026)

More on Packages

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