This repository was archived by the owner on May 15, 2026. It is now read-only.
fix: default OpenAI Compatible provider to XML protocol for better third-party proxy compatibility - #10248
Closed
ghost wants to merge 1 commit into
Closed
fix: default OpenAI Compatible provider to XML protocol for better third-party proxy compatibility#10248ghost wants to merge 1 commit into
ghost wants to merge 1 commit into
Conversation
…ird-party proxy compatibility
Author
Review completed. Found 1 issue that needs to be addressed before merging.
Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues. |
ghost
commented
Dec 21, 2025
Comment on lines
+554
to
+557
| // Default to XML for OpenAI Compatible providers since third-party proxies | ||
| // have varying levels of support for native tool calling. Users who want | ||
| // native tool calling can explicitly enable it in Advanced Settings. | ||
| defaultToolProtocol: "xml", |
Author
There was a problem hiding this comment.
This change will cause test failures in webview-ui/src/components/ui/hooks/__tests__/useSelectedModel.spec.ts. Lines 705 and 737 expect defaultToolProtocol to be "native", but this change sets it to "xml". Those tests need to be updated to expect "xml" instead.
Fix it with Roo Code or mention @roomote and request a fix.
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Related GitHub Issue
Relates to: #10246
Roo Code Task Context (Optional)
This PR was created with the assistance of Roo Code to address user feedback.
Description
This PR attempts to address Issue #10246 by changing the default Tool Protocol for OpenAI Compatible providers from
nativetoxml.Problem:
Users of third-party API proxies (OpenAI Compatible providers) frequently encounter the error message "The model provided text/reasoning but did not call any required tools" (模型提供了文本/推理,但未调用任何必需的工具). This occurs because:
openAiModelInfoSaneDefaultshaddefaultToolProtocol: "native"Solution:
defaultToolProtocolinopenAiModelInfoSaneDefaultsfrom"native"to"xml"Changes:
packages/types/src/providers/openai.ts: ChangeddefaultToolProtocolfrom"native"to"xml"inopenAiModelInfoSaneDefaultssrc/utils/__tests__/resolveToolProtocol.spec.ts: Updated test to expect XML protocol for OpenAI Compatible providerTest Procedure
Pre-Submission Checklist
Screenshots / Videos
N/A - configuration change
Documentation Updates
Additional Notes
This change prioritizes compatibility for users of third-party API proxies, which is the primary use case for OpenAI Compatible providers. Users who connect to native OpenAI API or proxies with full native tool support can still explicitly set Tool Protocol to "Native" in Advanced Settings.
This complements PR #10247 which improved the error message guidance. This PR addresses the root cause by changing the default to the more compatible option.
Feedback and guidance are welcome!