[fix]. Wire runner reasoning effort
This commit is contained in:
@@ -76,10 +76,13 @@ def _build_install_and_run_command(settings: Settings) -> str:
|
|||||||
]
|
]
|
||||||
)
|
)
|
||||||
model = settings.openai_review_model.strip()
|
model = settings.openai_review_model.strip()
|
||||||
|
reasoning_effort = settings.openai_reasoning_effort.strip()
|
||||||
|
codex_exec_parts = ["codex exec --skip-git-repo-check --json"]
|
||||||
if model:
|
if model:
|
||||||
steps.append(f"codex exec --skip-git-repo-check --json -m {shlex.quote(model)}")
|
codex_exec_parts.append(f"-m {shlex.quote(model)}")
|
||||||
else:
|
if reasoning_effort:
|
||||||
steps.append("codex exec --skip-git-repo-check --json")
|
codex_exec_parts.append(f"--reasoning-effort {shlex.quote(reasoning_effort)}")
|
||||||
|
steps.append(" ".join(codex_exec_parts))
|
||||||
return "; ".join(steps)
|
return "; ".join(steps)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -59,6 +59,17 @@ def test_build_install_command_chatgpt_mode_copies_auth_json(monkeypatch: pytest
|
|||||||
|
|
||||||
assert 'printf "%s" "$CODEX_AUTH_JSON_B64" | base64 -d > /root/.codex/auth.json' in command
|
assert 'printf "%s" "$CODEX_AUTH_JSON_B64" | base64 -d > /root/.codex/auth.json' in command
|
||||||
assert "codex exec --skip-git-repo-check --json -m gpt-5.3-codex" in command
|
assert "codex exec --skip-git-repo-check --json -m gpt-5.3-codex" in command
|
||||||
|
assert f"--reasoning-effort {settings.openai_reasoning_effort}" in command
|
||||||
|
|
||||||
|
|
||||||
|
def test_build_install_command_includes_configured_reasoning_effort(monkeypatch: pytest.MonkeyPatch) -> None:
|
||||||
|
monkeypatch.setenv("OPENAI_REASONING_EFFORT", "medium")
|
||||||
|
get_settings.cache_clear()
|
||||||
|
settings = get_settings()
|
||||||
|
|
||||||
|
command = _build_install_and_run_command(settings)
|
||||||
|
|
||||||
|
assert "--reasoning-effort medium" in command
|
||||||
|
|
||||||
|
|
||||||
def test_chatgpt_mode_requires_existing_auth_json(monkeypatch: pytest.MonkeyPatch, tmp_path: Path) -> None:
|
def test_chatgpt_mode_requires_existing_auth_json(monkeypatch: pytest.MonkeyPatch, tmp_path: Path) -> None:
|
||||||
|
|||||||
Reference in New Issue
Block a user