Jump to solution
Verify

The Fix

pip install pydantic==2.6.2

Based on closed pydantic/pydantic issue #8634 · 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
@@ -402,6 +402,13 @@ def merge_field_infos(*field_infos: FieldInfo, **overrides: Any) -> FieldInfo: field_info = copy(field_infos[0]) field_info._attributes_set.update(overrides) + + default_override = overrides.pop('default', PydanticUndefined) + if default_override is Ellipsis:
repro.py
from typing import Annotated from pydantic import BaseModel, Field class Model(BaseModel): a: int = ... b: Annotated[int, "placeholder"] = ... c: Annotated[int, Field()] = ... for f in Model.model_fields.items(): print(f) # v2.1.0 # ('a', FieldInfo(annotation=int, required=True)) # ('b', FieldInfo(annotation=int, required=True, metadata=['placeholder'])) # ('c', FieldInfo(annotation=int, required=True)) # v2.1.1 # ('a', FieldInfo(annotation=int, required=True)) # ('b', FieldInfo(annotation=int, required=True, metadata=['placeholder'])) # ('c', FieldInfo(annotation=int, required=False, default=Ellipsis)) # --- from typing import Annotated from pydantic import Field, create_model m = create_model( "Test", a=(int, ...), b=(Annotated[int, "placeholder"], ...), c=(Annotated[int, Field()], ...), ) for f in m.model_fields.items(): print(f) # v2.1.0 # ('a', FieldInfo(annotation=int, required=True)) # ('b', FieldInfo(annotation=int, required=True, metadata=['placeholder'])) # ('c', FieldInfo(annotation=int, required=True)) # v2.1.1 # ('a', FieldInfo(annotation=int, required=True)) # ('b', FieldInfo(annotation=int, required=True, metadata=['placeholder'])) # ('c', FieldInfo(annotation=int, required=False, default=Ellipsis))
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 Ellipsis being treated as a default value.\n\n

Why This Fix Works in Production

  • Trigger: Ellipsis does not mark annotated field as required in create_model
  • Mechanism: Ellipsis was incorrectly recognized as a default value for fields with Annotated types
  • Why the fix works: Fixes the issue where Ellipsis was incorrectly recognized as a default value for fields with Annotated types, ensuring they are marked as required. (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

  • Triggered by an upgrade/regression window: 2.1.1 breaks; 2.6.2 is the first fixed release.
  • Shows up under Python 3.10 in real deployments (not just unit tests).
  • Ellipsis was incorrectly recognized as a default value for fields with Annotated types
  • Production symptom (often without a traceback): Ellipsis does not mark annotated field as required in create_model

Proof / Evidence

  • GitHub issue: #8634
  • Fix PR: https://github.com/pydantic/pydantic/pull/8793
  • First fixed release: 2.6.2
  • Affected versions: 2.1.1
  • Reproduced locally: No (not executed)
  • Last verified: 2026-02-09
  • Confidence: 0.75
  • Did this fix it?: Yes (upstream fix exists)
  • Own content ratio: 0.43

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.6.2
  • Mode: fixed_only
  • Outcome: ok
Logs
affected (exit=None)
fixed (exit=0)
('a', FieldInfo(annotation=int, required=True)) ('b', FieldInfo(annotation=int, required=True, metadata=['placeholder'])) ('c', FieldInfo(annotation=int, required=False, default=Ellipsis)) ('a', FieldInfo(annotation=int, required=True)) ('b', FieldInfo(annotation=int, required=True, metadata=['placeholder'])) ('c', FieldInfo(annotation=int, required=False, default=Ellipsis))

Discussion

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

“It's fixed on main, and should be released in v2.7.0!”
@sydney-runkle · 2024-03-12 · confirmation · source
“Is the fix released ? As with version 2.6.3 this appears not yet fixed: Thanks”
@dmarteau · 2024-03-11 · confirmation · source
“There was minimal change from v2.1.0 to v2.1.1 so hopefully the cause should be easy to identify for someone familiar with the code. https://github.com/pydantic/pydantic/compare/v2.1.0...v2.1.1”
@jackmpcollins · 2024-01-25 · repro detail · source
“@sydney-runkle I just had a quick look”
@Evenfire · 2024-01-26 · source

Failure Signature (Search String)

  • Ellipsis does not mark annotated field as required in create_model
  • This works correctly in v2.1.0 and is broken in v2.1.1 and in the latest version v2.5.3.
Copy-friendly signature
signature.txt
Failure Signature ----------------- Ellipsis does not mark annotated field as required in create_model This works correctly in v2.1.0 and is broken in v2.1.1 and in the latest version v2.5.3.

Error Message

Signature-only (no traceback captured)
error.txt
Error Message ------------- Ellipsis does not mark annotated field as required in create_model This works correctly in v2.1.0 and is broken in v2.1.1 and in the latest version v2.5.3.

Minimal Reproduction

repro.py
from typing import Annotated from pydantic import BaseModel, Field class Model(BaseModel): a: int = ... b: Annotated[int, "placeholder"] = ... c: Annotated[int, Field()] = ... for f in Model.model_fields.items(): print(f) # v2.1.0 # ('a', FieldInfo(annotation=int, required=True)) # ('b', FieldInfo(annotation=int, required=True, metadata=['placeholder'])) # ('c', FieldInfo(annotation=int, required=True)) # v2.1.1 # ('a', FieldInfo(annotation=int, required=True)) # ('b', FieldInfo(annotation=int, required=True, metadata=['placeholder'])) # ('c', FieldInfo(annotation=int, required=False, default=Ellipsis)) # --- from typing import Annotated from pydantic import Field, create_model m = create_model( "Test", a=(int, ...), b=(Annotated[int, "placeholder"], ...), c=(Annotated[int, Field()], ...), ) for f in m.model_fields.items(): print(f) # v2.1.0 # ('a', FieldInfo(annotation=int, required=True)) # ('b', FieldInfo(annotation=int, required=True, metadata=['placeholder'])) # ('c', FieldInfo(annotation=int, required=True)) # v2.1.1 # ('a', FieldInfo(annotation=int, required=True)) # ('b', FieldInfo(annotation=int, required=True, metadata=['placeholder'])) # ('c', FieldInfo(annotation=int, required=False, default=Ellipsis))

Environment

  • Python: 3.10
  • Pydantic: 2

What Broke

Fields annotated with Ellipsis were not marked as required, leading to validation issues.

Why It Broke

Ellipsis was incorrectly recognized as a default value for fields with Annotated types

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 Ellipsis being treated as a default value.

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

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 Ellipsis being treated as a default value.

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.1.1 Broken
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.