Files
cc-connect/core/model_alias_test.go
T
Deeka WongandDeeka Wong 1123c83edb fix(core): share provider model lookup and stabilize tests (#210)
* fix(core): share provider model lookup and stabilize tests

* fix(tests): address PR review follow-ups

---------

Co-authored-by: Deeka Wong <8337659+huangdijia@users.noreply.github.com>
2026-03-19 07:55:48 +08:00

22 lines
578 B
Go

package core
import "testing"
func TestResolveModelAlias_CaseInsensitive(t *testing.T) {
models := []ModelOption{{Name: "gpt-5.3-codex", Alias: "Codex"}}
got := resolveModelAlias(models, "codex")
if got != "gpt-5.3-codex" {
t.Fatalf("resolveModelAlias() = %q, want %q", got, "gpt-5.3-codex")
}
}
func TestResolveModelAlias_NoMatchFallsBackToInput(t *testing.T) {
models := []ModelOption{{Name: "gpt-5.3-codex", Alias: "codex"}}
got := resolveModelAlias(models, "gpt-5.4")
if got != "gpt-5.4" {
t.Fatalf("resolveModelAlias() = %q, want original input", got)
}
}