Jump to solution
Verify

The Fix

pip install pydantic==1.10.17

Based on closed pydantic/pydantic issue #9678 · 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
@@ -145,10 +145,8 @@ print(user.model_dump(by_alias=True)) # (2)! over `alias` for serialization. - You may also set `alias_priority` on a field to change this behavior. - - You can read more about [Alias Precedence](../concepts/alias.md#alias-precedence) in the
repro.py
from pydantic import BaseModel, Field class Model(BaseModel): first_name: str = Field( alias="firstName", validation_alias="FIRST_NAME", serialization_alias="f_name", alias_priority=1 ) model = Model(firstName="Pippo") # ValidationError, no way to tweak alias_priority to be able to validate via plain_alias print(model.model_dump()) print(model.model_dump(by_alias=True)) # Serialization via serialization_alias only
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==1.10.17\nWhen NOT to use: This fix is not applicable if the documentation is already accurate regarding alias_priority usage.\n\n

Why This Fix Works in Production

  • Trigger: [docs]: cannot leverage on alias_priority if alias_generator is not involved
  • Mechanism: Documentation incorrectly suggested that alias_priority can be used without an AliasGenerator
  • Why the fix works: Updated documentation to clarify the use of alias_priority with alias_generator in Pydantic. (first fixed release: 1.10.17).
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

  • Documentation incorrectly suggested that alias_priority can be used without an AliasGenerator
  • Production symptom (often without a traceback): [docs]: cannot leverage on alias_priority if alias_generator is not involved

Proof / Evidence

Discussion

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

“@AlessandroMiola, Great catch. This is definitely wrong. I'll open a fix in a sec.”
@sydney-runkle · 2024-06-18 · source

Failure Signature (Search String)

  • [docs]: cannot leverage on alias_priority if alias_generator is not involved
  • I would like to point out a possible (I apologize if this is not the case and I'm missing something) inconsistency in the documentation at
Copy-friendly signature
signature.txt
Failure Signature ----------------- [docs]: cannot leverage on alias_priority if alias_generator is not involved I would like to point out a possible (I apologize if this is not the case and I'm missing something) inconsistency in the documentation at https://docs.pydantic.dev/latest/concepts/fields/#field-aliases, where the note specifies that

Error Message

Signature-only (no traceback captured)
error.txt
Error Message ------------- [docs]: cannot leverage on alias_priority if alias_generator is not involved I would like to point out a possible (I apologize if this is not the case and I'm missing something) inconsistency in the documentation at https://docs.pydantic.dev/latest/concepts/fields/#field-aliases, where the note specifies that

Minimal Reproduction

repro.py
from pydantic import BaseModel, Field class Model(BaseModel): first_name: str = Field( alias="firstName", validation_alias="FIRST_NAME", serialization_alias="f_name", alias_priority=1 ) model = Model(firstName="Pippo") # ValidationError, no way to tweak alias_priority to be able to validate via plain_alias print(model.model_dump()) print(model.model_dump(by_alias=True)) # Serialization via serialization_alias only

Environment

  • Pydantic: 2

What Broke

Users were misled about the functionality of alias_priority, causing confusion in implementation.

Why It Broke

Documentation incorrectly suggested that alias_priority can be used without an AliasGenerator

Fix Options (Details)

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

pip install pydantic==1.10.17

When NOT to use: This fix is not applicable if the documentation is already accurate regarding alias_priority usage.

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

First fixed release: 1.10.17

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 is not applicable if the documentation is already accurate regarding alias_priority usage.

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
1.10.17 Fixed

Related Issues

No related fixes found.

Sources

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