Ollama v0.40.14 Fixes Sampler Defaults and Claude Code Limits
The runtime's latest patch stops OpenAI-compatible endpoints from overriding a model's own sampling settings and applies model token limits for Claude Code.
Ollama v0.40.14 ships a stack of compatibility fixes
Ollama released v0.40.14 on 03 Nov, a maintenance update covering 35 commits since v0.40.13. According to the GitHub release notes, the release does not add models. It changes how the runtime handles token limits, sampling defaults, response decoding, and two of its launcher commands.
What the source confirms
The release notes list seven changes:
ollama launch claudenow applies the model's output token limit for Claude Code, so cloud models no longer run into the 128k default cap.- Cloud web search responses on
/api/chatdecode correctly, including compressed responses. - OpenAI-compatible endpoints no longer override a model's packaged sampler defaults. Clients that send no
temperatureortop_pget the model's own values instead of 1.0, matching/api/chat. /v1/responsespreserves readable input content, including prior assistant refusals, rather than flattening it.- Ollama's app can now retry ChatGPT disconnect failures instead of leaving the connection in a broken state.
ollama launch codexverifies ChatGPT routing before configuring, and reports a clear error when routing is unavailable.- Top-k sampling is faster on MLX for large vocabularies.
Why the sampler default change matters most
The third item is the one most likely to affect production code. A model can ship with packaged sampler settings, meaning the temperature and top-p values that come bundled with it. Before this release, a client hitting the OpenAI-compatible endpoints and sending no explicit temperature or top_p received 1.0 instead of those packaged values. After v0.40.14, it receives the model's own settings, the same behaviour /api/chat already had.
The notes present this as an alignment fix between two surfaces of the same server. Anyone running both the native API and the OpenAI-compatible layer can now expect them to behave the same way when a request leaves sampling parameters out.
Inference: what likely changes in practice
The source does not describe the practical fallout, so this is inference. Code that relied on the old behaviour, explicitly or implicitly, will likely produce different output after upgrading. A tool that omitted temperature and quietly received 1.0 will now inherit whatever the model package specifies. If reproducibility matters, set the sampler values explicitly rather than depending on defaults from either side.
The Claude Code fix suggests a similar pattern: cloud models reached through ollama launch claude were being held to a 128k default cap rather than the model's own output limit. The notes say the limit is now applied, and do not describe what the previous behaviour looked like in generated output.
Limits and open questions
The release notes are terse. They do not name the cloud models affected by the token limit change, they do not list which models carry packaged sampler defaults or what those values are, and they give no measurement for the MLX top-k speedup beyond calling it faster for large vocabularies. It is also unclear whether the ChatGPT retry logic in Ollama's app applies to every failure mode or only disconnect errors. The /v1/responses change is described in terms of preserving readable input content; how that content was being flattened before is not explained.
One detail worth noting for anyone tracking versions: the release is explicitly diffed against v0.40.13, so this is a patch-level bump rather than a feature release.
What it means for people building with AI
Most of the value here is in API consistency. If your app talks to a local runtime through an OpenAI-shaped interface, changes to default sampling behaviour are the kind of thing that shows up as unexplained drift in output quality rather than as an error. Pin versions, and set sampling parameters in code when it matters. For background on how model choice and chat behaviour are configured in an app builder, Draftship's documentation on using the AI chat and choosing a model covers the concepts. Draftship is not affiliated with Ollama.
Primary sources
- v0.40.14 · Ollama releases, Nov 3, 2026
This article was drafted with AI assistance from the primary sources listed below and checked automatically against them. An editor hasn't reviewed it yet.