SIGN IN SIGN UP

fix(byoa): let a local engine keep its own model (custom providers) (#32)

Fixes #21.

Cumora pins a model per agent — participants.model, else the deploy-level
CUMORA_DEFAULT_CLAUDE_MODEL / CUMORA_DEFAULT_CODEX_MODEL — and the daemon passes
it to the local CLI as `--model`. The pin exists for a good reason: without it a
CLI upgrade silently changes every agent's behaviour.

But the pin is resolved SERVER-side and names an Anthropic/OpenAI model. When an
operator points their local `claude` at a custom provider (CC Switch and
friends), that provider has never heard of `claude-opus-4-7`, so every turn dies
with "There's an issue with the selected model" — while the same CLI works fine
in their terminal. On hosted Cumora they cannot change the pin at all, and the
only daemon-side escape was CUMORA_CLAUDE_ARGS, which drops `--model` but also
disables the persistent session and makes them hand-write the whole flag set.

Add CUMORA_ENGINE_MODEL, the big-brain counterpart of the CUMORA_TRIAGE_MODEL
escape the small brain already had:

  unset      → the model Cumora pinned (unchanged default)
  local      → pass NO model; the CLI runs on what it is configured for
  <model id> → use that model instead

`local` also drops the small/fast pin, because leaving
ANTHROPIC_SMALL_FAST_MODEL naming a model the provider lacks would just move the
failure from the turn to the CLI's own quick calls. A concrete override replaces
only the big-brain pin.

Also make `doctor`'s small-brain probe honour CUMORA_TRIAGE_MODEL instead of
hardcoding haiku / gpt-5.4-mini. It was probing a different model than triage
actually runs, so an operator whose provider lacks haiku saw a red small brain
even when their triage was configured correctly — the diagnostic contradicted
the thing it was meant to diagnose.

Verified end to end against a fake CLI that echoes its argv:

  unset                  → --model claude-opus-4-7   fast pin: claude-haiku-4-5
  local                  → (no --model)              fast pin: none
  my-provider/glm-4.6    → --model my-provider/glm-4.6  fast pin: claude-haiku-4-5
X
Xialie Zhuang committed
a5f485b425d26c70f119d6c88dbe57ae37031099
Parent: 9b9b60a
Committed by GitHub <noreply@github.com> on 8/19/2026, 8:02:50 PM