Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions lope/validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -1668,6 +1668,14 @@ def validate(
# ─── Codex validator ───────────────────────────────────────────


# 2026-08-07: --ignore-user-config below discards ~/.codex/config.toml, so the user's default
# model never reached lope. Pin it explicitly instead. Reasoning stays "low" on purpose (see the
# comment in generate()): these are fast pass/fail gates, and xhigh would make every validation
# slow and expensive. For a heavyweight opinion call `codex exec` directly, which reads the user
# config (gpt-5.6-sol / xhigh). Override without editing this file: LOPE_CODEX_MODEL=<slug>.
CODEX_MODEL = os.environ.get("LOPE_CODEX_MODEL", "gpt-5.6-sol")


class CodexValidator(Validator):
"""Wraps `codex exec "<prompt>"` for validated review."""

Expand Down Expand Up @@ -1726,6 +1734,8 @@ def generate(
"--skip-git-repo-check",
"-s",
"workspace-write" if implementation_mode else "read-only",
"-m",
CODEX_MODEL,
"-c",
'model_reasoning_effort="low"',
],
Expand Down Expand Up @@ -1764,6 +1774,8 @@ def validate(
"--skip-git-repo-check",
"-s",
"read-only",
"-m",
CODEX_MODEL,
"-c",
'model_reasoning_effort="low"',
],
Expand Down
Loading