# Add interleaved_reasoning option to openai compatible models \(\#54016\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/7b082cbb6f9f24ff1c4a6d2d7b998c08c7576929)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 7b082cbb6f9f24ff1c4a6d2d7b998c08c7576929

Requested commit: 7b082cbb6f9f24ff1c4a6d2d7b998c08c7576929

Commit: 7b082cbb6f9f24ff1c4a6d2d7b998c08c7576929

Tree: f001269a40a9def46a7356334df5ca46ddb9ba1d

Author: Guilherme do Amaral Alves

Committer: GitHub

## Message

```
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>
```

## Parents

- [8f0efe9f34d524345e293297ee4389a2378a453c](https://git.cafe/gitcafe/zed/commit/8f0efe9f34d524345e293297ee4389a2378a453c?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/7b082cbb6f9f24ff1c4a6d2d7b998c08c7576929?format=markdown)
