Jump to solution
Verify

The Fix

pip install pydantic==2.11.0

Based on closed pydantic/pydantic issue #11552 · PR/commit linked

Production note: Most teams hit this during upgrades or environment changes. Roll out with a canary and smoke critical endpoints (health, OpenAPI/docs) before 100%.

Jump to Verify Open PR/Commit
@@ -322,6 +322,9 @@ By leveraging the new [`type` statement](https://typing.readthedocs.io/en/latest Only metadata that can be applied to the annotated type itself is allowed (e.g. [validation constraints](./fields.md#field-constraints) and JSON metadata). + Trying to support field-specific metadata would require eagerly inspecting the + type alias's [`__value__`][typing.TypeAliasType.__value__], and as such Pydantic + wouldn't be able to have the alias stored as a JSON Schema definition.
repro.py
from typing import Annotated from pydantic import BaseModel, Field A = Annotated[int, Field(alias="aa")] type B = Annotated[int, Field(alias="bb")] class M(BaseModel): a: A b: B M.model_validate({"aa": 1, "bb": 2})
verify
Re-run the minimal reproduction on your broken version, then apply the fix and re-run.
fix.md
Option A — Upgrade to fixed release\npip install pydantic==2.11.0\nWhen NOT to use: This fix should not be used if backward compatibility with older Pydantic versions is required.\n\n

Why This Fix Works in Production

  • Trigger: pydantic_core._pydantic_core.ValidationError: 1 validation error for M
  • Mechanism: Field-specific metadata in PEP 695 type aliases is not handled correctly by Pydantic
  • Why the fix works: Fixes the handling of field-specific metadata in PEP 695 type aliases, ensuring proper JSON Schema generation. (first fixed release: 2.11.0).
Production impact:
  • If left unfixed, the same config can fail only in production (env differences), causing startup failures or partial feature outages.

Why This Breaks in Prod

  • Field-specific metadata in PEP 695 type aliases is not handled correctly by Pydantic
  • Surfaces as: pydantic_core._pydantic_core.ValidationError: 1 validation error for M

Proof / Evidence

Discussion

High-signal excerpts from the issue thread (symptoms, repros, edge-cases).

“This is expected, see https://github.com/pydantic/pydantic/pull/11475 and the documentation that will be published in 2.11.”
@Viicos · 2025-03-14 · source
“oh, that's disappointing”
@KotlinIsland · 2025-03-14 · source
“See https://github.com/pydantic/pydantic/issues/11467 for more context as well”
@Viicos · 2025-03-14 · source
“I opened https://github.com/pydantic/pydantic/pull/11570.”
@Viicos · 2025-03-17 · source

Failure Signature (Search String)

  • pydantic_core._pydantic_core.ValidationError: 1 validation error for M

Error Message

Stack trace
error.txt
Error Message ------------- pydantic_core._pydantic_core.ValidationError: 1 validation error for M b Field required [type=missing, input_value={'aa': 1, 'bb': 2}, input_type=dict]

Minimal Reproduction

repro.py
from typing import Annotated from pydantic import BaseModel, Field A = Annotated[int, Field(alias="aa")] type B = Annotated[int, Field(alias="bb")] class M(BaseModel): a: A b: B M.model_validate({"aa": 1, "bb": 2})

Environment

  • Pydantic: 2

What Broke

Validation errors occur when using PEP 695 type aliases with field-specific metadata.

Why It Broke

Field-specific metadata in PEP 695 type aliases is not handled correctly by Pydantic

Fix Options (Details)

Option A — Upgrade to fixed release Safe default (recommended)

pip install pydantic==2.11.0

When NOT to use: This fix should not be used if backward compatibility with older Pydantic versions is required.

Use when you can deploy the upstream fix. It is usually lower-risk than long-lived workarounds.

Fix reference: https://github.com/pydantic/pydantic/pull/11570

First fixed release: 2.11.0

Last verified: 2026-02-09. Validate in your environment.

Get updates

We publish verified fixes weekly. No spam.

Subscribe

When NOT to Use This Fix

  • This fix should not be used if backward compatibility with older Pydantic versions is required.

Verify Fix

verify
Re-run the minimal reproduction on your broken version, then apply the fix and re-run.

Did This Fix Work in Your Case?

Quick signal helps us prioritize which fixes to verify and improve.

Prevention

  • Add a CI check that diffs key outputs after upgrades (OpenAPI schema snapshots, JSON payload shapes, CLI output).
  • Upgrade behind a canary and run integration tests against the canary before 100% rollout.

Version Compatibility Table

VersionStatus
2.11.0 Fixed

Related Issues

No related fixes found.

Sources

We don’t republish the full GitHub discussion text. Use the links above for context.