fix(responses): preserve image tool_choice without pass-through - #2218
Conversation
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughThe OpenAI Responses transformers now preserve non-function tool choice types without requiring a name. Outbound conversion omits empty names. Tests cover inbound conversion and outbound image-generation serialization. ChangesImage-generation tool choice handling
Estimated code review effort: 2 (Simple) | ~10 minutes Mergeability Score: ⚪ Minimal · up to This localized change preserves image tool-choice behavior during request conversion and adds regression coverage; no actionable merge-blocking risk remains after normal checks and review. Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 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 |
* upstream/unstable: (48 commits) fix(codex): skip pass-through for unsupported response limits (looplj#2217) fix(responses): preserve image tool_choice without pass-through (looplj#2218) chore(actions): upgrade workflows to node24 actions (looplj#2219) fix(prompts): Parse project GUIDs in prompt schema (looplj#2200) feat: add xai_responses channel type (looplj#2212) fix(responses): harden stream terminal, retry, and resource boundaries (looplj#2196) fix(trace): only persist explicitly identified traces (looplj#2208) feat: hide unroutable configured models from public lists (looplj#2215) feat(quota): track OpenCode Go quota via official usage API (looplj#2204) fix: align codex quota bar colors (looplj#2166) feat(quota): add Charm Hyper credit balance checker (looplj#2199) fix(i18n): change currency code example from RMB to CNY (looplj#2202) feat: unify auto-refresh controls and stabilize list animations (looplj#2198) opt: anthropic signature recognization (looplj#2197) fix: model associate condition caused model not found, close looplj#2183 (looplj#2194) fix(responses): retry incomplete streams before done (looplj#2192) feat: show request cache rate, close looplj#2170 (looplj#2193) chore: add log for chat heartbeat (looplj#2191) fix(sqlite-time-format-compat): 兼容 SQLite TEXT 时间戳格式并修复 backup 注册时区退化 (looplj#2189) feat(models): add thinkingmachines as model developer (looplj#2190) ... # Conflicts: # .github/workflows/docker-publish.yml
…lj#2218) * fix(responses): preserve type-only tool choices Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai> * fix(responses): omit empty tool choice names Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai> --------- Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai> (cherry picked from commit d1cde09)
Summary
{"type":"image_generation"}during inbound conversiontool_choice.nameon outbound unless a function name is presentgpt-5.5+image_generationusinggpt-image-2when body pass-through is disabledScope
This is intentionally separate from #2217. This PR only fixes the non-pass-through transformer path where
tool_choicebecame{}and Codex returnedMissing required parameter: 'tool_choice.type'.Test
cd llm && go test ./transformer/openai/responses -run 'Test(OutboundTransformer_TransformRequest_ImageGenerationToolChoice|ConvertToolChoiceToLLM)' -count=1Summary by CodeRabbit
Bug Fixes
Tests