# language_models: Actually override Ollama model from settings \(\#38628\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 3646aa6bbaa437b0e173c8960f1a4ae42dd934b4

Requested commit: 3646aa6bbaa437b0e173c8960f1a4ae42dd934b4

Commit: 3646aa6bbaa437b0e173c8960f1a4ae42dd934b4

Tree: 8777edf901210dc5a04811755edeb7053e274a94

Author: Umesh Yadav

Committer: GitHub

## Message

````
language_models: Actually override Ollama model from settings (#38628)

The current problem is that if I specify model parameters, like
`max_tokens`, in `settings.json` for an Ollama model, they do not
override the values coming from the Ollama API. Instead, the parameters
from the API are used. For example, in the settings below, even though I
have overridden `max_tokens`, Zed will still use the API's default
`context_length` of 4k.

```
  "language_models": {
    "ollama": {
      "available_models": [
        {
          "name": "qwen3-coder:latest",
          "display_name": "Qwen 3 Coder",
          "max_tokens": 64000,
          "supports_tools": true,
          "keep_alive": "15m",
          "supports_thinking": false,
          "supports_images": false
        }
      ]
    }
  },
```

Release Notes:

- Fixed an issue where Ollama model parameters were not being correctly
overridden by user settings.
````

## Parents

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

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