You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Support parameter names with dashes resolved from underscore configuration (#11785)
* Initial plan
* Add parameter name normalization support for dashes to underscores
Co-authored-by: davidfowl <95136+davidfowl@users.noreply.github.com>
* Refine parameter normalization to only apply to default configuration keys
Co-authored-by: davidfowl <95136+davidfowl@users.noreply.github.com>
* Simplify normalization logic to apply to all configuration keys
Co-authored-by: davidfowl <95136+davidfowl@users.noreply.github.com>
* Update src/Aspire.Hosting/ParameterResourceBuilderExtensions.cs
* Make GetParameterValue public and update OpenAI/GitHub Models to use normalization
Co-authored-by: davidfowl <95136+davidfowl@users.noreply.github.com>
* Revert public API and duplicate normalization logic in extensions
Co-authored-by: davidfowl <95136+davidfowl@users.noreply.github.com>
* Fix ParameterProcessor to skip GenerateParameterDefault exception for non-empty values
Co-authored-by: davidfowl <95136+davidfowl@users.noreply.github.com>
* Add tests for GenerateParameterDefault behavior in publish mode
Co-authored-by: davidfowl <95136+davidfowl@users.noreply.github.com>
* Make GetParameterValue internal and use it in ParameterProcessor to distinguish configured from generated values
Co-authored-by: davidfowl <95136+davidfowl@users.noreply.github.com>
* Apply suggestions from code review
* Replace obsolete parameterResource.Value with GetValueAsync in tests
Co-authored-by: davidfowl <95136+davidfowl@users.noreply.github.com>
* Fix GenerateParameterDefault tests to provide ServiceProvider with IConfiguration
Co-authored-by: davidfowl <95136+davidfowl@users.noreply.github.com>
* Update src/Aspire.Hosting/Orchestrator/ParameterProcessor.cs
* Update src/Aspire.Hosting/Orchestrator/ParameterProcessor.cs
* Move normalization logic to shared helper in IConfigurationExtensions
Co-authored-by: davidfowl <95136+davidfowl@users.noreply.github.com>
* Use extension method syntax for GetValueWithNormalizedKey across all files
Co-authored-by: captainsafia <1857993+captainsafia@users.noreply.github.com>
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: davidfowl <95136+davidfowl@users.noreply.github.com>
Co-authored-by: David Fowler <davidfowl@gmail.com>
Co-authored-by: captainsafia <1857993+captainsafia@users.noreply.github.com>
thrownewMissingParameterValueException($"OpenAI API key parameter '{name}-openai-apikey' is missing and OPENAI_API_KEY environment variable is not set."),
thrownewMissingParameterValueException($"OpenAI API key parameter '{name}-openai-apikey' is missing and OPENAI_API_KEY environment variable is not set.");
35
+
},
31
36
secret:true);
32
37
defaultApiKeyParameter.Resource.Description="""
33
38
The API key used to authenticate requests to the OpenAI API.
??thrownewMissingParameterValueException($"Parameter resource could not be used because configuration key '{configurationKey}' is missing and the Parameter has no default value.");
parameterDefault =>configuration["Parameters:generatedParam"]??parameterDefault?.GetDefaultValue()??thrownewMissingParameterValueException("Parameter 'generatedParam' is missing"),
0 commit comments