A model its provider does not serve has no window in troupe models, as text or JSON, whether a role names it or not, and the VS Code extension's Settings view shows a config that does not load as the errors troupe config --explain --json prints¶
Decision 799 · accepted · 2026-10-06
- The model list.
Config.models/1gives every model the windowcontext_window/2plans compaction against: what a file declares, else what the provider's list said, elsecontext_window(200,000 by default, TUI Decision 17). For a model its provider has answered without, that last is a number nobody said, andtroupe models --jsonprinted it ascontext: 200000besideserved: false; the text printed200k ctxfor any such model no role named, since only a role's model read NOT SERVED (778). - The editor. A config that does not load makes
troupe config --explain --jsonexit 1 with{"errors": [...]}on standard output and nothing on standard error (783 kept it so for a program). The Settings view read standard error only, and with nothing there showed Node's own message,Command failed: <path> config --explain --json .... - No window for a model nobody serves.
Troupe.Config.Models.json/2givescontext: nullto every model whoseservedisfalse, a role's or not, and whatever a file declares for it: a window describes a model a session can call, and this one fails a turn. A price the config gives it is still there (as 794 shows it: someone wrote it down).served: null(the provider has not answered) keeps the fallback, since that is what a session on it would plan against and nothing says it is not served. - The text says so for every model.
describe/2asksStore.served/3of each model, not only a role's. A role's model stays as 778 has it, loud,NOT SERVED by openai; it serves ...in place of window and price. Any other readsnot served by openai, then its config price, where its facts came from andno key, as the extension's row does (794): the text is loud about what would fail a turn (783), and a model nobody chose does not, so it is said where its window was, without the five nearest ids on every such line. - Only what is reported.
Config.models/1andcontext_window/2are unchanged: compaction,compact_threshold/2and the TUI's model menu (Troupe.Settings.choices/3) read them, and a model with no window is what the fallback is for. The JSON and the text decide "not served" from the cache's record, whichmodels/1does not read. - The extension reads what a failing
troupeprinted.runmoved fromsettingsView.tstorun.ts, which has novscodeimport, so a unit test runs it against a faketroupe; a failure rejects withFailed, carrying standard output.settingsFailedturnserrorsthere into a group, "The configuration did not load", one row an error, each as the Problems group shows a refusal (the message,file:line, a click opening the file at the line), with anything a key could be taken out of the message (794's helper). Any other failure,{"errors": []}and output that is not JSON among them, is the one line it was, from standard error. The Models group is still asked and says why it could not list them. - Older
troupes. The extension's Models group already gave a not-served model no window (794), so it reads atroupebefore this one and after it the same.
Governs: apps/troupe_core/lib/troupe/config.ex, apps/troupe_core/lib/troupe/config/models.ex, clients/vscode/src/run.ts, clients/vscode/src/settings.ts, clients/vscode/src/settingsView.ts