Jump to solution
Verify

The Fix

pip install pydantic==2.11.0

Based on closed pydantic/pydantic issue #11467 · 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
@@ -250,7 +250,6 @@ By leveraging the new [`type` statement](https://typing.readthedocs.io/en/latest from annotated_types import Gt - from typing_extensions import TypeAliasType from pydantic import BaseModel
repro.py
from typing import Annotated from pydantic import Field, BaseModel type SomeAlias = Annotated[int, Field(description='number')] class Model(BaseModel): foo: Annotated[SomeAlias, Field(title='abc')] print(Model.model_json_schema()) # description gets dropped
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 field-specific metadata in type aliases is required.\n\n

Why This Fix Works in Production

  • Trigger: print(Model.model_json_schema()) # description gets dropped
  • Mechanism: The JSON Schema generation incorrectly handled PEP 695 type aliases, leading to loss of field-specific metadata
  • Why the fix works: Fixes the JSON Schema generation for referenceable core schemas holding JSON metadata, addressing issue #11467. (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

  • The JSON Schema generation incorrectly handled PEP 695 type aliases, leading to loss of field-specific metadata
  • Production symptom (often without a traceback): print(Model.model_json_schema()) # description gets dropped

Proof / Evidence

Discussion

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

“PydanticAI Github Bot Found 1 issues similar to this one: 1. "https://github.com/pydantic/pydantic/issues/6352" (90% similar)”
@pydantic-hooky · 2025-02-19 · source
“My comment as a user on another thread, was that I really want TypeAliasType to continue to mean "make this a top-level type definition in…”
@akdor1154 · 2025-02-20 · source
“> My suggestion is to nail down some separations of responsibilities: > > - Fields are explicitly for attaching to a parent model*”
@Viicos · 2025-02-20 · source

Failure Signature (Search String)

  • print(Model.model_json_schema()) # description gets dropped
  • So this works well, but it breaks the assumption that PEP 695 type aliases are referenceable, and so the following does not work as expected:
Copy-friendly signature
signature.txt
Failure Signature ----------------- print(Model.model_json_schema()) # description gets dropped So this works well, but it breaks the assumption that PEP 695 type aliases are referenceable, and so the following does not work as expected:

Error Message

Signature-only (no traceback captured)
error.txt
Error Message ------------- print(Model.model_json_schema()) # description gets dropped So this works well, but it breaks the assumption that PEP 695 type aliases are referenceable, and so the following does not work as expected:

Minimal Reproduction

repro.py
from typing import Annotated from pydantic import Field, BaseModel type SomeAlias = Annotated[int, Field(description='number')] class Model(BaseModel): foo: Annotated[SomeAlias, Field(title='abc')] print(Model.model_json_schema()) # description gets dropped

What Broke

JSON Schema generated for models lost important metadata, causing incorrect schema representation.

Why It Broke

The JSON Schema generation incorrectly handled PEP 695 type aliases, leading to loss of field-specific metadata

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 field-specific metadata in type aliases 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/11475

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 field-specific metadata in type aliases 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.