Add projects
This commit is contained in:
parent
2d3a9ad623
commit
8b607dd700
1802 changed files with 503346 additions and 2 deletions
20
backend/internal/config/xai_alpha_search_test.go
Normal file
20
backend/internal/config/xai_alpha_search_test.go
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
package config
|
||||
|
||||
import "testing"
|
||||
|
||||
func TestSanitizeXAIKeysClearsCodexAlphaSearchCapability(t *testing.T) {
|
||||
cfg := &Config{XAIKey: []XAIKey{{
|
||||
APIKey: "xai-key",
|
||||
BaseURL: "https://api.x.ai/v1",
|
||||
AlphaSearch: true,
|
||||
}}}
|
||||
|
||||
cfg.SanitizeXAIKeys()
|
||||
|
||||
if len(cfg.XAIKey) != 1 {
|
||||
t.Fatalf("XAI key count = %d, want 1", len(cfg.XAIKey))
|
||||
}
|
||||
if cfg.XAIKey[0].AlphaSearch {
|
||||
t.Fatal("SanitizeXAIKeys() retained the Codex-only alpha-search capability")
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue