| 1 | package openai |
| 2 | |
| 3 | import ( |
| 4 | "reasonix/internal/provider" |
| 5 | "testing" |
| 6 | ) |
| 7 | |
| 8 | func TestDeepSeekBetaExplicitWireAlias(t *testing.T) { |
| 9 | const alias = "DeepSeek-V4.1-Flash-Expires-On-0910" |
| 10 | c := newTestClient(t, alias, nil) |
| 11 | if got := c.buildRequest(provider.Request{}).Model; got != "deepseek-v4.1-flash-expires-on-0910" { |
| 12 | t.Fatal(got) |
| 13 | } |
| 14 | if c.modelInfo.ID != alias { |
| 15 | t.Fatal("model metadata identity changed") |
| 16 | } |
| 17 | if got := deepSeekChatWireModel("https://api.deepseek.com/chat/completions", alias); got != "deepseek-v4.1-flash-expires-on-0910" { |
| 18 | t.Fatal(got) |
| 19 | } |
| 20 | for _, model := range []string{"Custom-Model", "DEEPSEEK-V4.1-FLASH-EXPIRES-ON-0910"} { |
| 21 | if got := deepSeekChatWireModel("https://api.deepseek.com/chat/completions", model); got != model { |
| 22 | t.Fatal(got) |
| 23 | } |
| 24 | } |
| 25 | if got := deepSeekChatWireModel("https://gateway.example/v1/chat/completions", alias); got != alias { |
| 26 | t.Fatal(got) |
| 27 | } |
| 28 | } |
| 29 |