Skip to content

Fix conf.has_option not respects default provider metadata#64209

Draft
jason810496 wants to merge 4 commits intoapache:mainfrom
jason810496:task-sdk/fix-regression-for-make-conf-respect-provider-metadata
Draft

Fix conf.has_option not respects default provider metadata#64209
jason810496 wants to merge 4 commits intoapache:mainfrom
jason810496:task-sdk/fix-regression-for-make-conf-respect-provider-metadata

Conversation

@jason810496
Copy link
Member

@jason810496 jason810496 commented Mar 25, 2026

Noted that all the ProviderManger includes RuntimeProviderManager, I just shorten as ProviderManger to refer both of them.

What

TL;DR;

Cleanup for deprecated path for the new "make conf respect provider metadata" mechanism.

The write(include_providers=True), with conf.make_sure_configuration_loaded(with_providers=False) or any conf.as_dict are the caller that introduce the recursive call between conf module and Provider Manager, so it would be better to clean them up in case they cause more regression just because we need to maintain those interfaces.

Before the clean up: configuration_description as stateful attributes

  • we need load_providers_configuration, restore_core_default_configuration to change the state of configuration_description just to reflect the sources of the conf
  • the configuration_description before the cleanup will not respect _provider_cfg_config_fallback_default_values or _provider_metadata_config_fallback_default_values.

After the current clean up: configuration_description as view

  • configuration_description is now a cache_property that can reflect _provider_cfg_config_fallback_default_values and _provider_metadata_config_fallback_default_values config sources
Was generative AI tooling used to co-author this PR?
  • Yes, Claude Code for fixing the unit tests

Simplifies and centralizes provider configuration loading by removing redundant methods and properties, ensuring consistent state management. Updates fallback logic to use a sentinel value instead of None, improving accuracy in config lookups. Improves test coverage for provider metadata fallbacks and clarifies lazy initialization behavior. Streamlines provider manager interfaces to reduce duplication and potential import cycles.
@jason810496 jason810496 changed the title Fix regression of respecting provider metadata for conf Fix has_option not respects provider metadata defaults Mar 25, 2026
@jason810496 jason810496 changed the title Fix has_option not respects provider metadata defaults Fix conf.has_option not respects default provider metadata Mar 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SDK conf does not resolve provider metadata config defaults (has_option returns False)

1 participant