Add interleaved_reasoning option to openai compatible models (#54016)
Release Notes: - Added interleaved_reasoning option to openai compatible models --- This PR adds the interleaved_reasoning option for OpenAI-compatible models, addressing the issue described in https://github.com/ggml-org/llama.cpp/issues/20837. In my testing, enabling interleaved_reasoning not only resolved the tool-calling issues encountered by Qwen3.5 models in llama.cpp, but also appeared to improve the model's coding capabilities. I have also verified the outgoing requests using a proxy to ensure the parameter is being sent correctly.It is also likely that this change will benefit other models and providers as well. Note: While I used AI to assist with the implementation, I have reviewed and tested the changes. As I am relatively new to Rust and the Zed codebase, I would appreciate any feedback or suggestions for improvement. I am happy to make further adjustments if needed. Thank you all for building such an amazing editor! Co-authored-by: Oleksiy Syvokon <oleksiy@zed.dev>
This commit is contained in:
1 parent
eadc501c73
commit
17fbf34ddf
14 files changed
+127
No files matched your search
@@ -607,6 +607,7 @@ By default, OpenAI-compatible models inherit the following capabilities:
|
||||
- `parallel_tool_calls`: false (does not support `parallel_tool_calls` parameter)
|
||||
- `prompt_cache_key`: false (does not support `prompt_cache_key` parameter)
|
||||
- `chat_completions`: true (calls the `/chat/completions` endpoint)
|
||||
- `interleaved_reasoning`: false (thinking tokens are sent inline in message text; set to true to send them as a dedicated `reasoning_content` field for models that expect it)
|
||||
|
||||
If a provider exposes models that only work with the Responses API, set `chat_completions` to `false` for those entries. Zed uses the Responses endpoint for these models.
|
||||
|
||||
|
||||
Reference in new issue
Block a user