feat: 完善模型请求适配与输出限制
This commit is contained in:
@@ -16,7 +16,7 @@ func (namedClient) Run(context.Context, clients.Request) (clients.Response, erro
|
||||
}
|
||||
|
||||
func TestValidateRequestAcceptsOpenAIReasoningEffort(t *testing.T) {
|
||||
for _, effort := range []string{"none", "minimal", "low", "medium", "high", "xhigh"} {
|
||||
for _, effort := range []string{"none", "minimal", "low", "medium", "high", "xhigh", "max"} {
|
||||
t.Run(effort, func(t *testing.T) {
|
||||
err := validateRequest("chat.completions", map[string]any{
|
||||
"messages": []any{map[string]any{"role": "user", "content": "ping"}},
|
||||
@@ -30,7 +30,7 @@ func TestValidateRequestAcceptsOpenAIReasoningEffort(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestValidateRequestRejectsNonOpenAIReasoningEffort(t *testing.T) {
|
||||
for _, effort := range []string{"max", "auto"} {
|
||||
for _, effort := range []string{"auto"} {
|
||||
t.Run(effort, func(t *testing.T) {
|
||||
err := validateRequest("chat.completions", map[string]any{
|
||||
"messages": []any{map[string]any{"role": "user", "content": "ping"}},
|
||||
|
||||
Reference in New Issue
Block a user