vibe-proxy/backend/internal/config/xai_alpha_search_test.go
2026-08-24 00:10:41 +02:00

20 lines
461 B
Go

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")
}
}