Use ConfigKit mapping values directly

This commit is contained in:
2026-11-05 13:41:01 +00:00
parent 4ec35f5ca6
commit 106c808442
6 changed files with 65 additions and 126 deletions

View File

@@ -78,7 +78,8 @@ type AuthenticationProbeConfig struct {
// It encodes fields without validating them; NewEngine validates the final
// effective configuration after all selected source layers are combined.
// Mapping captures a copy of supported input values at creation; unsupported
// values fail when the source is loaded.
// values fail when the source is loaded. ExtraParams must use ConfigKit Mapping
// input forms; callers must explicitly convert numbers or containers as needed.
func BackendSource(label string, backends []BackendConfig) configkit.Source {
definitions := make([]any, 0, len(backends))
for _, config := range backends {
@@ -96,7 +97,7 @@ func BackendSource(label string, backends []BackendConfig) configkit.Source {
fields["queue_capacity"] = *config.QueueCapacity
}
if config.ExtraParams != nil {
fields["extra_params"] = providerMapForMapping(config.ExtraParams)
fields["extra_params"] = config.ExtraParams
}
if config.SmokeTests != nil {
smokeTests := make(map[string]any)