返回 DeepSeek-Reasonix
deepseek_models_test.go
根目录 / internal / provider / deepseek_models_test.go
1 package provider
2
3 import "testing"
4
5 func TestIsOfficialDeepSeekImageModel(t *testing.T) {
6 for _, tc := range []struct {
7 model string
8 want bool
9 }{
10 {"deepseek-flash", true},
11 {"DEEPSEEK-FLASH", true},
12 {" deepseek-flash ", true},
13 {"deepseek-v4.1-flash-expires-on-0910", true},
14 {"deepseek-v4-flash", true},
15 {OfficialDeepSeekVisionModel, true},
16 {"deepseek-v4-pro", false},
17 {"deepseek-v4-flash-0731", false},
18 {"deepseek-v5-flash", false},
19 {"", false},
20 } {
21 if got := IsOfficialDeepSeekImageModel(tc.model); got != tc.want {
22 t.Errorf("IsOfficialDeepSeekImageModel(%q) = %v, want %v", tc.model, got, tc.want)
23 }
24 }
25 }
26
27 func TestIsOfficialDeepSeekTextModel(t *testing.T) {
28 for _, tc := range []struct {
29 model string
30 want bool
31 }{
32 {"deepseek-v4-pro", true},
33 {" DEEPSEEK-V4-PRO ", true},
34 // V4.1 Flash serves these two under the vendor's transition aliases, so
35 // they must stay out of the text-only block.
36 {"deepseek-v4-flash", false},
37 {"deepseek-flash", false},
38 {"deepseek-v5-flash", false},
39 {"", false},
40 } {
41 if got := IsOfficialDeepSeekTextModel(tc.model); got != tc.want {
42 t.Errorf("IsOfficialDeepSeekTextModel(%q) = %v, want %v", tc.model, got, tc.want)
43 }
44 }
45 }
46
46 lines GO