Repository navigation
fix(translator): strip neutral tool_choice when tools absent in Responses-to-Chat (#12141) - #12166
Merged
diegosouzapw merged 1 commit intoSep 1, 2026
Conversation
…nses-to-Chat (diegosouzapw#12141) Signed-off-by: Minxi Hou <houminxi@gmail.com>
diegosouzapw
added a commit
that referenced
this pull request
Sep 1, 2026
…12248) Merging --admin with red discrimination (merge-gates §4). The only failing check is Fast Quality Gates → `mutation-test-coverage`, which cannot be caused by this PR: the diff touches exactly one file, `CLAUDE.md` (13 deleted lines, zero .ts). The same gate is red on #12166, #12167 and #12169 — three unrelated PRs — confirming inherited base drift rather than a PR-introduced defect.
This was referenced Sep 1, 2026
Owner
|
Validated in local merge-train on 192.168.0.113 — train of #12258 #12262 #12166 #12281 #11259 #11950 merged clean onto
|
diegosouzapw
merged commit Sep 1, 2026
9629d78
into
diegosouzapw:release/v3.8.51
15 of 16 checks passed
This was referenced Sep 1, 2026
muhamadgalihsaputra
pushed a commit
to niyatna/NiyatnaRoute
that referenced
this pull request
Sep 27, 2026
…w#11770)" (diegosouzapw#12248) Merging --admin with red discrimination (merge-gates §4). The only failing check is Fast Quality Gates → `mutation-test-coverage`, which cannot be caused by this PR: the diff touches exactly one file, `CLAUDE.md` (13 deleted lines, zero .ts). The same gate is red on diegosouzapw#12166, diegosouzapw#12167 and diegosouzapw#12169 — three unrelated PRs — confirming inherited base drift rather than a PR-introduced defect.
muhamadgalihsaputra
pushed a commit
to niyatna/NiyatnaRoute
that referenced
this pull request
Sep 27, 2026
…nses-to-Chat (diegosouzapw#12141) (diegosouzapw#12166) Signed-off-by: Minxi Hou <houminxi@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #12141.
When clients invoke the
/v1/responsesendpoint with neutraltool_choice("auto"or"none") without providing tools (or passingtools: []), translating to Chat Completions (openaiResponsesToOpenAIRequest) previously preservedtool_choiceverbatim. Strict Chat Completions backends (such as vLLM, Ollama, and strict OpenAI-compatible engines) reject requests containingtool_choicewithouttoolswithHTTP 400: When using tool_choice, tools must be set.Changes
open-sse/translator/request/openai-responses.ts: InopenaiResponsesToOpenAIRequest, after tool extraction and filtering, whenfinalChatTools.length === 0andresult.tool_choiceis"auto"or"none", deleteresult.tool_choice. Contradictory choices ("required"or explicit function objects) remain preserved so upstream contracts remain transparent.tests/unit/responses-to-chat-no-tools-tool-choice-12141.test.ts: Dedicated test suite verifying empty tools withauto,none, valid tools preservation, and contradictory choice retention.tests/unit/responses-translation-fixes.test.ts: Updated existing test case to verify both with-tools preservation and without-tools stripping.Verification
npm run typecheck:core: 0 errors.npm run check:cycles: PASS (no cycles).node --test tests/unit/responses-to-chat-no-tools-tool-choice-12141.test.ts tests/unit/responses-translation-fixes.test.ts: 48/48 PASS.