mirror of
https://github.com/cexll/myclaude.git
synced 2026-02-15 03:32:43 +08:00
fix(codeagent-wrapper): use config override for codex reasoning effort
Replace invalid `--reasoning-effort` CLI flag with `-c model_reasoning_effort=<value>` config override, as codex does not support the former. Generated with SWE-Agent.ai Co-Authored-By: SWE-Agent.ai <noreply@swe-agent.ai>
This commit is contained in:
@@ -766,7 +766,7 @@ func buildCodexArgs(cfg *Config, targetArg string) []string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if reasoningEffort := strings.TrimSpace(cfg.ReasoningEffort); reasoningEffort != "" {
|
if reasoningEffort := strings.TrimSpace(cfg.ReasoningEffort); reasoningEffort != "" {
|
||||||
args = append(args, "--reasoning-effort", reasoningEffort)
|
args = append(args, "-c", "model_reasoning_effort="+reasoningEffort)
|
||||||
}
|
}
|
||||||
|
|
||||||
args = append(args, "--skip-git-repo-check")
|
args = append(args, "--skip-git-repo-check")
|
||||||
|
|||||||
@@ -1970,7 +1970,7 @@ func TestRunBuildCodexArgs_NewMode_WithReasoningEffort(t *testing.T) {
|
|||||||
args := buildCodexArgs(cfg, "my task")
|
args := buildCodexArgs(cfg, "my task")
|
||||||
expected := []string{
|
expected := []string{
|
||||||
"e",
|
"e",
|
||||||
"--reasoning-effort", "high",
|
"-c", "model_reasoning_effort=high",
|
||||||
"--skip-git-repo-check",
|
"--skip-git-repo-check",
|
||||||
"-C", "/test/dir",
|
"-C", "/test/dir",
|
||||||
"--json",
|
"--json",
|
||||||
@@ -2010,13 +2010,13 @@ func TestRunCodexTaskWithContext_CodexReasoningEffort(t *testing.T) {
|
|||||||
|
|
||||||
found := false
|
found := false
|
||||||
for i := 0; i+1 < len(gotArgs); i++ {
|
for i := 0; i+1 < len(gotArgs); i++ {
|
||||||
if gotArgs[i] == "--reasoning-effort" && gotArgs[i+1] == "high" {
|
if gotArgs[i] == "-c" && gotArgs[i+1] == "model_reasoning_effort=high" {
|
||||||
found = true
|
found = true
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if !found {
|
if !found {
|
||||||
t.Fatalf("expected --reasoning-effort high in args, got %v", gotArgs)
|
t.Fatalf("expected -c model_reasoning_effort=high in args, got %v", gotArgs)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user