1package provider
2
3import "testing"
4
5func TestReasoningEffortMappings(t *testing.T) {
6 cases := []struct {
7 level string
8 openai string
9 anthCompat string
10 codex string
11 budget int
12 normalized string
13 }{
14 {"off", "", "", "", 0, ""},
15 {"minimum", "low", "low", "low", 1024, "minimum"},
16 {"minimal", "low", "low", "low", 1024, "minimum"},
17 {"low", "low", "low", "low", 2048, "low"},
18 {"medium", "medium", "medium", "medium", 8192, "medium"},
19 {"high", "high", "high", "high", 16384, "high"},
20 {"maximum", "high", "xhigh", "xhigh", 32768, "maximum"},
21 {"max", "high", "xhigh", "xhigh", 32768, "maximum"},
22 }
23 for _, tc := range cases {
24 if got := NormalizeReasoning(tc.level); got != tc.normalized {
25 t.Errorf("NormalizeReasoning(%q)=%q want %q", tc.level, got, tc.normalized)
26 }
27 if got := OpenAIReasoningEffort(tc.level); got != tc.openai {
28 t.Errorf("OpenAIReasoningEffort(%q)=%q want %q", tc.level, got, tc.openai)
29 }
30 if got := OpenAICompatAnthropicEffort(tc.level); got != tc.anthCompat {
31 t.Errorf("OpenAICompatAnthropicEffort(%q)=%q want %q", tc.level, got, tc.anthCompat)
32 }
33 if got := OpenAICodexReasoningEffort(tc.level); got != tc.codex {
34 t.Errorf("OpenAICodexReasoningEffort(%q)=%q want %q", tc.level, got, tc.codex)
35 }
36 if got := ReasoningBudget(tc.level); got != tc.budget {
37 t.Errorf("ReasoningBudget(%q)=%d want %d", tc.level, got, tc.budget)
38 }
39 }
40}