The Fix
pip install pydantic==2.11.0
Based on closed pydantic/pydantic issue #11606 · PR/commit linked
@@ -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
@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)
Re-run the minimal reproduction on your broken version, then apply the fix and re-run.
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
- GitHub issue: #11606
- Fix PR: https://github.com/pydantic/pydantic/pull/11608
- First fixed release: 2.11.0
- Reproduced locally: No (not executed)
- Last verified: 2026-02-09
- Confidence: 0.95
- Did this fix it?: Yes (upstream fix exists)
- Own content ratio: 0.61
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”
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
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 Message
-------------
- [ ] [Compatibility between releases](https://docs.pydantic.dev/changelog/)
- [ ] [Data validation/parsing](https://docs.pydantic.dev/concepts/models/#basic-model-usage)
Minimal Reproduction
@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
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.
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
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
| Version | Status |
|---|---|
| 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.