mirror of
https://github.com/CJackHwang/ds2api.git
synced 2026-05-05 08:55:28 +08:00
29 lines
751 B
Go
29 lines
751 B
Go
package gemini
|
|
|
|
import "testing"
|
|
|
|
func TestNormalizeGeminiRequestNoThinkingModelForcesThinkingOff(t *testing.T) {
|
|
req := map[string]any{
|
|
"contents": []any{
|
|
map[string]any{
|
|
"role": "user",
|
|
"parts": []any{map[string]any{"text": "hello"}},
|
|
},
|
|
},
|
|
"reasoning_effort": "high",
|
|
}
|
|
out, err := normalizeGeminiRequest(testGeminiConfig{}, "gemini-2.5-pro-nothinking", req, false)
|
|
if err != nil {
|
|
t.Fatalf("normalizeGeminiRequest error: %v", err)
|
|
}
|
|
if out.ResolvedModel != "deepseek-v4-pro-nothinking" {
|
|
t.Fatalf("resolved model mismatch: got=%q", out.ResolvedModel)
|
|
}
|
|
if out.Thinking {
|
|
t.Fatalf("expected nothinking model to force thinking off")
|
|
}
|
|
if out.Search {
|
|
t.Fatalf("expected search=false, got=%v", out.Search)
|
|
}
|
|
}
|