feat: restore XML tool protocol option for OpenAI-Compatible provider#10347
feat: restore XML tool protocol option for OpenAI-Compatible provider#10347roomote-v0[bot] wants to merge 1 commit into
Conversation
This restores the ability for users of the OpenAI-Compatible provider to
explicitly select XML tool protocol, fixing compatibility issues with
backends like SGLang/vLLM that do not support native tool calling.
Changes:
- Modified resolveToolProtocol.ts to respect user toolProtocol preference
for the OpenAI-Compatible provider ("openai")
- Added Tool Protocol selector to OpenAICompatible.tsx component
- Added tests for the new behavior in resolveToolProtocol.spec.ts
- Updated OpenAICompatible.spec.tsx to mock Select components
Fixes #10319
Review complete. No issues found. This PR correctly restores the XML tool protocol option for the OpenAI-Compatible provider by:
The implementation is clean and well-tested. Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues. |
PR marked as ready for review. All tests pass (40 tests total across backend and UI). |
Review complete. No issues found. This PR correctly restores the XML tool protocol option for the OpenAI-Compatible provider by:
The implementation is clean and well-tested. Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues. |
|
Please merge quickly, I need it. |
|
Also waiting for this to be merge to fix issues with Seed-OSS 36B hosted in VLLM. Relying on an older version for now. |
|
https://blog.roocode.com/p/sorry-we-didnt-listen-sooner-native |
Okay, that's great and all. I agree it should be the responsibility of the inference server to ensure the model's esoteric tool calling is properly parsed into OpenAI-compatible format. However, removing a default setting in a minor release without any sort of deprecation notice leading up to the change is not a good look. For anyone stuck in the same boat, I think this comes down to ensuring the OpenAI-compatible server is using a proper tool calling parser. In my case, I'm using In the future, can we expect any sort of deprecation notices for significant changes like this in the future? |
This PR attempts to address Issue #10319 by restoring the ability for users of the OpenAI-Compatible provider to explicitly select XML tool protocol.
Problem
In v3.37+, the Tool Call Protocol selector was removed and all new tasks are forced to use native tool calling. This breaks users with OpenAI-Compatible endpoints backed by servers like SGLang or vLLM that do not support native tool calling (e.g., HarmonyParser throws
NotImplementedError: structure_info not used with HarmonyParser).Solution
This PR:
resolveToolProtocol.tsto respect the user'stoolProtocolpreference when using the OpenAI-Compatible provider (apiProvider === "openai")OpenAICompatible.tsxPrecedence Logic
The updated
resolveToolProtocol()function now follows this precedence:toolProtocolsetting only forapiProvider: "openai")This approach:
Feedback and guidance are welcome.
Important
Restores XML tool protocol option for OpenAI-Compatible provider, adds UI selector, and updates tests.
resolveToolProtocol.ts.OpenAICompatible.tsx.resolveToolProtocol.spec.tsandOpenAICompatible.spec.tsx.resolveToolProtocol()now respects user preference for XML protocol for OpenAI-Compatible provider.OpenAICompatible.tsx.This description was created by
for 89fd5a6. You can customize this summary. It will automatically update as commits are pushed.