From 514add4b8566d053b14c526c61cc6fae05e12cb0 Mon Sep 17 00:00:00 2001 From: Luis Pater Date: Fri, 26 Sep 2025 18:13:28 +0800 Subject: [PATCH] refactor(executor): remove redundant handling of "reasoning.effort" in gpt-5 and gpt-5-codex models --- internal/runtime/executor/codex_executor.go | 8 -------- 1 file changed, 8 deletions(-) diff --git a/internal/runtime/executor/codex_executor.go b/internal/runtime/executor/codex_executor.go index 464e2c47..1ae6bfd9 100644 --- a/internal/runtime/executor/codex_executor.go +++ b/internal/runtime/executor/codex_executor.go @@ -54,8 +54,6 @@ func (e *CodexExecutor) Execute(ctx context.Context, auth *cliproxyauth.Auth, re if util.InArray([]string{"gpt-5", "gpt-5-minimal", "gpt-5-low", "gpt-5-medium", "gpt-5-high"}, req.Model) { body, _ = sjson.SetBytes(body, "model", "gpt-5") switch req.Model { - case "gpt-5": - body, _ = sjson.DeleteBytes(body, "reasoning.effort") case "gpt-5-minimal": body, _ = sjson.SetBytes(body, "reasoning.effort", "minimal") case "gpt-5-low": @@ -68,8 +66,6 @@ func (e *CodexExecutor) Execute(ctx context.Context, auth *cliproxyauth.Auth, re } else if util.InArray([]string{"gpt-5-codex", "gpt-5-codex-low", "gpt-5-codex-medium", "gpt-5-codex-high"}, req.Model) { body, _ = sjson.SetBytes(body, "model", "gpt-5-codex") switch req.Model { - case "gpt-5-codex": - body, _ = sjson.DeleteBytes(body, "reasoning.effort") case "gpt-5-codex-low": body, _ = sjson.SetBytes(body, "reasoning.effort", "low") case "gpt-5-codex-medium": @@ -147,8 +143,6 @@ func (e *CodexExecutor) ExecuteStream(ctx context.Context, auth *cliproxyauth.Au if util.InArray([]string{"gpt-5", "gpt-5-minimal", "gpt-5-low", "gpt-5-medium", "gpt-5-high"}, req.Model) { body, _ = sjson.SetBytes(body, "model", "gpt-5") switch req.Model { - case "gpt-5": - body, _ = sjson.DeleteBytes(body, "reasoning.effort") case "gpt-5-minimal": body, _ = sjson.SetBytes(body, "reasoning.effort", "minimal") case "gpt-5-low": @@ -161,8 +155,6 @@ func (e *CodexExecutor) ExecuteStream(ctx context.Context, auth *cliproxyauth.Au } else if util.InArray([]string{"gpt-5-codex", "gpt-5-codex-low", "gpt-5-codex-medium", "gpt-5-codex-high"}, req.Model) { body, _ = sjson.SetBytes(body, "model", "gpt-5-codex") switch req.Model { - case "gpt-5-codex": - body, _ = sjson.DeleteBytes(body, "reasoning.effort") case "gpt-5-codex-low": body, _ = sjson.SetBytes(body, "reasoning.effort", "low") case "gpt-5-codex-medium":