Skip to content

fix: disable deepseek thinking via extra_body in codex workflows - #19

Merged
tsaqib merged 3 commits into
mainfrom
feat/codex-workflows-disable-thinking
May 26, 2026
Merged

tsaqib merged 3 commits into
mainfrom
feat/codex-workflows-disable-thinking

Conversation

@tsaqib

@tsaqib tsaqib commented May 26, 2026

Copy link
Copy Markdown
Contributor

Summary

Follow-up to #18 — that PR shipped reasoning_effort: none as the supposed disable for DeepSeek v4 thinking mode, but the DeepSeek schema only accepts "high" or "max" for reasoning_effort (per https://api-docs.deepseek.com/api/create-chat-completion), so the field was silently ignored and the workflows kept 400ing on:

The reasoning_content in the thinking mode must be passed back to the API.

The actual documented disable is a separate thinking object:

thinking:
  type: disabled   # "enabled" (default) | "disabled"

Passed via extra_body in the LiteLLM model_list so it merges into the upstream HTTP body LiteLLM forwards to DeepSeek. Applied to both deepseek-v4-pro and deepseek-v4-flash in both workflow files.

Why this is safe to merge immediately

  • Both workflows remain workflow_dispatch: only — merging cannot trigger anything.
  • The skills-evals code still lives on feat/codex-eval-backend (test: add openai codex cli eval backend #11). Dispatch with Use workflow from: feat/codex-eval-backend as before.
  • No new secrets.

After merge

Re-dispatch manual / codex cli <- llm judge from the Actions tab with the feat branch ref. Smoke should still pass; scenarios should now make it past turn 1 (which was the wall the wrong fix left them at).

tsaqib added 3 commits May 26, 2026 01:03
Roll forward the two manual-codex-judge*.yml files on main to match
what feat/codex-eval-backend currently carries. Workflow_dispatch
parses the YAML from main, so the iterative fixes on the feat branch
weren't visible to the Actions tab until this lands.

Cumulative changes since the initial registration in #13:
- Install LiteLLM proxy via `uv tool install` (was pip+setup-python).
- Drop a `cp .../litellm_proxy_hooks.py /tmp/litellm/` step so LiteLLM
  can resolve the hook module (it looks relative to the config file's
  directory, not PYTHONPATH).
- Register the hook via `litellm_settings.callbacks` so non-function
  tools (codex's namespace / MCP groupings) are stripped before
  forwarding to DeepSeek.
- Set `reasoning_effort: none` on both deepseek-v4-* models so
  thinking mode is disabled and codex doesn't have to round-trip
  `reasoning_content` (which it doesn't know about).
- Move `setup-uv` above the litellm step so `uv tool` is available
  for the proxy install; remove the obsolete `setup-python` step.

Workflows remain `workflow_dispatch:` only and depend on skills-evals
code (driver, hook, tests, conftest changes) that lives only on
feat/codex-eval-backend. Dispatch them with ref=feat/codex-eval-backend
until #11 merges.

Signed-off-by: Tanzim Saqib <[email protected]>
Same fix as on the feat branch — reasoning_effort=none was ignored
(DeepSeek's schema only accepts "high" or "max"). The actual
disable is `thinking: { type: "disabled" }` passed via extra_body
so LiteLLM merges it into the upstream request body.

Signed-off-by: Tanzim Saqib <[email protected]>
#18 landed reasoning_effort=none on main. This branch's commit
replaces it with the correct thinking.type=disabled. Take ours
wholesale — main's value is the broken one.

Signed-off-by: Tanzim Saqib <[email protected]>

# Conflicts:
#	.github/workflows/manual-codex-judge-user-scope.yml
#	.github/workflows/manual-codex-judge.yml
@tsaqib
tsaqib merged commit aa85cbb into main May 26, 2026
2 checks passed
@tsaqib
tsaqib deleted the feat/codex-workflows-disable-thinking branch May 26, 2026 05:19
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