Files
zed/crates/language_models
tidely f02fe65230 ollama: Add thinking level selection support (#64642)
# Objective

Ollama recently added support for exposing available thinking levels in
their API. Previously models such as `qwen3.8:27b` would default to
excessive thinking levels, and the only way to change this was to change
Zed's settings. By adopting the newly exposed values in the API, we can
select thinking levels with the Ollama provider.

https://github.com/ollama/ollama/releases/tag/v0.34.3

## Solution

Adopt the new API and map the exposed values to their Zed equivalents.
Most of the changes are moving around code and adding tests

## Testing

- Tested this to be working locally using Ollama
- Added comprehensive tests for serialization and mapping

## Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content adheres to Zed's UI standards
([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
and
[icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md)
guidelines)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Release Notes:

- Added thinking level selection support for the Ollama provider
2026-11-24 18:36:49 +00:00
..
2026-11-24 12:02:03 +00:00