feat(openai-compat): honor tool_choice on /v1 passthrough - #99
Merged
Conversation
cidrblock
approved these changes
Aug 4, 2026
cidrblock
force-pushed
the
feat/openai-compat-tool-choice
branch
from
August 4, 2026 12:50
4fc1006 to
4c35824
Compare
Collaborator
|
Rebased onto Conflict was a DR number collision in Force-pushed: |
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
tool_choice(auto/none/required/ specific function) to AI SDKtoolChoicewhenopenai_compattools mode ispassthrough(DR-032 / DR-046)tool_choice,required/specific-function without usabletools, and unknown function names with400 invalid_request_errortool_choiceignored when tools mode isoff(same secure default astools)CONFIGURATION.mdand record DR-046 (renumbered: main already used DR-045 for VS Code webview UX)Closes #77
Rebase note
Rebased onto
mainto resolvedocs/decisions.mdconflict (DR number collision). Tool_choice decision is now DR-046.Test plan
mapOpenAIToolChoice/validateToolChoiceAgainstToolscover all shapes + invalid inputsnone/required/ specific function; off mode ignorestool_choicetool_choice,requiredwithout tools, and unknown function → 400streamTextreceivestoolChoicewhen tools are presentopenai_compat.tools: passthrough, call/v1/chat/completionsfrom Open WebUI / curl withtool_choice: "none"and"required"and confirm model behavior