Repository navigation
Conversation
…ponses API
When OPENAI_API_FORMAT is responses, the request body sent the flat
reasoning_effort / reasoning_summary fields. The Responses API nests
these under a reasoning object (reasoning.effort / reasoning.summary)
and rejects the flat form with:
400 Unsupported parameter: 'reasoning_effort'. In the Responses API,
this parameter has moved to 'reasoning.effort'.
so any OpenAI-compatible provider on the Responses API (e.g. GPT-5.5)
failed on the first request with a reasoning effort set. Emit
reasoning: { effort, summary } for the responses body. The chat
completions path keeps the flat reasoning_effort, which is correct there.
Closes Twigpine#1638
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📜 Recent review details⏰ Context from checks skipped due to timeout of 900000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
🧰 Additional context used📓 Path-based instructions (6)**/*.{ts,tsx,js,jsx,py,md}📄 CodeRabbit inference engine (CONTRIBUTING.md)
Files:
**/*.{ts,tsx,js,jsx}📄 CodeRabbit inference engine (CONTRIBUTING.md)
Files:
**/*⚙️ CodeRabbit configuration file
Files:
{src/services/api/**,src/integrations/**,src/utils/model/**,src/utils/provider*.ts,src/commands/provider/**}⚙️ CodeRabbit configuration file
Files:
{src/**/*.test.ts,src/**/*.test.tsx,tests/**,scripts/**/*.test.ts,vscode-extension/**/*.test.js}⚙️ CodeRabbit configuration file
Files:
**⚙️ CodeRabbit configuration file
Files:
🔇 Additional comments (2)
📝 WalkthroughWalkthrough
ChangesResponses API reasoning payload fix
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Suggested reviewers
🚥 Pre-merge checks | ✅ 7✅ Passed checks (7 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
this is a duplicate of #1639 |
What
Adding an OpenAI-compatible provider on the Responses API (e.g. GPT-5.5 via
/provider) failed on the first request with:Why
In
src/services/api/openaiShim.ts, the responses body set the flatreasoning_effort/reasoning_summaryfields. Those belong to Chat Completions — the Responses API nests them under areasoningobject (reasoning.effort/reasoning.summary) and rejects the flat form.Change
Emit
reasoning: { effort, summary }when building the responses body. The chat-completions path is untouched (the flatreasoning_effortis correct there).Test
Added a responses-API test asserting the nested
reasoningobject is sent and the flatreasoning_effortis absent.bun test src/services/api/openaiShim.test.ts(122 pass) andtsc --noEmitclean.Closes #1638
Summary by CodeRabbit