llm-host/llmhost
Neil Bantoc e24c0b7712 Reasoning effort is the dashboard's to set, not the client's
One model is loaded at a time under one setting, and that setting belongs next
to the model it applies to -- the same reason the client can't switch models.
So the proxy now takes a client's reasoning settings off the request before
applying the dashboard's: a top-level reasoning_effort, and enable_thinking or
reasoning_effort inside chat_template_kwargs. Other template kwargs, which
llm-host has no opinion about, still pass through.

This reverses the precedence the proxy had (a client's own kwargs won, mirroring
mlx_lm's own rule), which was the wrong model for a single-model server: clients
offer a generic menu -- opencode's low/medium/high -- and a level the template
doesn't define makes it raise, so every request failed with nothing on the
user's screen to explain it.

- opencode: the provider block disables all three of opencode's effort levels
  instead of curating them. A chooser there would be a menu that does nothing.
- Deletes the nearest-effort mapping (EFFORT_SCALE, nearest_effort,
  plan.effort_levels, the effort_levels= parameter through both backends): it
  existed only to rescue a client-supplied level, and none survives now.
- plan.REASONING_KEYS names the knobs this server drives, with a test asserting
  it stays exactly equal to what reasoning_kwargs can emit -- so a new template
  knob can't be added without also taking it away from clients.
- Two strings that still described a menu of models, from before the block held
  a single entry.

Verified against the live MLX server: with the dashboard on xhigh, five request
shapes (nothing, enable_thinking: false, effort low top-level, effort low in
kwargs, and the off-scale "turbo" that used to 404) all answer identically, and
the reply tracks the dashboard alone as it moves off / low / xhigh.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-11-03 15:01:26 -08:00
..
backends Reasoning effort is the dashboard's to set, not the client's 2026-11-03 15:01:26 -08:00
web Proxy in front of vLLM too; dashboard reset/clear; opencode effort variants 2026-11-03 13:03:52 -08:00
__init__.py Initial llm-host: hardware-aware local LLM server with dashboard 2026-11-02 03:51:06 -08:00
__main__.py Initial llm-host: hardware-aware local LLM server with dashboard 2026-11-02 03:51:06 -08:00
catalog.json Dashboard: a reasoning chooser, offering only what the model accepts 2026-11-03 02:15:12 -08:00
cli.py Reasoning effort is the dashboard's to set, not the client's 2026-11-03 15:01:26 -08:00
hfcache.py Dashboard: a reasoning chooser, offering only what the model accepts 2026-11-03 02:15:12 -08:00
hw.py Initial llm-host: hardware-aware local LLM server with dashboard 2026-11-02 03:51:06 -08:00
opencode.py Reasoning effort is the dashboard's to set, not the client's 2026-11-03 15:01:26 -08:00
paths.py Initial llm-host: hardware-aware local LLM server with dashboard 2026-11-02 03:51:06 -08:00
plan.py Reasoning effort is the dashboard's to set, not the client's 2026-11-03 15:01:26 -08:00
service.py Initial llm-host: hardware-aware local LLM server with dashboard 2026-11-02 03:51:06 -08:00