Repository navigation
fix(providers): translate thinking_config for codex and refresh model list - #687
Conversation
… list The codex provider passed kwargs through to the request body verbatim, so the pipeline's thinking_config hit the backend as an unsupported parameter (HTTP 400). Translate it to the Responses reasoning.effort shape and omit reasoning when disabled. Also drop gpt-5.2 (retired upstream; the backend now only accepts gpt-5.5/gpt-5.4 for ChatGPT accounts) from CONTEXT_SIZES and the webui codex presets.
📝 WalkthroughWalkthroughThe Codex provider now translates enabled ChangesCodex provider and model updates
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
coding-agent/tests/providers/test_codex_responses.py (1)
129-156: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winCover the default reasoning effort.
The provider defaults enabled thinking to
"medium"wheneffortis absent. This test only supplies"high". Add a case withthinking_config={"enabled": True}and assertbody["reasoning"] == {"effort": "medium"}.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@coding-agent/tests/providers/test_codex_responses.py` around lines 129 - 156, Extend test_stream_translates_thinking_config_to_reasoning_effort with a case using thinking_config={"enabled": True} and no effort value, then assert the captured request body contains reasoning set to {"effort": "medium"} while excluding thinking_config.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@coding-agent/tests/providers/test_codex_responses.py`:
- Around line 129-156: Extend
test_stream_translates_thinking_config_to_reasoning_effort with a case using
thinking_config={"enabled": True} and no effort value, then assert the captured
request body contains reasoning set to {"effort": "medium"} while excluding
thinking_config.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: b21db767-58d2-44f7-b554-a7227ec77c3f
📒 Files selected for processing (4)
coding-agent/src/coding_agent/providers/codex_responses.pycoding-agent/tests/providers/test_codex_responses.pycoding-agent/webui/app/src/components/Header.test.tsxcoding-agent/webui/app/src/components/Header.tsx
o6n 实测发现并修复:
thinking_config原样塞进请求体,后端 400Unsupported parameter→ 翻译为 Responses 的reasoning.effort,disabled 时省略测试:test_codex_responses 6 个全过(新增 2 个:翻译/省略),vitest 100 全过,ruff 干净
Summary by CodeRabbit
New Features
Updates
Bug Fixes