Jump to solution
Verify

The Fix

pip install pydantic==2.11.0

Based on closed pydantic/pydantic issue #11606 · PR/commit linked

Jump to Verify Open PR/Commit
@@ -2,14 +2,16 @@ from __future__ import annotations as _annotations +import warnings from re import Pattern -from typing import TYPE_CHECKING, Any, Callable, Literal, TypeVar, Union
repro.py
@overload def with_config(config: ConfigDict) -> Callable[[_TypeT], _TypeT]: @overload def with_config(**config: Unpack[ConfigDict]) -> Callable[[_TypeT], _TypeT]: def with_config(**config: Any) -> Callable[[_TypeT], _TypeT]: if nested_config := config.get('config'): return old_with_config(nested_config) return old_with_config(config)
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 is not applicable if the decorator is used in a context that requires positional arguments only.\n\n

Why This Fix Works in Production

  • Trigger: - [ ] [Compatibility between releases](https://docs.pydantic.dev/changelog/)
  • Mechanism: The `@with_config` decorator did not accept keyword arguments directly
  • Why the fix works: Allows the `@with_config` decorator to accept keyword arguments directly, addressing issue #11606. (first fixed release: 2.11.0).

Why This Breaks in Prod

  • The `@with_config` decorator did not accept keyword arguments directly
  • Production symptom (often without a traceback): - [ ] [Compatibility between releases](https://docs.pydantic.dev/changelog/)

Proof / Evidence

Discussion

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

“@Viicos I solved this issue at #11607 if u have time to look at it”
@YassinNouh21 · 2025-03-22 · source

Failure Signature (Search String)

  • - [ ] [Compatibility between releases](https://docs.pydantic.dev/changelog/)
  • - [ ] [Data validation/parsing](https://docs.pydantic.dev/concepts/models/#basic-model-usage)
Copy-friendly signature
signature.txt
Failure Signature ----------------- - [ ] [Compatibility between releases](https://docs.pydantic.dev/changelog/) - [ ] [Data validation/parsing](https://docs.pydantic.dev/concepts/models/#basic-model-usage)

Error Message

Signature-only (no traceback captured)
error.txt
Error Message ------------- - [ ] [Compatibility between releases](https://docs.pydantic.dev/changelog/) - [ ] [Data validation/parsing](https://docs.pydantic.dev/concepts/models/#basic-model-usage)

Minimal Reproduction

repro.py
@overload def with_config(config: ConfigDict) -> Callable[[_TypeT], _TypeT]: @overload def with_config(**config: Unpack[ConfigDict]) -> Callable[[_TypeT], _TypeT]: def with_config(**config: Any) -> Callable[[_TypeT], _TypeT]: if nested_config := config.get('config'): return old_with_config(nested_config) return old_with_config(config)

What Broke

Developers faced issues when trying to pass keyword arguments to the `@with_config` decorator.

Why It Broke

The `@with_config` decorator did not accept keyword arguments directly

Fix Options (Details)

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

pip install pydantic==2.11.0

When NOT to use: This fix is not applicable if the decorator is used in a context that requires positional arguments only.

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

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 is not applicable if the decorator is used in a context that requires positional arguments only.

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.