Migrating to Pydantic Settings v2.11.0
Version v2.11.0 introduces 3 breaking changes. This guide details how to update your code.
Released: 9/24/2025
⚠️ Check Your Code
If you use any of these symbols, you need to read this guide:
CliSettingsSource.__init__AWSSecretsManagerSettingsSourceInitSettingsSourcemodel_configCliSettingsSourceAzureKeyVaultSettingsSourceBreaking Changes
●Issue #1
Removed parsing of command line arguments from `CliSettingsSource.__init__`. Code that relied on automatic CLI parsing must now pass arguments explicitly or use the new CLI handling API.
●Issue #2
Reverted the fix that respected `cli_parse_args` from `model_config` with `settings_customise_sources`. The previous behavior is restored, so any custom `cli_parse_args` settings will no longer be applied.
●Issue #3
Disabled `allow_abbrev` on subparsers, so abbreviated CLI options are no longer accepted.
Migration Steps
- 1If you previously relied on `CliSettingsSource` automatically parsing `sys.argv`, update your code to pass arguments explicitly or use the new CLI API.
- 2Review any custom `cli_parse_args` settings in `model_config`; they are no longer respected after the revert.
- 3If you used abbreviated CLI options, update them to full option names due to `allow_abbrev` being disabled.
- 4When using `AWSSecretsManagerSettingsSource`, you can now provide an `endpoint_url` kwarg; adjust calls if needed.
- 5Check for warnings about unused `model_config` keys and clean up configuration.
Release Summary
Pydantic Settings 2.11.0 introduces CLI serialization, root model support, and several enhancements, while removing automatic CLI argument parsing and disabling abbreviation handling, which may require migration steps.
Need More Details?
View the full release notes and all changes for Pydantic Settings v2.11.0.
View Full Changelog