feat(ai): enable Terra for ranking (#58)
This commit is contained in:
@ -21,7 +21,7 @@ func Lookup(provider, model, endpoint string) Capability {
|
||||
switch provider {
|
||||
case "openai":
|
||||
switch model {
|
||||
case "gpt-4o-mini", "gpt-4o-mini-2024-07-18", "gpt-4o-2024-08-06", "gpt-4o-2024-11-20":
|
||||
case "gpt-6.1-terra", "gpt-4o-mini", "gpt-4o-mini-2024-07-18", "gpt-4o-2024-08-06", "gpt-4o-2024-11-20":
|
||||
supported = true
|
||||
}
|
||||
case "ollama":
|
||||
|
||||
@ -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)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user