mirror of
https://github.com/hanzoai/ai.git
synced 2026-11-20 14:13:23 +00:00
gpt-5 and o3 REFUSE temperature and top_p on the Responses path: OpenAI answers 400 'Unsupported parameter' and the call dies entirely, so every request to those families through this provider failed whatever the caller asked for. The knobs now go only to models that accept them. Co-authored-by: Hanzo Dev <[email protected]>
22 lines
753 B
Go
22 lines
753 B
Go
// Copyright 2026 The Hanzo Authors. All Rights Reserved.
|
|
|
|
package model
|
|
|
|
import "testing"
|
|
|
|
// The Responses API answers 400 and drops the whole call when a reasoning model
|
|
// is handed `temperature` — so the families that refuse it must be recognised
|
|
// by name, prefixed or namespaced.
|
|
func TestSamplesFreely(t *testing.T) {
|
|
for _, m := range []string{"gpt-5", "gpt-5.3-codex", "o3", "o3-mini", "openai-direct/gpt-5", "O1-preview"} {
|
|
if samplesFreely(m) {
|
|
t.Errorf("%s: reasoning model must NOT be sent temperature/top_p", m)
|
|
}
|
|
}
|
|
for _, m := range []string{"gpt-4o", "gpt-4.1", "openai-direct/gpt-4o", "claude-sonnet-4-6", "zen5-coder"} {
|
|
if !samplesFreely(m) {
|
|
t.Errorf("%s: ordinary model must keep its sampling knobs", m)
|
|
}
|
|
}
|
|
}
|