[WIP] Make TaskSDK conf respect default config from provider metadata#62696
Open
jason810496 wants to merge 5 commits intoapache:mainfrom
Open
[WIP] Make TaskSDK conf respect default config from provider metadata#62696jason810496 wants to merge 5 commits intoapache:mainfrom
jason810496 wants to merge 5 commits intoapache:mainfrom
Conversation
Fix _provider_metadata_config_fallback_default_values
jason810496
commented
Mar 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
related: #60000
Why
Resolve the blocker for #60000 (replacing all Core
confusage in providers). As pointed out in #60074 (comment), we have to make the Task SDKconfrespect the provider default values.How
Currently, there are two ways to specify default values for providers
provider_config_fallback_defaults.cfg(outdated with default value specified inprovider.yaml, but it still works in Core)get_provider_info.pyentry point via metadata import inProvidersManager)The current status before this PR is
confrespectsprovider_config_fallback_defaults.cfgconfnor SDKconfrespects the default values from provider metadataSince both Core and SDK
confrequire access to the provider config default values, we add new shared logic that respects default config from provider metadata.What
Refactor both Core
confand Task SDKconfby consolidating all lookups of provider default values into a shared library, including:provider_config_fallback_defaults.cfgfrom Coreconfto a shared module.provider_configsproperty inProvidersManagerTaskRuntime._get_option_from_provider_cfg_config_fallbacksand_get_option_from_provider_metadata_config_fallbacksinto the shared_lookup_sequence, and ensure thatProvidersManager/ProvidersManagerTaskRuntimeare initialized lazily.Verification
After the patch, all of the following
confusages will show the correct default values.For Core:
For TaskSDK:
TODO / Follow-up
provider.yamlwhen adding new[section/option]in community providers