Skip to content

Commit aa85cbb

Browse files
authored
fix: disable deepseek thinking via extra_body in codex workflows (#19)
* ci: sync codex eval workflows on main with latest fixes 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]> * fix: disable deepseek thinking via extra_body, not reasoning_effort 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]> --------- Signed-off-by: Tanzim Saqib <[email protected]>
1 parent 3e59695 commit aa85cbb

2 files changed

Lines changed: 22 additions & 12 deletions

File tree

‎.github/workflows/manual-codex-judge-user-scope.yml‎

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,19 +61,23 @@ jobs:
6161
run: |
6262
mkdir -p /tmp/litellm
6363
cat > /tmp/litellm/config.yaml <<'EOF'
64-
# reasoning_effort=none disables DeepSeek v4 thinking mode;
64+
# thinking.type=disabled turns off DeepSeek v4 thinking mode;
6565
# see manual-codex-judge.yml for the protocol-mismatch rationale.
6666
model_list:
6767
- model_name: deepseek-v4-pro
6868
litellm_params:
6969
model: deepseek/deepseek-v4-pro
7070
api_key: os.environ/DEEPSEEK_API_KEY
71-
reasoning_effort: none
71+
extra_body:
72+
thinking:
73+
type: disabled
7274
- model_name: deepseek-v4-flash
7375
litellm_params:
7476
model: deepseek/deepseek-v4-flash
7577
api_key: os.environ/DEEPSEEK_API_KEY
76-
reasoning_effort: none
78+
extra_body:
79+
thinking:
80+
type: disabled
7781
litellm_settings:
7882
callbacks: ["litellm_proxy_hooks.proxy_handler_instance"]
7983
EOF

‎.github/workflows/manual-codex-judge.yml‎

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -102,24 +102,30 @@ jobs:
102102
run: |
103103
mkdir -p /tmp/litellm
104104
cat > /tmp/litellm/config.yaml <<'EOF'
105-
# reasoning_effort=none disables DeepSeek v4 thinking mode.
106-
# Without it, DeepSeek emits `reasoning_content` on the first
107-
# turn and 400s on every subsequent turn with
108-
# "The reasoning_content in the thinking mode must be passed
109-
# back to the API" — codex strips non-OpenAI fields between
110-
# turns so it cannot echo reasoning_content back. Disabling
111-
# thinking sidesteps the protocol mismatch.
105+
# `thinking: { type: "disabled" }` disables DeepSeek v4 thinking
106+
# mode (per api-docs.deepseek.com/api/create-chat-completion;
107+
# values are "enabled" | "disabled", default "enabled"). Without
108+
# this, DeepSeek emits `reasoning_content` on the first turn and
109+
# 400s on every subsequent turn with "The reasoning_content in
110+
# the thinking mode must be passed back to the API" — codex
111+
# strips non-OpenAI fields between turns so it cannot echo
112+
# reasoning_content back. extra_body merges the field into the
113+
# upstream HTTP body that LiteLLM forwards to DeepSeek.
112114
model_list:
113115
- model_name: deepseek-v4-pro
114116
litellm_params:
115117
model: deepseek/deepseek-v4-pro
116118
api_key: os.environ/DEEPSEEK_API_KEY
117-
reasoning_effort: none
119+
extra_body:
120+
thinking:
121+
type: disabled
118122
- model_name: deepseek-v4-flash
119123
litellm_params:
120124
model: deepseek/deepseek-v4-flash
121125
api_key: os.environ/DEEPSEEK_API_KEY
122-
reasoning_effort: none
126+
extra_body:
127+
thinking:
128+
type: disabled
123129
# Drop tool entries whose type != "function" before forwarding
124130
# to DeepSeek. Codex's namespace tools (apply_patch, MCP groups)
125131
# are not accepted by DeepSeek's chat-completions parser.

0 commit comments

Comments
 (0)