Skip to content

Add AGENTD_ZARVIS_REASONING_EFFORT knob for codex-oauth#310

Merged
edwin-zvs merged 1 commit into
mainfrom
zarvis-reasoning-effort
Jun 1, 2026
Merged

Add AGENTD_ZARVIS_REASONING_EFFORT knob for codex-oauth#310
edwin-zvs merged 1 commit into
mainfrom
zarvis-reasoning-effort

Conversation

@edwin-zvs

Copy link
Copy Markdown
Contributor

What

Adds an optional AGENTD_ZARVIS_REASONING_EFFORT env var (low | medium | high) that sets reasoning.effort on the codex-oauth responses body, mirroring Codex CLI's model_reasoning_effort.

let mut reasoning = json!({ "summary": "auto" });
if let Ok(effort) = std::env::var("AGENTD_ZARVIS_REASONING_EFFORT") {
    let effort = effort.trim();
    if !effort.is_empty() {
        reasoning["effort"] = json!(effort);
    }
}

Why

The codex-oauth provider previously sent reasoning: { summary: "auto" } with no effort field, so every request ran at the backend's default reasoning effort with no way to change it. The Codex CLI exposes model_reasoning_effort; this gives zarvis the same lever.

Motivation was benchmark parity: on a DeepSWE task (etree-xml-diff-patch, gpt-5.5 via the codex-oauth backend), zarvis at the default effort scored 56/57; with AGENTD_ZARVIS_REASONING_EFFORT=high it scored 57/57 — matching the Codex CLI harness (which defaults to high).

Compatibility

Unset (the default) preserves the exact previous body (reasoning: { summary: "auto" }), so existing behavior is unchanged.

Test plan

  • cargo build -p agentd-adapter-zarvis (clean).
  • Existing build_responses_body unit tests pass unchanged (env unset → identical body).
  • Ran end-to-end via the DeepSWE/Pier harness with AGENTD_ZARVIS_REASONING_EFFORT=high; observed deeper reasoning and 57/57 on the task above.

🤖 Generated with Claude Code

The codex-oauth provider sent `reasoning: { summary: "auto" }` with no
effort field, so requests ran at the backend's default reasoning effort.
Add an optional `AGENTD_ZARVIS_REASONING_EFFORT` env var (low|medium|high)
that sets `reasoning.effort` on the responses body, mirroring Codex CLI's
`model_reasoning_effort`. Unset preserves the previous default behavior.
@edwin-zvs
edwin-zvs merged commit eb93e8f into main Jun 1, 2026
1 check passed
@edwin-zvs
edwin-zvs deleted the zarvis-reasoning-effort branch June 1, 2026 03:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant