# language_models: Add thinking support for ollama \(\#31665\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 65e3e84cbc5c1fe1e6ff86c26ce609123452194c

Requested commit: 65e3e84cbc5c1fe1e6ff86c26ce609123452194c

Commit: 65e3e84cbc5c1fe1e6ff86c26ce609123452194c

Tree: 63f955b3e87abe4b568e4bfd50fcea98d6a53f46

Author: Umesh Yadav

Committer: GitHub

## Message

```
language_models: Add thinking support for ollama (#31665)

This PR updates how we handle Ollama responses, leveraging the new
[v0.9.0](https://github.com/ollama/ollama/releases/tag/v0.9.0) release.
Previously, thinking text was embedded within the model's main content,
leading to it appearing directly in the agent's response. Now, thinking
content is provided as a separate parameter, allowing us to display it
correctly within the agent panel, similar to other providers. I have
tested this with qwen3:8b and works nicely. ~~We can release this once
the ollama is release is stable.~~ It's released now as stable.

<img width="433" alt="image"
src="https://github.com/user-attachments/assets/2983ef06-6679-4033-82c2-231ea9cd6434"
/>


Release Notes:

- Add thinking support for ollama

---------

Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
```

## Parents

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

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