feat(backend): add kiro account support
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
package domain
|
||||
|
||||
import "testing"
|
||||
import (
|
||||
"strings"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestDefaultAntigravityModelMapping_ImageCompatibilityAliases(t *testing.T) {
|
||||
t.Parallel()
|
||||
@@ -24,3 +27,54 @@ func TestDefaultAntigravityModelMapping_ImageCompatibilityAliases(t *testing.T)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func TestDefaultKiroModelMapping_MatchesKiroReferenceModels(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
expected := map[string]string{
|
||||
"claude-opus-4-6": "claude-opus-4.6",
|
||||
"claude-opus-4-6-thinking": "claude-opus-4.6",
|
||||
"claude-sonnet-4-6": "claude-sonnet-4.6",
|
||||
"claude-sonnet-4-6-thinking": "claude-sonnet-4.6",
|
||||
"claude-opus-4-5-20251101": "claude-opus-4.5",
|
||||
"claude-opus-4-5-20251101-thinking": "claude-opus-4.5",
|
||||
"claude-sonnet-4-5-20250929": "claude-sonnet-4.5",
|
||||
"claude-sonnet-4-5-20250929-thinking": "claude-sonnet-4.5",
|
||||
"claude-haiku-4-5-20251001": "claude-haiku-4.5",
|
||||
"claude-haiku-4-5-20251001-thinking": "claude-haiku-4.5",
|
||||
}
|
||||
|
||||
if len(DefaultKiroModelMapping) != len(expected) {
|
||||
t.Fatalf("expected %d Kiro mappings, got %d", len(expected), len(DefaultKiroModelMapping))
|
||||
}
|
||||
for model, want := range expected {
|
||||
if got := DefaultKiroModelMapping[model]; got != want {
|
||||
t.Fatalf("unexpected Kiro mapping for %q: got %q want %q", model, got, want)
|
||||
}
|
||||
}
|
||||
|
||||
for _, model := range []string{
|
||||
"claude-opus-4-5",
|
||||
"claude-sonnet-4-5",
|
||||
"claude-sonnet-4",
|
||||
"gpt-4o",
|
||||
"gpt-4",
|
||||
"deepseek-3-2",
|
||||
"minimax-m2-1",
|
||||
"qwen3-coder-next",
|
||||
"claude-opus-4-7",
|
||||
"claude-sonnet-4-6-chat",
|
||||
} {
|
||||
if _, ok := DefaultKiroModelMapping[model]; ok {
|
||||
t.Fatalf("did not expect %q to remain in DefaultKiroModelMapping", model)
|
||||
}
|
||||
}
|
||||
for model := range DefaultKiroModelMapping {
|
||||
if strings.HasSuffix(model, "-agentic") {
|
||||
t.Fatalf("did not expect agentic Kiro mapping %q", model)
|
||||
}
|
||||
if strings.HasSuffix(model, "-chat") {
|
||||
t.Fatalf("did not expect chat-only Kiro mapping %q", model)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user