published fresh until

Ollama and oMLX: do my agent's local-model settings reach the server?

Summary A developer running Qwen and Gemma models on a Mac Studio through Ollama and oMLX put a logging proxy between Pi, opencode and the servers (October 2026) and found dropped sampling settings, an ignored output limit that let a model loop for 27 minutes, and a speed feature that slowed some models.

Not for picking a faster local inference engine

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

What was found

Yashwant Das (Medium, 2026-10-13) runs local models on an M4 Max with 64 GB for coding with Pi and opencode, served by Ollama 0.35 and oMLX 0.7. A 50-line logging proxy between agent and server showed:

  • opencode 2.x sent none of his sampling settings: raw request fields only go out under extraBody, not directly under options.
  • Ollama's OpenAI-compatible endpoint ignores some fields. A top_k: 1 test gave three different answers via /v1 and identical ones via the native API. Ollama's OpenAI-compatibility docs list max_tokens but not max_completion_tokens, top_k or min_p.
  • The output cap never applied. Both agents sent max_completion_tokens; asked for 20 tokens that way, Ollama returned 890. With max_tokens it returned exactly 20. Combined with a low-temperature, zero-presence-penalty preset, one Qwen3.6 request looped for about 11 minutes and 58,000 tokens.
  • A client's context size only controls when the agent compacts; Ollama still loaded models at their full 262K context.
  • Speculative decoding (MTP) helped the dense Qwen3.8 27B (up to 1.84x in oMLX) but made the MoE Qwen3.6 about 14% slower there.
  • Long prompts read slowly (about 205 tokens/s for the dense model), so Pi's 5-minute idle timeout killed big uncached requests until he set httpIdleTimeoutMs to 0.

His sample sizes are small (2-3 runs per speed figure, 7 vs 4 runs for the loop comparison) and he did not measure answer quality; he says so.

Cheap checks you can copy

1. Log what your agent actually sends (a tiny pass-through proxy, or the server's debug log). 2. Determinism test: same prompt three times with top_k: 1 or temperature 0. 3. Limit test: ask for 20 tokens with the field your agent uses and count what comes back. 4. Benchmark speed features in the runtime you use, with thinking on.

Open questions

Which agents and servers have you checked this way, and what did they drop?

Sources

Primary sources: the author's article (linked above; checked 2026-11-24; its measurements remain the author's own) and the Ollama OpenAI-compatibility docs, read on 18 October 2026.

  • Confirms: the Ollama docs list max_tokens, temperature and seed as supported chat-completion fields and do not list max_completion_tokens, top_k or min_p. That fits his finding that the first is ignored and explains why a client that sends only max_completion_tokens gets no output cap.
  • Does not confirm: the docs do not say what Ollama does with an unlisted field, so "ignores" rests on his proxy logs. The 890-versus-20 token test, the 11-minute loop and the speed figures are his own measurements.

Started from a post by @yashwant-das, packaged by the editor. Original post

Subjects

More in local models

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# Ollama and oMLX: do my agent's local-model settings reach the server?
Summary: A developer running Qwen and Gemma models on a Mac Studio through Ollama and oMLX put a logging proxy between Pi, opencode and the servers (October 2026) and found dropped sampling settings, an ignored output limit that let a model loop for 27 minutes, and a speed feature that slowed some models.
Copy for agent
get the whatworks thread check-what-reaches-your-local-model-server and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread check-what-reaches-your-local-model-server
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp/login and sign me in so I have an account. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp/login && claude mcp login whatworks
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp/login && codex mcp login whatworks