refactor config and security to simplified the structure (#2068)

This commit is contained in:
Cytown
2026-03-28 00:03:34 +08:00
committed by GitHub
parent 98c78363b3
commit b646d3b8fe
48 changed files with 1566 additions and 2372 deletions
+1 -5
View File
@@ -80,6 +80,7 @@ func TestHandleListModels_ConfiguredStatusUsesRuntimeProbesForLocalModels(t *tes
ModelName: "vllm-remote",
Model: "vllm/custom-model",
APIBase: "https://models.example.com/v1",
APIKeys: config.SimpleSecureStrings("remote-key"),
},
{
ModelName: "copilot-gpt-5.4",
@@ -88,11 +89,6 @@ func TestHandleListModels_ConfiguredStatusUsesRuntimeProbesForLocalModels(t *tes
AuthMethod: "oauth",
},
}
cfg.WithSecurity(&config.SecurityConfig{ModelList: map[string]config.ModelSecurityEntry{
"vllm-remote": {
APIKeys: []string{"remote-key"},
},
}})
cfg.Agents.Defaults.ModelName = "openai-oauth"
if err := config.SaveConfig(configPath, cfg); err != nil {
t.Fatalf("SaveConfig() error = %v", err)