fix: default OpenAI Compatible provider to XML protocol for better third-party proxy compatibility#10260
fix: default OpenAI Compatible provider to XML protocol for better third-party proxy compatibility#10260roomote[bot] wants to merge 1 commit intomainfrom
Conversation
…ird-party proxy compatibility
Review complete. No issues found. The change correctly defaults the OpenAI Compatible provider to XML protocol for better third-party proxy compatibility, addressing the regression from PR #10213. The tests have been appropriately updated, and other providers (LM Studio, VSCode LM, Claude Code) are unaffected since they define their own Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues. |
|
Closing this PR in favor of #10460 which addresses the root cause more effectively.\n\nAnalysis:\nThis PR changes |
This PR attempts to address Issue #10259.
Problem
In version 3.36.15, PR #10213 introduced a change that merges native tool defaults (
supportsNativeTools: true,defaultToolProtocol: "native") for the OpenAI Compatible provider. This caused a regression where users with custom model configurations (like DeepSeek-R1 via LiteLLM proxy) who did not explicitly setdefaultToolProtocolwould now receive native tool calls, which many third-party proxies do not support.The error manifests as:
500 Internal server error: Unsupported tool_call_parser: NoneSolution
Change
openAiModelInfoSaneDefaults.defaultToolProtocolfrom"native"to"xml"for the OpenAI Compatible provider.This ensures better compatibility with third-party proxies by defaulting to XML-based tool calling. Users who want native tool calling can still explicitly enable it in Advanced Settings.
Changes
packages/types/src/providers/openai.ts: ChangeddefaultToolProtocolfrom"native"to"xml"foropenAiModelInfoSaneDefaultssrc/utils/__tests__/resolveToolProtocol.spec.tswebview-ui/src/components/ui/hooks/__tests__/useSelectedModel.spec.tsFeedback and guidance are welcome.