OpenAI compatibility: reasoning parser coverage and robust tool-call handling#411
Open
lesj0610 wants to merge 6 commits intotheroyallab:mainfrom
Open
OpenAI compatibility: reasoning parser coverage and robust tool-call handling#411lesj0610 wants to merge 6 commits intotheroyallab:mainfrom
lesj0610 wants to merge 6 commits intotheroyallab:mainfrom
Conversation
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
This PR improves OpenAI-compat behavior in
tabbyAPI(ExLlamaV3 backend path), with a focus on correctness, maintainability, and parser/tool-call robustness.Included changes
endpoints/OAI/reasoning/.reasoning_parser) with default fallback (basic) when unspecified.reasoning/reasoning_contentandcontent.tool_choice: none | auto | requiredand named function choice,<tool_call>...</tool_call>),tool_callshandling.tojsoncompatibility for templates usingtojson(ensure_ascii=False).enable_thinking/thinkingintochat_template_kwargs(template_vars) during request validation.Validation
/v1/chat/completions,none,required, named function),License and attribution
THIRD_PARTY_LICENSES.mdLICENSES/Apache-2.0.txtAdditional update (EXAONE4 parser hardening)
endpoints/OAI/reasoning/exaone4_reasoning_parser.pyinto a standalone parser (no runtime delegation toDeepSeekR1ReasoningParser/DeepSeekV3ReasoningParser).enable_thinkingon/off in both non-streaming and streaming flows.tests/exaone4_reasoning_parser_test.py(prefill/no-start-token streaming, end-token split, non-thinking content-only behavior).Additional update (vLLM-style tool parser registry)
hermes,llama/llama3_json/llama4_json,openai,pythonic,qwen3_coder,qwen3_xml,deepseek_v3,deepseek_v31,deepseek_v32llama->llama3_json) and native-generation decision helpersb71647a