Jump to solution
Verify

The Fix

pip install pydantic==2.6.2

Based on closed pydantic/pydantic issue #8698 · 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
@@ -1214,18 +1214,24 @@ def typed_dict_schema(self, schema: core_schema.TypedDictSchema) -> JsonSchemaVa if self.mode == 'serialization': named_required_fields.extend(self._name_required_computed_fields(schema.get('computed_fields', []))) - - config = _get_typed_dict_config(schema) + cls = _get_typed_dict_cls(schema)
repro.py
from typing_extensions import TypedDict from pydantic import ConfigDict, TypeAdapter # Tested on both my system and the live runner https://docs.pydantic.dev/2.6/errors/usage_errors/#type-adapter-config-unused class MyTypedDict(TypedDict): x: int # or `model_config = ...` for BaseModel __pydantic_config__ = ConfigDict(title="foobar") type_adapter = TypeAdapter(MyTypedDict) print(type_adapter.json_schema()) # The outputted json doesn't have the correct title. # OUTPUT # pydantic version: v2.6.0, pydantic-core version: v2.16.1 # {'properties': {'x': {'title': 'X', 'type': 'integer'}}, 'required': ['x'], 'title': 'MyTypedDict', 'type': 'object'}
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.6.2\nWhen NOT to use: Do not use this fix if you rely on the previous behavior of ignoring __pydantic_config__.\n\n

Why This Fix Works in Production

  • Trigger: When generating json schema with pydantic, `__pydantic_config__` is ignored in the outputted json, [contrary to what the docs
  • Mechanism: __pydantic_config__ was not processed correctly in TypeAdapter for TypedDicts
  • Why the fix works: __pydantic_config__ is now correctly processed in TypeAdapter for TypedDicts. (first fixed release: 2.6.2).
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).
  • __pydantic_config__ was not processed correctly in TypeAdapter for TypedDicts
  • Production symptom (often without a traceback): When generating json schema with pydantic, `__pydantic_config__` is ignored in the outputted json, [contrary to what the docs explain](https://docs.pydantic.dev/2.6/errors/usage_errors/#type-adapter-config-unused).

Proof / Evidence

Discussion

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

“> @evalott100, > > Thanks for reporting this issue”
@evvaaaa · 2024-02-01 · source
“Hi @sydney-runkle & @evalott100 I was looking into this issue, I think, The typed_dict_schema function in json_schema.py is missing update for title and json_schema_extra. Can…”
@13sin · 2024-02-04 · source
“@evalott100, Thanks for reporting this issue. Could you please confirm whether this issue was introduced in 2.6, or if it has been a problem for…”
@sydney-runkle · 2024-02-01 · source
“@evalott100, I just checked. Looks like this is a V2 problem in general, not a v2.6 problem. Nonetheless, definitely something that we want to fix!…”
@sydney-runkle · 2024-02-01 · source

Failure Signature (Search String)

  • When generating json schema with pydantic, `__pydantic_config__` is ignored in the outputted json, [contrary to what the docs
  • In the below example I set `title`, however I've found it won't work with any `ConfigDict.json_schema_extra` either, which is really what I require for my uses.
Copy-friendly signature
signature.txt
Failure Signature ----------------- When generating json schema with pydantic, `__pydantic_config__` is ignored in the outputted json, [contrary to what the docs explain](https://docs.pydantic.dev/2.6/errors/usage_errors/#type-adapter-config-unused). In the below example I set `title`, however I've found it won't work with any `ConfigDict.json_schema_extra` either, which is really what I require for my uses.

Error Message

Signature-only (no traceback captured)
error.txt
Error Message ------------- When generating json schema with pydantic, `__pydantic_config__` is ignored in the outputted json, [contrary to what the docs explain](https://docs.pydantic.dev/2.6/errors/usage_errors/#type-adapter-config-unused). In the below example I set `title`, however I've found it won't work with any `ConfigDict.json_schema_extra` either, which is really what I require for my uses.

Minimal Reproduction

repro.py
from typing_extensions import TypedDict from pydantic import ConfigDict, TypeAdapter # Tested on both my system and the live runner https://docs.pydantic.dev/2.6/errors/usage_errors/#type-adapter-config-unused class MyTypedDict(TypedDict): x: int # or `model_config = ...` for BaseModel __pydantic_config__ = ConfigDict(title="foobar") type_adapter = TypeAdapter(MyTypedDict) print(type_adapter.json_schema()) # The outputted json doesn't have the correct title. # OUTPUT # pydantic version: v2.6.0, pydantic-core version: v2.16.1 # {'properties': {'x': {'title': 'X', 'type': 'integer'}}, 'required': ['x'], 'title': 'MyTypedDict', 'type': 'object'}

Environment

  • Python: 3.11
  • Pydantic: 2

What Broke

Generated JSON schema does not include the specified title or json_schema_extra.

Why It Broke

__pydantic_config__ was not processed correctly in TypeAdapter for TypedDicts

Fix Options (Details)

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

pip install pydantic==2.6.2

When NOT to use: Do not use this fix if you rely on the previous behavior of ignoring __pydantic_config__.

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

First fixed release: 2.6.2

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 you rely on the previous behavior of ignoring __pydantic_config__.

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

Related Issues

No related fixes found.

Sources

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