Jump to solution
Verify

The Fix

pip install pydantic==2.10.1

Based on closed pydantic/pydantic issue #10935 · 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
@@ -1495,7 +1495,7 @@ def _update_class_schema(self, json_schema: JsonSchemaValue, cls: type[Any], con from .root_model import RootModel - if config_title := config.get('title'): + if (config_title := config.get('title')) is not None: json_schema.setdefault('title', config_title)
repro.py
from pydantic import BaseModel, ConfigDict class Foo(BaseModel, title=""): # Specify title in class arguments pass foo_schema = Foo.model_json_schema() # Title in JSON schema is "Foo" class Bar(BaseModel): model_config = ConfigDict(title="") # Specify title in model config bar_schema = Bar.model_json_schema() # Title in JSON schema is "Bar"
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.10.1\nWhen NOT to use: Do not use this fix if the model title should remain as the class name.\n\n

Why This Fix Works in Production

  • Trigger: 2.10: Blank model title no longer respected by generated JSON schema
  • Mechanism: The blank model title was not respected in the generated JSON schema due to a conditional check
  • Why the fix works: Fixes the issue where a blank model title is not respected in the generated JSON schema. (first fixed release: 2.10.1).
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

  • Shows up under Python 3.11 in real deployments (not just unit tests).
  • The blank model title was not respected in the generated JSON schema due to a conditional check
  • Production symptom (often without a traceback): 2.10: Blank model title no longer respected by generated JSON schema

Proof / Evidence

Verified Execution

We executed the runnable minimal repro in a temporary environment and captured exit codes + logs.

  • Status: PASS
  • Ran: 2026-02-11T16:52:29Z
  • Package: pydantic
  • Fixed: 2.10.1
  • Mode: fixed_only
  • Outcome: ok
Logs
affected (exit=None)
fixed (exit=0)

Discussion

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

“Hey folks! We've just released v2.10.1 with a fix for this issue! Let us know if you're still experiencing any difficulties. Thanks!”
@sydney-runkle · 2024-11-22 · confirmation · source
“Thanks for reporting this! Taking a look, will fix for our upcoming patch release :)”
@sydney-runkle · 2024-11-21 · source

Failure Signature (Search String)

  • 2.10: Blank model title no longer respected by generated JSON schema
  • The title is still set correctly in the JSON schema when it is not blank.
Copy-friendly signature
signature.txt
Failure Signature ----------------- 2.10: Blank model title no longer respected by generated JSON schema The title is still set correctly in the JSON schema when it is not blank.

Error Message

Signature-only (no traceback captured)
error.txt
Error Message ------------- 2.10: Blank model title no longer respected by generated JSON schema The title is still set correctly in the JSON schema when it is not blank.

Minimal Reproduction

repro.py
from pydantic import BaseModel, ConfigDict class Foo(BaseModel, title=""): # Specify title in class arguments pass foo_schema = Foo.model_json_schema() # Title in JSON schema is "Foo" class Bar(BaseModel): model_config = ConfigDict(title="") # Specify title in model config bar_schema = Bar.model_json_schema() # Title in JSON schema is "Bar"

Environment

  • Python: 3.11
  • Pydantic: 2

What Broke

Generated JSON schema incorrectly uses model class name instead of the specified blank title.

Why It Broke

The blank model title was not respected in the generated JSON schema due to a conditional check

Fix Options (Details)

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

pip install pydantic==2.10.1

When NOT to use: Do not use this fix if the model title should remain as the class name.

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/10936

First fixed release: 2.10.1

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

  • Do not use this fix if the model title should remain as the class name.

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.10.1 Fixed

Related Issues

No related fixes found.

Sources

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