Back Home

GitHub Repo

Ollama v0.40.14 Fixes Sampling Defaults in the OpenAI-Compatible API, Preserving Model Settings When Parameters Are Omitted

Released on November 3, Ollama v0.40.14 changes how OpenAI-compatible endpoints handle sampling parameters. Applications that omit `temperature` or `top_p` may see different outputs after upgrading, so benchmarks and agent workflows should be revalidated.

Mattruffoni · CC BY-SA 4.0 · Image source
zh-Hant

Ollama released v0.40.14 on November 3, changing how its OpenAI-compatible endpoints handle parameters: when a client omits temperature or top_p, Ollama now uses the sampling settings in the model package instead of overriding them with 1.0. This aligns the behavior with the native /api/chat endpoint. The fix directly affects applications that connect to local models through the compatibility interface. Release announcement

The technical issue is the meaning of an “omitted parameter.” Ollama’s Modelfile lets users define model runtime settings with PARAMETER; temperature affects the sampling distribution, while top_p controls the range of candidates based on cumulative probability. If an interface supplies fixed values on its own, the actual sampling conditions can differ even when the underlying weights and prompt are identical. Engineers can inspect a model’s bundled settings with ollama show --modelfile. Modelfile documentation

For existing systems, calls that do not explicitly specify sampling parameters deserve attention. The change suggests that these requests may use different effective settings after an upgrade, potentially affecting response diversity, code generation, or tool selection. These are possible consequences of the changed parameter inheritance rules; the release announcement provides no data on quality improvements or agent success rates. If an application framework fills in parameters itself, check the actual request sent rather than relying on whether the higher-level code omits the fields.

To validate the change, hold the model version and test prompts constant, compare results with parameters omitted and explicitly set, and record the service version and model settings. The official documentation confirms that the compatibility interface lets existing clients connect to a local service, but supports only a subset of the API. Alignment in sampling behavior therefore does not mean that all interface semantics are identical. OpenAI-compatible API documentation

As of verification, the releases page lists v0.40.14 as the latest stable release. It was published about 20 minutes before the strict two-day lookback window began, making it a supplementary item close to the cutoff. Going forward, pay attention to the parameters actually used by different model packages and clients; the same model name alone does not establish that benchmark conditions are consistent.

Sources

  1. Ollama v0.40.14-rc0 release
  2. openai: don't override model sampler defaults #19432
  3. Modelfile Reference
  4. OpenAI compatibility
  5. Ollama v0.40.14 版本公告