Skip to content

fix: propagate Codex reasoning effort - #2919

Merged
nicoloboschi merged 1 commit into
vectorize-io:mainfrom
Tosko4:fix/codex-reasoning-effort
Jul 24, 2026
Merged

fix: propagate Codex reasoning effort#2919
nicoloboschi merged 1 commit into
vectorize-io:mainfrom
Tosko4:fix/codex-reasoning-effort

Conversation

@Tosko4

@Tosko4 Tosko4 commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Summary

  • send the configured Codex reasoning_effort as reasoning.effort
  • keep reasoning-summary selection separate and unchanged
  • cover both regular and tool-enabled request payloads with regression tests

Why

The Codex provider currently maps reasoning_effort to reasoning.summary, but it never sends the effort itself. As a result, settings such as high and xhigh only change summary detail while the backend continues to use its default reasoning effort.

This change passes the configured effort through and preserves the existing summary mapping, including the special detailed-summary behavior for GPT-5.2 models.

Validation

  • uv run python -m pytest tests/test_codex_reasoning_effort.py -q (2 passed)
  • uv run python -m pytest tests/test_codex_*.py -q (50 passed)
  • uv run ruff check .
  • uv run ruff format --check .
  • uv run ty check hindsight_api/engine/providers/codex_llm.py
  • uv run ty check tests/test_codex_reasoning_effort.py
  • direct provider canaries covered both a normal response and a tool call

Risk / impact

The request shape changes only for the openai-codex provider. Supported configured effort values now reach the backend as intended. An unsupported value may now be rejected by the backend instead of being silently ignored.

Scope boundaries

  • no changes to OAuth handling, token refresh, streaming, or tool schemas
  • no changes to provider defaults or configuration parsing
  • no changes to other LLM providers

Known out-of-scope CI failure

verify-generated-files currently fails because main contains skills/hindsight-docs/references/openapi.json at version 0.8.4, while ./scripts/generate-docs-skill.sh regenerates it as 0.8.5. This reproduces on the unchanged base commit 4dc8348348f3e0b50da9071357955a2995c4f0e0 and is unrelated to this provider change.

PRs #2913 and #2916 already include that same generated one-line sync, so this PR deliberately does not duplicate it.

Rollout / operator notes

No migration is required. Existing installations keep their configured/default effort; the Codex backend will now receive it explicitly.

Reviewer focus

Please check the Codex request shape in both call() and call_with_tools(), and confirm that effort propagation stays independent from summary selection.

@nicoloboschi
nicoloboschi merged commit ff4dc11 into vectorize-io:main Jul 24, 2026
87 of 88 checks passed
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.

2 participants