feat(ai): enable Terra for ranking (#58)

This commit is contained in:
2026-11-26 09:29:22 +01:00
parent 8a91aabeea
commit 2747e857b1
4 changed files with 137 additions and 6 deletions

View File

@ -13,3 +13,19 @@ func TestScoringRequiresKnownStructuredModelAndAdapter(t *testing.T) {
}
}
}
func TestTicket58ExactOpenAITerraCapability(t *testing.T) {
for _, tc := range []struct {
provider, model string
want bool
}{
{"openai", "gpt-6.1-terra", true}, {"openai", "gpt-6.1-terra-latest", false}, {"openai", "unknown-model", false}, {"ollama", "gpt-6.1-terra", false}, {"anthropic", "gpt-6.1-terra", false}, {"other", "gpt-6.1-terra", false},
} {
t.Run(tc.provider+"/"+tc.model, func(t *testing.T) {
got := Lookup(tc.provider, tc.model, "")
if got.Selectable != tc.want || (tc.want && got.Mode != "json_schema") || (!tc.want && got.Reason != "ranking_structured_output_unsupported") {
t.Fatalf("capability=%+v want selectable=%v", got, tc.want)
}
})
}
}