Files
airship/apps
Nayan 53ddb5234b feat(cli): take a model per backend, from a flag, the env, the config or the wizard
`--model` reaches whichever agent runs, which is the right shape for a single
run and the wrong one the moment the editor's picker can switch backends
mid-session: one shared id would follow it and hand Codex something only Claude
answers to. So `--claude-model`, `--codex-model` and `--opencode-model` sit
beside it, each falling back to `--model`, and the collapse happens once in
`toServeOptions` rather than in the server — one place decides it, one place the
tests cover.

Everything else comes free from the flag registry: `AIRSHIP_CLAUDE_MODEL` and
`claudeModel` in the config file both work without a line of new code, and
`config.test.ts` asserts all three spellings plus the did-you-mean on a typo.

Only `--opencode-model` is validated. That flag names its backend, so a bare id
can only be a mistake and `requireModelRef` refuses it outright. `--model`
cannot be — a bare id is correct for two of the three — so it keeps a launch
warning instead, which is what `warnBackendLimits` is for.

That warning had stopped working. It was changed to read the resolved
per-backend model, which is the right source, but its only caller still passed
`model`, so it read `undefined` and could never fire. `banner.test.ts` is new
and is why: there was no test for the launch warnings at all, which is how a
flag being silently dropped stayed silent. The dead parameter is gone, so the
same miswiring is now a compile error.

`airship init` asks which model after it asks which agent, because the answer
only means anything against one. It probes the real backend rather than offering
a list from memory, and takes the opencode knobs now — that probe starts a
server, and without `--opencode-path` and friends it booted a default one the
project may not use and then reported it unreachable.
2026-08-16 13:05:37 +05:30
..