forked from bchanot/claude
Merge feature/bare-model-dialog into develop
This commit is contained in:
commit
aa86fd3e79
13 files changed
+350
-17
No files matched your search
@@ -331,3 +331,8 @@ rules:
|
||||
- **Cause**: BDR-126 dialog fires only on `/model <name>`; spec said "no args → native picker untouched". Picker = real usage path. Main applied spec without flagging gap.
|
||||
- **Next**: /feat picker scope: pick model in picker, then ask project vs user scope. Check engine types for a settings-write intercept first; else mod must restore user settings (BDR-116 amendment, user call). Links [[BDR-126]].
|
||||
- **Status 2026-10-25**: resolved for the picker, 2202964 (BDR-127: PreModelSwitch deny + deferred scope dialog, no user-settings write by the mod). Residual: `/config` Model row still native (source `command`).
|
||||
|
||||
## BLK-037 — Same-model /model pick fires no PreModelSwitch: no scope question, project pin stays [resolved] (2026-10-29)
|
||||
- **Friction**: `/model` picker, pick = session's current model (Opus 5.5) → native "Set model to `Opus 5.5` and saved as your default… settings.local.json pins `Fable 5.1` — that applies on restart"; no scope question; project pin stays.
|
||||
- **Real cause**: engine fires no `PreModelSwitch` when the pick equals the session model (nothing to switch) → handlePicker (BDR-127) never runs. Proof 2026-10-29: user picked Sonnet 5.5 (different) → "Model switch to Sonnet 5.5 was blocked by a PreModelSwitch hook". First guess (gateway ids `anthropic/claude-opus-5.5`) was a logged-out OpenRouter session, not the bug (3 lenses FATAL).
|
||||
- **Solution**: bare `/model` opens router dialog in command.run (BDR-132), 657e5cb.
|
||||
@@ -1410,6 +1410,7 @@ Branch feature/user-writing-web-rules, UNMERGED (human gate).
|
||||
- **Alternatives rejected**: `$.config.set` (no scope arg); Esc = passthrough (silent tracked write); dialog on unknown names (router can't route them); `canonical()` for written id (strips `[1m]`); shared `modelAnswered` flag (concurrent dispatch clears it).
|
||||
- **Residuals**: stat-then-write race (no no-follow in `$.fs`); dangling-link refusal assumes lstat-like `$.fs.stat`; engine gitignore of created file unverified; live hot-switch on local `model` change unverified; worktree session writes worktree's file (documented). Live check pending ([[LRN-212]]).
|
||||
- **Refs**: contract `.claude/tasks/contracts/2026-10-25-model-scope-dialog-1450.md`, plan r3 same dir `plans/`, commits 1fde5bb, 773fe17. [[BDR-116]], [[BDR-125]], [[EVAL-049]].
|
||||
- **Status (2026-10-29)**: accepted, no-args part superseded by BDR-132 (2026-10-29)
|
||||
|
||||
## BDR-127 — model-router: `/model` picker asks its scope; hand pick always switches [accepted] (2026-10-25)
|
||||
- **Decision**: (1) picker = `classic.PreModelSwitch` source `picker`: gates (router on, string `requested_model` in table, surface present) → `$.session.id()` read → slot held = deny + toast `answer the open dialog first` (never native) → else set `st.asking` sync, `void pickerDialog`, return `{ permissionDecision: 'deny' }`. Dialog after 300 ms sleep = shared `scopeDialog` (same 3 scopes as BDR-126); Everywhere = `$.command.run model <requested>` (native write); stale `session.id` → nothing applied. Default/unknown/headless/other sources → native. (2) hand pick: `Routed.explicitModel` set by dialog answers; `decideMain` runs `handCall` first: target usable (not down, fits) → move/keep, no caps, no switch flags; unusable → existing `automaticCall` with no wanted model + one log. Hand pick clears target mark at pick; native user switch (PostModelSwitch command/picker/sdk) drops it, skipped while picker dialog open. `/route model=` keeps caps.
|
||||
@@ -1443,3 +1444,9 @@ Branch feature/user-writing-web-rules, UNMERGED (human gate).
|
||||
- **Decision**: tracked `settings.json` = base file. `/model` writes never committed (model per project lives in `.claude/settings.local.json`); tracked default `"model": "opus"`, `"switchModelsOnFlag": true` stays. UI-written keys (`"theme"`) stay uncommitted, stashed around `gitflow finish` (`git stash push -- settings.json`, finish, pop); re-pushed only for a major change.
|
||||
- **Why**: user 2026-10-29: "il ne faut jamais suivre le model… le model par defaut est opus… push un fichier de base, ensuite toute modifs auto on les stash". Never `git checkout`/`restore` the live file (symlink of ~/.claude/settings.json).
|
||||
- **Rejected**: commit `/model` + theme as is (doctor warns tracked ≠ opus).
|
||||
|
||||
## BDR-132 — Bare /model opens the router dialog: model, variant, scope [accepted] (2026-10-29)
|
||||
- **Decision**: bare `/model` (composer, router on, surface, no dialog open) → router dialog in `command.run`: step 1 `fable (best)` / `opus (big)` / `sonnet (work)` / `Other model (native picker)`; step 2 `Standard` / `[1m]`; step 3 existing scope question (scopeDialog). Asks even for current model. Other model → native picker after slot freed (pick inside it still asks). Esc/free text → "model: no model chosen, nothing changed". Haiku via native row or `/model haiku`.
|
||||
- **Why**: user "il faut que ça soit systématique" (option A, 2026-10-29); BLK-037.
|
||||
- **Rejected**: 8 rows in one ask (engine cap 2-4, LRN-242); native picker + pin-conflict alert only (option B, not systematic); gateway-id normalization (would switch on routing in a gateway session).
|
||||
- **Supersedes**: BDR-126 "no args → native picker untouched". Live proof 2026-10-29: opus → [1m] → This project wrote `claude-opus-5-5[1m]`. Contract `.claude/tasks/contracts/2026-10-29-bare-model-dialog-1617.md`.
|
||||
@@ -671,3 +671,4 @@ rules:
|
||||
|
||||
## 2026-10-29
|
||||
- Phase 1 context diet (feature/context-diet): 8 tasks SDD + final opus review (I1 Write gap fixed 789a2b2), GATE 0 MET, verifier CONFORME 21/21 after 2 micro-gates, security PASS. /context 30.5k → 26.2k (own −2.8k). Load proof: faunosteo supabase.md + web-building.md, game cloud-functions.md + supabase.md path_glob_match. robin_petier BDR-075 (auto memory migrated, chore/memory-lan-server). BDR-130/131, LRN-238..241, EVAL-053. Faunosteo/game: nothing lost.
|
||||
- /bugfix /model pin (BLK-037: same-model pick fires no PreModelSwitch; gateway-id plan dropped after 3 lenses FATAL) → /feat bare /model dialog (BDR-132) 657e5cb: 2 challenge rounds (ui.ask 2-4 cap BLOCKER), verifier 8/9 + live c9 MET, security PASS. LRN-242/243.
|
||||
@@ -1849,3 +1849,11 @@ Rule: when editing a doctrine file under structure locks, grep the test's lock s
|
||||
## LRN-241 — Classify a usage log by source before trusting its counts (2026-10-29)
|
||||
- **Pattern**: design-toolchain fire log 2026-10-28: 2,779 fires = 1,770 suite prompts (tests ran with the real HOME) + 857 `<agent-message` hand-backs + 152 real prompts. TODO's "2,131 fires" premise was noise.
|
||||
- **Application**: classify a usage log by prompt prefix and known test strings before using its counts as evidence; hook suites run under a temp HOME (fixed 4bbb3c5).
|
||||
|
||||
## LRN-242 — ui.ask takes 2-4 options: enforce engine limits in the test double (2026-10-29)
|
||||
- **Pattern**: `$.ui.ask` / AskUserQuestion takes 2-4 option labels (claude-code.d.ts:468, :2122) + its own free-text Other. Out-of-range ask most likely rejects → askOr → LATER → dead dialog. Test kit `installDialog` used to accept any count: 8-row plan would have shipped green.
|
||||
- **Application**: kit now throws outside 2-4 (register.test.ts); multi-choice > 4 → split into steps. Engine contract limits belong in the test double.
|
||||
|
||||
## LRN-243 — Interactive engine behavior: one discriminating user test before the fix plan (2026-10-29)
|
||||
- **Pattern**: bugfix diagnosis twice wrong before code: "proven" cause was a logged-out OpenRouter session; real cause found by challengers reading timestamps + session model (same-model pick). A 30 s user-run discriminating test (pick a different model) settled it; a second (`/model opus` typed) proved `$.ui.ask` renders in command.run before building on it.
|
||||
- **Application**: interactive-only engine behavior → design one discriminating user test, ask it in plain text (an open AskUserQuestion blocks the user's slash commands), before any fix plan hardens.
|
||||
@@ -12,10 +12,10 @@ Shared rules for every phase:
|
||||
- Never: forced continuation / Stop block (BDR-083, BDR-087), per-turn nag (BDR-037), forced skill invocation, hiding a dispatchable agent via `agent.offer` (breaks dispatch, proved), a `hard_deny` that names a path, file or source line (the auto classifier would refuse all mod maintenance): hard_deny names off switches only (`"enabled": false`, `enabledPlugins`, `disableAllHooks`) and "never edit `permissions.ask/deny` to pass a gate".
|
||||
- Cleanup is part of each phase: delete what the phase makes obsolete (scripts, hooks, tests, doctrine lines, Makefile targets, doctor checks), grep every citer and patch in the same branch (doctrine-citers census in `make test`).
|
||||
|
||||
- [x] **Before phase 0: /feat `/model` scope dialog in model-router** (done 2026-10-25, 1fde5bb + docs 773fe17, BDR-126; merge on user signal; live check pending: dialog in a real session, no PostModelSwitch/down mark after This project, gitignore of a created file). (user pick 2026-10-25). Fact (docs model-config): `/model <name>` always writes `model` to user settings.json (tracked here); picker key `s` = session only; project `model` honored at launch. Mod: `command.run` on `model` with args → `$.ui.ask` "This project / This conversation / Everywhere": project = `model` in `.claude/settings.local.json` + sticky route now; conversation = sticky route only (`/route model=`); everywhere = native passthrough. No args → native picker untouched; `-p` or no surface → passthrough. Files: register.ts, register.test.ts, lib/effort-shift.md. Doctor keeps the tracked ≠ opus warning.
|
||||
- [x] **Before phase 0: /feat `/model` scope dialog in model-router** (done 2026-10-25, 1fde5bb + docs 773fe17, BDR-126; merge on user signal; live check DONE 2026-10-29 (`/model opus` → scope question rendered → This project wrote settings.local.json); still unchecked: no PostModelSwitch/down mark after This project, gitignore of a created file). (user pick 2026-10-25). Fact (docs model-config): `/model <name>` always writes `model` to user settings.json (tracked here); picker key `s` = session only; project `model` honored at launch. Mod: `command.run` on `model` with args → `$.ui.ask` "This project / This conversation / Everywhere": project = `model` in `.claude/settings.local.json` + sticky route now; conversation = sticky route only (`/route model=`); everywhere = native passthrough. No args → native picker untouched; `-p` or no surface → passthrough. Files: register.ts, register.test.ts, lib/effort-shift.md. Doctor keeps the tracked ≠ opus warning.
|
||||
|
||||
- [x] **/bugfix model-router haiku effort strip** (done 2026-10-25, 8e93507; merge on user signal) (BLK-035 residual, user pick 2026-10-25): Haiku 5.5 takes effort; drop 4.5-era "haiku takes no effort" (effortWord, step plan omission, isHaiku sites, census `lib/tests/effort-routing.test.sh:170`), so `mechanical` runs low.
|
||||
- [x] **/feat picker scope** (done 2026-10-25, 2202964 + docs 5d262d3, BDR-127; live check pending: picker in a fresh session, PostModelSwitch on a denied pick) (BLK-036, user ask 2026-10-25): bare `/model` → pick in native picker → ask project scope (`.claude/settings.local.json`) or user scope. First: engine types for a settings-write intercept; none → mod restores user settings.json = BDR-116 amendment, user decides before code.
|
||||
- [x] **/feat picker scope** (done 2026-10-25, 2202964 + docs 5d262d3, BDR-127; live check DONE 2026-10-29 (Sonnet 5.5 pick held by the hook, scope asked; same-model pick fires no hook → BLK-037, fixed by BDR-132 657e5cb); still unchecked: PostModelSwitch on a denied pick) (BLK-036, user ask 2026-10-25): bare `/model` → pick in native picker → ask project scope (`.claude/settings.local.json`) or user scope. First: engine types for a settings-write intercept; none → mod restores user settings.json = BDR-116 amendment, user decides before code.
|
||||
|
||||
- [x] **Phase 0, no mod: split project CLAUDE.md** (this repo + the lever, feature/claude-md-split, 2026-10-26; merge on user signal). Four rules under `.claude/rules/` (rules-maintenance, graphify-vendored, mods, transient-artifacts `# static-check: skip`), `lib/project-rules.sh` check/matches/sections/extract/emit (`-C <dir>`) + suite, `hooks/instructions-loaded.sh` (log `~/.claude/logs/instructions-loaded.jsonl`, session + agent ids), `!.claude/rules/` here + socle, `/onboard split` + onboarder `MODE: split`, generators emit docker/testing/ci from `templates/project-rules/`. Baseline 2026-10-26 `/context`: 32.2k total, Memory files 11.6k, project CLAUDE.md 2.1k.
|
||||
- [ ] Proof, this repo: `/context` after the merge; one fresh session Reading one file per rule → 4 Project `path_glob_match` lines; one sub-agent Read → does a path rule load inside a sub-agent (decides what the per-repo pass may move). Results in the journal.
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
# CONTRACT — bare-model-dialog
|
||||
- date: 2026-10-29 | flow: feat | branch: feature/bare-model-dialog (off develop 9a20ca7)
|
||||
- status: active
|
||||
|
||||
## REQUEST (verbatim — IMMUTABLE)
|
||||
"quand je fais un /model ça change pas le fable 5.1 comme ça devrait" → (after the /bugfix test) "ça prompt bien la question. il faut que ça soit systématique" → option A chosen: "A. et oui tu dois faire le feat"
|
||||
|
||||
Option A as presented (2026-10-29): a bare `/model` opens the mod's own dialog in two steps: (1) which model, from the router's table (Fable 5.1, Opus 5.5, Sonnet 5.5, Haiku 5.5, with [1m] variants) plus an "Other model (native picker)" entry; (2) the scope question This project / This conversation / Everywhere. It always asks, the current model included. Everywhere runs the native command; non-Anthropic models and anything outside the table stay reachable through the native entry.
|
||||
|
||||
## CLARIFICATIONS
|
||||
Q: root cause of the report? / A: /bugfix diagnosis 2026-10-29: picking the model already active in the native picker fires no PreModelSwitch (nothing to switch) → no question, project pin stays; a different-model pick asks (user-run: "Model switch to Sonnet 5.5 was blocked by a PreModelSwitch hook"). Gateway-id normalization dropped (3 lenses FATAL: logged-out OpenRouter session, would switch on automatic routing). Plan `.claude/tasks/plans/2026-10-29-picker-gateway-ids-1523.md` superseded.
|
||||
Q: step 1 rows? / A: with [1m] variants: `fable (best)`, `fable [1m]`, `opus (big)`, `opus [1m]`, `sonnet (work)`, `sonnet [1m]`, `haiku (cheap)`, `Other model (native picker)` (labels from modelLabel; tier name in parentheses as the table says). [gated 2026-10-29]
|
||||
Q: Escape at step 1? / A: nothing changes, text `model: no model chosen, nothing changed`. [gated 2026-10-29]
|
||||
|
||||
Q: the engine's `$.ui.ask` takes 2-4 labels (3 lenses BLOCKER on the 8-row layout): which layout? / A: step 1 `fable (best)`, `opus (big)`, `sonnet (work)`, `Other model (native picker)` (haiku through the native picker or `/model haiku`); step 2 `Standard` / `[1m]`; step 3 the scope question. Supersedes the 8-row answer above. [gated 2026-10-29]
|
||||
|
||||
## ACCEPTANCE CRITERIA
|
||||
1. [gated 2026-10-29, layout] A bare `/model` (composer origin, router on, surface present, no dialog open) asks step 1 with exactly `fable (best)`, `opus (big)`, `sonnet (work)`, `Other model (native picker)` in that order, header `model-router`, text naming the session model and ending `Which model?`; a table row then asks `Standard` / `[1m]` (text ending `?`); no ask ever carries fewer than 2 or more than 4 options (the test kit refuses it); native is not run before an answer.
|
||||
2. The variant answer then asks the existing scope question (scopeDialog, same three scopes and texts) for the token (`opus`, `opus[1m]`, …), even when it is the session's current model.
|
||||
3. This project writes the token's full id (`[1m]` kept verbatim: opus + `[1m]` → `claude-opus-5-5[1m]`) into `.claude/settings.local.json` and sets the sticky route; This conversation sets the route only; Everywhere runs the native `/model` with args = the token; none of these runs native with empty args.
|
||||
4. `Other model (native picker)` runs native with the original empty args (the native picker), no scope question, with the dialog slot already free (a pick inside that picker is held and asks its scope, never the BUSY toast); a native throw there returns a text and native is not run again.
|
||||
5. Escape / dismiss / free text at step 1 or 2: text `model: no model chosen, nothing changed`, native not run, no scope question, nothing written, no route change.
|
||||
6. Unchanged: `/model <name>` typed (scope dialog as today), the PreModelSwitch picker hold (handlePicker), and every native passthrough except the empty-args case (`fable opus`, `default`, `opusplan`, unknown ids, `haiku[1m]`, another origin, router off, no surface, a dialog already open → native, no question).
|
||||
7. lib/effort-shift.md and README.md describe the bare `/model` dialog (Other model = native picker, Esc changes nothing) and no longer list "no args" among the native passthroughs; CHANGELOG [Unreleased] carries the change. [gated 2026-10-29: README + CHANGELOG added]
|
||||
CHECK: grep -q 'Other model (native picker)' lib/effort-shift.md && ! grep -q 'Picker Default, no args' lib/effort-shift.md && ! grep -q "Default, no args" README.md && grep -q 'bare `/model`' CHANGELOG.md && echo DOC-OK
|
||||
EXPECT: DOC-OK
|
||||
EVIDENCE: MET exit=0 marker-found :: DOC-OK
|
||||
8. Mod suite green (register.test.ts through `claude plugin test`) and the full suite green.
|
||||
CHECK: make test 2>&1 | tail -1
|
||||
EXPECT: all suites green
|
||||
EVIDENCE: MET exit=0 marker-found :: all suites green
|
||||
9. Live proof (controller, after `/reload-plugins`, user-run): bare `/model` shows step 1; opus → `[1m]` → This project → `.claude/settings.local.json` `model` becomes `claude-opus-5-5[1m]`. If the engine never routes a bare `/model` through `command.run`, this criterion fails and is reported, not worked around.
|
||||
|
||||
## FILE SCOPE
|
||||
mods/model-router/hooks/register.ts, mods/model-router/hooks/register.test.ts, lib/effort-shift.md, README.md, CHANGELOG.md [gated 2026-10-29], .claude/tasks/contracts/2026-10-29-bare-model-dialog-1617.md, .claude/tasks/plans/2026-10-29-bare-model-dialog-1617.md
|
||||
|
||||
## PROOF — controller, 2026-10-29
|
||||
- c9 live (user-run): `/reload-plugins` (3 plugins, 7 hooks), bare `/model` → step 1 → opus → `[1m]` → This project → "model: claude-opus-5-5[1m] written to .claude/settings.local.json …; sticky route claude-opus-5-5 set ([1m] follows the session's variant)"; user: "tout est bien apparu et a bien été changé". The engine routes a bare `/model` through command.run.
|
||||
- GATE 0 MET (c7 DOC-OK, c8 all suites green); GATE 1 verifier 8/9 MET + c9 UNVERIFIABLE (now proven above); GATE 2 security PASS (semgrep 0, checklist 0).
|
||||
@@ -0,0 +1,52 @@
|
||||
# Plan r2 — bare `/model` opens the router's dialog (feat)
|
||||
|
||||
Contract: `.claude/tasks/contracts/2026-10-29-bare-model-dialog-1617.md`. r1 had 8 rows in one `$.ui.ask`: the engine takes 2-4 labels (claude-code.d.ts:468, :2122; repo fact w3b plan l.7) → 3 lenses BLOCKER; user re-gated the layout 2026-10-29 (3 steps below).
|
||||
|
||||
## Approach
|
||||
- Constants (register.ts, near MODEL_SCOPES ~201): `NATIVE_PICKER = 'Other model (native picker)'`, `NO_MODEL = 'model: no model chosen, nothing changed'`, `BARE_ALIASES = ['fable', 'opus', 'sonnet']`, `STANDARD = 'Standard'`, `LONG = '[1m]'`.
|
||||
- ONE guard in `handleModelCommand` (~2348): `const bare = token === ''` (`''.trim().split(/\s+/)` = `['']`, so `tokens.length === 1`); passthrough when `st.off || origin !== 'composer' || tokens.length !== 1 || (!bare && !knownModel(st.cfg, token)) || no surface || st.asking !== null`. Same slot `st.asking = \`model:${token}\``, same try/finally.
|
||||
- Inside the try: `bare` → `await bareModelDialog($, st, e, next)`; else the existing `scopeDialog` call unchanged.
|
||||
- `bareModelDialog` returns a `CommandRunResult` or the marker `'native'`:
|
||||
- Step 1: `askOr($, text1, [...BARE_ALIASES.map(a => modelLabel(st.cfg, a)), NATIVE_PICKER])` with `text1 = \`Session: ${clean(st.sessionModel || 'unknown', 60)}\nWhich model?\``. Answer = NATIVE_PICKER → `'native'`; a label of BARE_ALIASES → that alias; anything else (Later, free text) → `{ text: NO_MODEL }`.
|
||||
- Step 2: `askOr($, text2, [STANDARD, LONG])`, `text2 = \`${STANDARD}: standard context · ${LONG}: 1M context (a conversation route follows the session's variant)\nWhich variant of ${alias}?\``. STANDARD → token `alias`; LONG → `alias + '[1m]'`; anything else → `{ text: NO_MODEL }`.
|
||||
- Step 3: `scopeDialog($, st, token, { everywhere: () => next({ ...e, args: token }), warnKey: 'command.run model' })` (texts, scopes, note, file write unchanged).
|
||||
- Back in `handleModelCommand`: on `'native'`, the slot is freed by the `finally` FIRST, then `try { return await next(e) } catch (err) { warnOnce(st, $, 'command.run model', errWord(err)); return { text: \`model: native picker failed (${errWord(err)})\` } }` — a pick inside the native picker then reaches handlePicker with a free slot (deny + scope question, not BUSY), and a native throw never re-runs native.
|
||||
- Haiku: not in step 1 (4-label cap); reachable through the native picker row or a typed `/model haiku`.
|
||||
- Test kit (register.test.ts ~236-252, `installDialog`): reject an AskUserQuestion whose options count is outside 2-4 (throw like an engine refusal), so a too-wide ask fails the suite.
|
||||
|
||||
## Edge cases
|
||||
- Router off / sdk origin / `-p` (no surface) / a dialog already open → native with `''` (the native picker), no question.
|
||||
- Free-text "Other" at step 1 or 2 → NO_MODEL, no toast.
|
||||
- `[1m]` + This conversation → the route holds the bare alias; variantNote prints "([1m] follows the session's variant)" (token carries `[1m]`).
|
||||
- `[1m]` + This project → `fullId` keeps `[1m]` verbatim in settings.local.json.
|
||||
- The current session model is offered and asks the scope like any other (the point of the feat).
|
||||
|
||||
## Tests (register.test.ts, `/model` block ~6066)
|
||||
1. bare `/model`: step 1 options exactly `['fable (best)', 'opus (big)', 'sonnet (work)', 'Other model (native picker)']`, header `model-router`, text ends `Which model?` and names the session id; `ran` empty.
|
||||
2. opus → `[1m]` → This project: three questions; local `model` = `claude-opus-5-5[1m]`; `ran` empty.
|
||||
3. opus (session OPUS) → Standard → This conversation: sticky route `claude-opus-5-5` (route show); `ran` empty.
|
||||
4. Other model → `ran` = `['']`, one question; a second test whose native stub calls `pick($, SONNET)` before returning: the pick gets DENY and, after 300 ms, the scope question (not the BUSY toast).
|
||||
5. dismiss at step 1 → NO_MODEL, one question, `ran` empty, no local file; dismiss at step 2 → NO_MODEL, two questions.
|
||||
6. sonnet → Standard → Everywhere → `ran` = `['sonnet']`; sonnet → `[1m]` → Everywhere → `['sonnet[1m]']`.
|
||||
7. `[1m]` + This conversation → output contains `[1m] follows the session's variant`.
|
||||
8. native throw on the Other-model row → text `model: native picker failed (…)`, native ran once.
|
||||
9. guards: the existing off / sdk / no-surface / dialog-open tests run `''` too (native `''`, no question).
|
||||
10. 'no dialog for a call native owns': drop `''` from its args list.
|
||||
11. kit: a direct `$.tool.call({ tool: 'AskUserQuestion', … })` with 5 options rejects (drives the kit hook itself, not `$.ui.ask`).
|
||||
|
||||
## Docs
|
||||
- lib/effort-shift.md (44-56): after the first sentence add "A bare `/model` asks which model (fable, opus, sonnet, or `Other model (native picker)`, which opens the native picker; haiku goes through it or `/model haiku`), then Standard or `[1m]`, then the same scope question, the current model included; Esc changes nothing." Replace "Picker Default, no args, an unknown name or a run with no surface (`-p`) go native, no question." with "Picker Default, an unknown name or a run with no surface (`-p`) go native, no question."
|
||||
- Keep the phrase `Other model (native picker)` on ONE line in every doc (the contract oracle greps a line).
|
||||
- README.md:139 (triggers that ask the scope) and :146 (triggers of the project write): add the bare `/model` dialog.
|
||||
- register.ts:2121-2122 section comment: name the bare `/model` dialog beside `/model <name>`.
|
||||
- README.md:142: drop "no args" from the native-passthrough list and add one clause "a bare `/model` opens the router's model, variant and scope dialog".
|
||||
- CHANGELOG.md [Unreleased]: one Changed line "model-router: a bare `/model` opens the router's dialog (model, variant, scope), so the scope question also comes when the pick is the current model (fable, opus, sonnet; a current haiku goes through `/model haiku`); `Other model (native picker)` keeps the native picker"; and fix the l.14 "no args" mention.
|
||||
|
||||
## Disposition
|
||||
- supersedes BDR-126 on "no args → native picker untouched" (user option A, 2026-10-29); honors BDR-126/127 elsewhere (scopeDialog reused verbatim; picker hold kept, slot freed before the native picker so it still asks).
|
||||
- honors LRN-231 (the dialog lives in command.run, never in PreModelSwitch).
|
||||
- honors BLK-036 for fable/opus/sonnet (no silent user-settings write for a project intent); a current haiku keeps the gap through the native row, `/model haiku` covers it.
|
||||
|
||||
## Risk
|
||||
Unverified live, first: that `$.ui.ask` awaited inside the `model` command.run hook draws in a real session (TODO.md:15 still lists the typed `/model <name>` live check as pending; LRN-231 froze in PreModelSwitch). User-run spike before code: `/model opus` typed.
|
||||
Unverified live: that a bare `/model` reaches `command.run` before the engine draws its picker (the harness assumes it; contract criterion 9 proves it or reports the miss).
|
||||
@@ -0,0 +1,29 @@
|
||||
# Bugfix plan — /model picker never asks its scope (gateway ids + silent passthrough)
|
||||
|
||||
Bug report (user, 2026-10-29): "quand je fais un /model ça change pas le fable 5.1 comme ça devrait". Repo /home/bchanot/Documents/claude, `.claude/settings.local.json` pins `"model": "claude-fable-5-1[1m]"`; bare `/model`, pick the "Opus 5.5" row (not Default, user-confirmed); native output "Set model to `Opus 5.5` and saved as your default… settings.local.json pins Fable 5.1 — applies on restart"; no scope question (BDR-127 expects This project / This conversation / Everywhere).
|
||||
|
||||
## Diagnosis
|
||||
1. PROVEN (transcript cdd27037, 2026-10-29T10:27, before a `/login`): the picker listed a gateway (`OpenAI: GPT-6 Astra`, `Anthropic: Claude Opus 5.5`); after each pick the mod logged `model-router: anthropic/openai/gpt-6-astra unknown to the models table; no switch` then `… anthropic/claude-opus-5.5 unknown …` (unknownCall, register.ts:1351, via canonical() at :1393). Gateway ids are provider-prefixed with a dotted version. `knownModel` (register.ts:2134) and `canonical` (:1086) only know `claude-opus-5-5` etc. (DEFAULT_CONFIG.models :270) → `handlePicker` (:2408) returns `next(e)` → native, silent; the main decision also treats the session model as unknown (never switches). The first pick also wrote `"model": "anthropic/claude-opus-5.5[1m]"` into the tracked settings.json (native Everywhere).
|
||||
2. NOT PROVEN (13:52, after `/login`, label `Opus 5.5` without provider): no deny, no log. `handlePicker` has 4 silent passthrough exits: `e.source !== 'picker'`, `st.off`, non-string or unknown `requested_model`, `surfaces().length === 0`. None logs, so the cause cannot be read.
|
||||
|
||||
Prior: BDR-127 (picker scope; live test 2026-10-25 with native ids), LRN-231, BLK-036. None covers the gateway id form.
|
||||
|
||||
## Fix plan
|
||||
1. `mods/model-router/hooks/register.ts`: one normalizer `bareId(id)` used first by `canonical()` and `knownModel()`:
|
||||
- strip a leading `anthropic/` (once);
|
||||
- if the rest starts with `claude-`, dotted version digits → dashed (`claude-opus-5.5` → `claude-opus-5-5`, `claude-haiku-5.5[1m]` keeps `[1m]` handling as today);
|
||||
- anything else unchanged (`anthropic/openai/gpt-6-astra` → `openai/gpt-6-astra`, still unknown → native, as today).
|
||||
`fullId()` keeps returning the token AS RECEIVED for a non-alias token (so settings.local.json and the sticky route carry the engine's own id: safest switch target on that account).
|
||||
2. `handlePicker`: when `e.source === 'picker'` and the hook passes through to native, one `tryLog` line `model-router: picker → native: <reason> (<requested_model|Default>)`, reason ∈ {off, unknown id, Default, no surface}. Not logged for source command/sdk/auto/resume (those have their own paths and would spam).
|
||||
3. `mods/model-router/hooks/register.test.ts`:
|
||||
- picker: `anthropic/claude-opus-5.5` is denied at once and the deferred question comes (regression for cause 1); the question names `anthropic/claude-opus-5.5` (as received); This project writes that id into settings.local.json;
|
||||
- `anthropic/openai/gpt-6-astra` passes through (non-Anthropic stays native) and logs `picker → native: unknown id`;
|
||||
- each existing PASSTHROUGH row with source picker now asserts its log line; source command/sdk rows assert NO picker log;
|
||||
- canonical: `anthropic/claude-opus-5.5` and `anthropic/claude-opus-5.5[1m]` rank like `opus` in the main decision (no "unknown to the models table" line).
|
||||
4. Proof after merge-ready: user runs `/reload-plugins`, `/model` → Opus 5.5 row: either the question appears, or the new log names the passthrough reason (cause 2 then gets its own bugfix).
|
||||
|
||||
## Out of scope
|
||||
Router-initiated switches on a gateway account (they send `claude-opus-5-5`; acceptance there unverified, named as a risk). The tracked settings.json `model` write by native Everywhere (BDR-131 policy handles it).
|
||||
|
||||
## Tests
|
||||
`make test suite=lib/tests/mods.test.sh` (runs `claude plugin test` on the mod) + full `make test`.
|
||||
+2
-1
@@ -11,7 +11,7 @@ Format follows [Keep a Changelog](https://keepachangelog.com/) and this project
|
||||
- **/a11y skill**: accessibility leaves `/guardrails` and becomes its own skill. Same A11Y-* rules (img alt, field label, click without keyboard, focus outline removed, positive tabindex) on the shared scan engine (`skills/guardrails/scripts/scanner.py`, a `Catalogue` per CLI; `skills/a11y/scripts/scan.py`, markers `A11Y-CLEAR` / `A11Y-NO-NEW`), a Tab-only walk of the main flow on `--live` through `/browse` (marked not done otherwise), report `.claude/audits/A11Y.md`, fixes proposed with the alt and label wording as the user's choice, applied through the bugfix circuit (`bugfixer`, verify-secure gates, `bugfix/a11y-<date>`), re-pass against a baseline. The keyboard, alt and label doctrine moves from `rules/secure-by-default.md` to the lazy `rules/a11y.md` (loads on UI files only; `rules/web-building.md` points at it). `/guardrails` scans `injection` (INJ-*) and `exposure` (EXP-*) instead, with per-language SQL patterns, shared `code_files` / `hits` / `dedupe_lines` / `client_reachable` helpers and a walker that lists files over 1 MB by path; `--domain a11y` is a usage error there. `/web-validate` keeps full WCAG conformance. Suite `lib/tests/a11y-scan.test.sh`; routing row `reflect`; profiles audit, dev, web, web-full, full, max.
|
||||
- **model-router mod**: `mods/model-router/`, a Claude Code mod (function-hooks plugin), routes every repo skill and agent from phase rows (`plan`, `reflect`, `orchestrate`, `escalate`, `judge`, `audit`, `implement`, `write`, `verify`, `explore`, `apply`, `mechanical`; built-ins Explore on sonnet/medium, Plan on opus/xhigh). A typed skill routes the main loop to its row, and a best-tier row holds across turns in a run slot until `/route clear`, `/route off`, a user `/model` or a typed skill on a non-best row. Agents get their row's model at spawn (within the tier, upward only) and its effort on every step; explicit Agent params win. Orchestrators declare their phases through the `mcp__model-router__route` tool. `ultrathink` in a prompt sets the turn's minimum effort and `/route effort=max` holds until `/route clear`; the built-in `/effort` is not a lever inside a run. `/route show` names the run slot (`main: run <phase>`), and a `null` row in the override drops a default row. The model gets a `route` tool and the user a `/route` command (`show|clear|off|on|reload|pending|ask on|off|forget <name|all|projects>|<phase>|model=<alias|id> effort=<level>|switch on|off|verbose on|off`). Optional per-machine config `~/.claude/model-router.json`, where `"enabled": false` turns it off on that machine. The spinner suffix and the status line show the route in force. It loads in every session through the tracked symlink `skills/model-router` (`model-router@skills-dir`). `make doctor` gains a Mods section; suite `make test suite=lib/tests/mods.test.sh`. Known limits: a main-loop switch (a `/model` hand pick excepted) runs only while the cold read it costs (the context minus what the target model's prompt cache holds) fits `upgradeMaxTokens` (200000) or `downgradeMaxTokens` (120000), and a downgrade also needs `mainModelSwitch` (on by default, off on any non-boolean value); the hooks send full model ids, so the `models` table has to follow new versions.
|
||||
- **model-router first-use confirmation**: `mods/model-router/routing.json` (tracked) is the single source of the phase table and of every skill and agent row, and keeps the decisions: `confirmed`, `changed` (`from`/`to`), `projects` exceptions keyed by the origin remote reduced to `host/path` (credentials and local paths never stored), and `ask`. The first use of a rowed typed skill, a rowed agent spawn or a main-loop phase declared through the `route` tool opens a dialog with context: the skill's description (first sentence of its `SKILL.md` frontmatter) or the agent's, the phase with its `about` line (a new field on each of the 12 phases) and the model id and effort the next step really runs on. A row offers Later, Keep or Change; a main-loop phase Later or Keep. Change asks the model (fable, opus, sonnet, haiku with their tier), then the effort among those the phases of that model use (skipped when there is only one), then Everywhere or This project only; the pair maps to an existing phase (rows stay phase names, the same phase counts as Keep, a pair no phase offers is added by hand as a new phase). A skill-row change toasts the model and effort it now runs on, with the `/route switch on` hint when the main loop holds back a downgrade; a free-text answer counts as Later. One dialog at a time, never in headless (`-p`) runs or inside a sub-agent. Only a dialog answer, `/route ask on|off` or `/route forget` (which takes decisions back; a changed row returns to its shipped phase, the frontmatter floors stay yours to realign) writes the file (serialized, 64 KiB cap, never created when absent); each write asks you to commit it from the config repo. `/route pending` lists unconfirmed rows and phases. Layers: routing.json < `~/.claude/model-router.json` (its `ask` wins); a project's `.claude/model-router.json` is never read. Tests: `mods/model-router/hooks/register.test.ts`.
|
||||
- **model-router `/model` scope**: a `/model <name>` typed in the composer, or a pick in the `/model` picker, with a model the table knows asks where it applies. The picker's switch is held first (PreModelSwitch deny; the engine prints that a hook blocked it); a pick while another dialog is open is refused with `answer the open dialog first`. This project writes the full id as `model` into the project's `.claude/settings.local.json` (created if absent, refused through a link) and sets a sticky model route. This conversation sets the sticky route only. Everywhere runs the native `/model` (user `settings.json`). Both non-native answers drop the run slot and keep a sticky effort. With the picker's Default, no args, an unknown name, a headless run or another origin, the native command runs with no question. A model chosen in that dialog always switches: it bypasses the cold-read caps and the `mainUpgrade` / `mainModelSwitch` flags, and while it is marked down or outside a known window it waits and the automatic chain decides. A native switch or `/clear` drops it; `/route model=` keeps the caps. Known limits: the `/config` Model row still writes user `settings.json`; a dialog never answered has no timeout. Tests: `mods/model-router/hooks/register.test.ts`.
|
||||
- **model-router `/model` scope**: a `/model <name>` typed in the composer, or a pick in the `/model` picker, with a model the table knows asks where it applies. The picker's switch is held first (PreModelSwitch deny; the engine prints that a hook blocked it); a pick while another dialog is open is refused with `answer the open dialog first`. This project writes the full id as `model` into the project's `.claude/settings.local.json` (created if absent, refused through a link) and sets a sticky model route. This conversation sets the sticky route only. Everywhere runs the native `/model` (user `settings.json`). Both non-native answers drop the run slot and keep a sticky effort. With the picker's Default, an unknown name, a headless run or another origin, the native command runs with no question. A model chosen in that dialog always switches: it bypasses the cold-read caps and the `mainUpgrade` / `mainModelSwitch` flags, and while it is marked down or outside a known window it waits and the automatic chain decides. A native switch or `/clear` drops it; `/route model=` keeps the caps. Known limits: the `/config` Model row still writes user `settings.json`; a dialog never answered has no timeout. Tests: `mods/model-router/hooks/register.test.ts`.
|
||||
- **Manual-push mode**: `git config gitflow.autopush false` (human-set) now stops every push the gitflow lib makes, not only the post-commit / post-merge hooks. `gitflow start` and `finish` branch, commit and merge locally and push nothing; `gitflow delete` leaves the `origin/` copy in place and prints `git push origin --delete <br>` for the user to run. `hooks/unpushed-guard.sh` stays silent at turn end in this mode and opens each session with one `ℹ manual push mode:` line counting the commits no remote holds across every local branch; an unparseable or unreadable `gitflow.autopush` value is treated as manual push mode too, and that line names it. `hooks/push-guard.sh` (PreToolUse, `Bash|Monitor`) refuses any `git push` Claude types while `gitflow.autopush` reads false in the session cwd or in a literal `-C`/`cd` directory the command names (global config counts outside a repo); the refusal tells the user to run it with `! git push`. It reads the mode through the same lib verb as every other reader and fails closed: an unparseable or unreadable value reads as manual, and an internal error, a missing `lib/gitflow.sh`, more than 20 distinct directory tokens in one command (capped before any token is classified), a `cd`/`-C` directory token mixing quoted and unquoted parts, or a payload jq cannot parse whose raw text looks like a push refuse the push (these pathological cases fire in auto mode too). Directory tokens are read as whole shell words, adjacent quoted segments and backslash escapes included. Once the text looks like a push, the command is split into simple commands (quotes, escapes, separators, heredoc bodies dropped) and a push must be git's own subcommand in one of them: `grep "git push"`, `git log -S "git push"`, `git config --get push.default`, `git stash push`, a heredoc quoting a push or a commit message naming one are allowed; `bash -c` scripts are re-checked, wrappers (`sudo`, `env`, `eval`, `xargs`, `timeout`, `git subtree`...) and assignments keep the text verdict. The misses listed in its header fall to a new `autoMode.soft_deny` rule that no request in the turn clears. The session banner adds `🔒 push : manual (autopush=false) — ! git push` when the key reads false, and `🔒 push : manual (autopush bad) — ! git push` when the value is invalid. Skills read the mode through a new lib verb, `bash ~/.claude/lib/gitflow.sh push-mode`: it prints `auto`, `manual` or `invalid` (rc 0) and names an invalid value on stderr (printable characters only, 64 at most). It is the one reader a skill may call, since the `git config` read of the key is denied to Claude. Skills push nothing on their own, except the `/release-candidate` tag in auto-push mode on an explicit go. Every "on origin" or "not pushed" line they print comes from `git rev-list --count origin/<br>..<br>` read after the fact, with the complete `! git …` command when something is left for the user to push. An invalid value (anything but unset, true or false, or a read that fails) is manual push mode for every reader and is named where it is read (see Fixed). Tests: `lib/gitflow-test.sh` T11b (push-mode verb), T18m and T18q blocks, `lib/tests/unpushed-guard.test.sh` T10-T16, `lib/tests/push-guard.test.sh` (98 checks).
|
||||
|
||||
- **model-router prompt classifier**: a plain prompt typed in the composer (12 characters or more, not a slash command, not mid-turn, never under `-p` or in a sub-agent) that no keyword rule, skill, run slot, `/route` or floor covers is labelled by one call to the engine's small model (`design`, `analysis`, `coding`, `bookkeeping`, `chat`), bounded to 3 s. The label maps to plan, reflect, implement or apply and the turn takes that phase's route: its effort, and its model under the switch and the downgrade cap, never above the session model (an `ultrathink` floor raises the effort only, the guess's model holds); no dialog, no file write, gone at the end of the turn, replaced by any route call or typed skill, and dropped for that turn by a `/effort` typed between turns. Three failures in a row pause it for `cooldownMinutes` (one toast, `classifier: paused` in the status line). `"classify": false` in `~/.claude/model-router.json` and `/route classify on|off` turn it off; `/route show` prints `classify:`. The status line reads `route: classifier <phase>` and `/route verbose on` adds `(<phase>: classifier)`.
|
||||
@@ -23,6 +23,7 @@ Format follows [Keep a Changelog](https://keepachangelog.com/) and this project
|
||||
- **Architecture defaults carrier**: `lib/architecture-defaults.md`, read before proposing a stack (new project, scaffolding, stack brainstorm, whole-project rewrite): public sites never SPA, Rust by default, web APIs versioned. Path rules `rules/supabase.md` and `rules/cloud-functions.md` hold the full Supabase and cloud-function domains. Suites `lib/tests/user-rules.test.sh` and `lib/tests/doctor-automem.test.sh`.
|
||||
|
||||
### Changed
|
||||
- **model-router bare `/model` dialog**: a bare `/model` opens the router's dialog (model, variant, scope), so the scope question also comes when the pick is the current model (fable, opus, sonnet; a current haiku goes through `/model haiku`). Step 1 asks fable, opus, sonnet or `Other model (native picker)` (the native picker, run with the slot free so a pick inside it asks its scope); step 2 asks Standard or `[1m]`; step 3 is the existing scope question. Esc or free text changes nothing. Tests: `mods/model-router/hooks/register.test.ts`.
|
||||
- Registries are written only through `lib/memory.sh`, never by Edit (`CLAUDE.global.md`, Memory registries); every CAPITALIZE step (`/feat`, `/bugfix`, `/hotfix`, `/ship-feature`, `/capitalize`, `/init-project`, `/onboard`, `commit-changer`) writes through `lib/capitalize-commit.md` § WRITE.
|
||||
- `lib/memory-commit.sh commit` runs `memory.sh check --staged` first: a staged v2 registry that removes or rewrites a line inside an entry, gains a duplicate ID, a bad heading or an open fence, or is deleted or downgraded is unstaged and refused with rc 6; v1 registries are skipped.
|
||||
- `/prune-memory` drops its Index drift category (§ D): status fixes go through `memory.sh status`, merges through `memory.sh add --supersedes`, STEP 4 verifies with `memory.sh check` (`CHECK: OK`, was `INDEX SANITY: OK`).
|
||||
|
||||
@@ -136,14 +136,14 @@ effort, never version. Transcript audit `python3 lib/effort-audit.py`.
|
||||
|
||||
`mods/model-router/` is a Claude Code mod (a function-hooks plugin) that applies this table per request. It loads in every session through the tracked symlink `skills/model-router`, as `model-router@skills-dir`.
|
||||
|
||||
- Main loop: every request gets the route in force. A typed skill with a row routes the main loop to it; a best-tier row (`plan`, `reflect`, `orchestrate`, `escalate`; `audit` is an agent row, never typed) holds across turns in a run slot until `/route clear`, `/route off`, a user `/model` (typed with a name or picked in the `/model` picker, it asks the scope: this project, this conversation, everywhere) or a typed skill on a non-best row. A skill without a row leaves the route as it is. A rowed skill the model loads inside a best-tier run moves effort only when its row ranks below the run's model. Main routed onto a model whose context window the conversation outgrew returns to the session model. Before main runs on a model, the one it moves to or the one it keeps (the session's own model included), the mod probes it with one small completion bounded to 8 seconds; the step (and `/route show`, the route tool's answer) waits for it. A timeout or an error marks the model down (reason `probe`, held for `cooldownMinutes` like any breaker hold) and the decision is taken again once. A model already marked down is never probed, and a model that answered is not probed again, `/clear` included, until it is marked down. When a lower model stands in for its tier's head held down (Opus for Fable on a best-tier phase), the phase's own effort goes one notch up: `reflect` xhigh, `plan` max, `orchestrate` high, `escalate` stays max. An effort asked explicitly (`/route ... effort=`, the `route` tool's `effort`) or set by a floor is never raised. `/route show` and the route tool's answer print the level with `(opus stands in for fable)`; the verbose transition line names `stand-in` as a cause.
|
||||
- Main loop: every request gets the route in force. A typed skill with a row routes the main loop to it; a best-tier row (`plan`, `reflect`, `orchestrate`, `escalate`; `audit` is an agent row, never typed) holds across turns in a run slot until `/route clear`, `/route off`, a user `/model` (typed with a name, bare, or picked in the `/model` picker, it asks the scope: this project, this conversation, everywhere) or a typed skill on a non-best row. A skill without a row leaves the route as it is. A rowed skill the model loads inside a best-tier run moves effort only when its row ranks below the run's model. Main routed onto a model whose context window the conversation outgrew returns to the session model. Before main runs on a model, the one it moves to or the one it keeps (the session's own model included), the mod probes it with one small completion bounded to 8 seconds; the step (and `/route show`, the route tool's answer) waits for it. A timeout or an error marks the model down (reason `probe`, held for `cooldownMinutes` like any breaker hold) and the decision is taken again once. A model already marked down is never probed, and a model that answered is not probed again, `/clear` included, until it is marked down. When a lower model stands in for its tier's head held down (Opus for Fable on a best-tier phase), the phase's own effort goes one notch up: `reflect` xhigh, `plan` max, `orchestrate` high, `escalate` stays max. An effort asked explicitly (`/route ... effort=`, the `route` tool's `effort`) or set by a floor is never raised. `/route show` and the route tool's answer print the level with `(opus stands in for fable)`; the verbose transition line names `stand-in` as a cause.
|
||||
- Sub-agents: a routed agent gets its row's model at spawn, within its tier and only upward from its frontmatter model, and the row's effort on every step. Explicit `model` / `effort` params on the Agent call win; a project-defined agent of the same name keeps its own definition. Built-ins: Explore runs on sonnet/medium, Plan on opus/xhigh. A built-in `general-purpose` agent that main spawns with no `model` param, while main runs below the session model (a downgrade or a breaker fallback), starts on the session model instead of inheriting the lower one; it is not pinned when the session model is marked down, for a fork, a workflow or a nested spawn, or when a project or user definition shadows the built-in. Other agent types are never pinned this way: the hook cannot see their frontmatter model.
|
||||
- Levers inside a run: `ultrathink` in a prompt sets the turn's minimum effort; `/route effort=max` holds until `/route clear`. Keyword prompt rules (`plan`, `design`, `architecture`… take plan's effort; `why`, `review`, `audit`… reflect's), `ultrathink` and a main Agent dispatch (the derived `orchestrate` route, held until its background agents end) set the turn's effort only, never a model: they never lift main above the session model, and a held best-tier run keeps its model. Fable on main comes only from a skill row, the `route` tool, a typed `/route` or a hand pick (`/model`, picker). The built-in `/effort` is not a lever inside a run, rows and routes outrank it.
|
||||
- `/model` scope: a pick in the `/model` picker is held first (the engine prints that a hook blocked it), then the same question as `/model <name>` comes. A pick while another dialog is open is refused with `answer the open dialog first`. The picker's Default, no args, an unknown name or a headless run go native, no question. A model chosen in that dialog (a hand pick) always switches: no cold-read cap, no `mainUpgrade` or `mainModelSwitch` flag. A hand pick marked down keeps main where it is until it is back. A native switch (the `/config` Model row included) or `/clear` drops a hand pick; a typed `/route model=` keeps the caps.
|
||||
- `/model` scope: a pick in the `/model` picker is held first (the engine prints that a hook blocked it), then the same question as `/model <name>` comes. A bare `/model` opens the router's model, variant and scope dialog: fable, opus or sonnet, then Standard or `[1m]`, then the scope, the current model included; `Other model (native picker)` opens the native picker (haiku goes through it or `/model haiku`) and Esc changes nothing. A pick while another dialog is open is refused with `answer the open dialog first`. The picker's Default, an unknown name or a headless run go native, no question. A model chosen in that dialog (a hand pick) always switches: no cold-read cap, no `mainUpgrade` or `mainModelSwitch` flag. A hand pick marked down keeps main where it is until it is back. A native switch (the `/config` Model row included) or `/clear` drops a hand pick; a typed `/route model=` keeps the caps.
|
||||
- Prompt classifier: a plain prompt typed in the composer (12 characters or more, not a slash command) that no keyword rule, skill, run slot, `/route` or floor covers is sent to the engine's small fast model, one call, bounded to 3 seconds (the prompt waits for it, typically under a second). The label (`design`, `analysis`, `coding`, `bookkeeping`, `chat`) maps to plan, reflect, implement or apply (`chat` routes nothing), and the turn takes that phase's route: its effort becomes the turn's default, and its model may move the main loop, never above the session model. A `coding` or `bookkeeping` guess moves main down only when `mainModelSwitch` is on and the cold read fits `downgradeMaxTokens`; an `ultrathink` floor in the same turn raises the effort only, the guess's model holds. No dialog opens and no file is written. The route is gone at the end of the turn, a later route call or typed skill replaces it, and a `/effort` you type between turns drops the guess for that turn only. A typed best-tier skill holds its run slot across turns, so nothing is classified there until `/route clear`. Long prompts are sampled (first 500 and last 1500 code points), so pasted text at the end can steer one turn's route. Three failures in a row pause it for `cooldownMinutes` (one toast, `classifier: paused` in the status line). Never in a sub-agent, mid-turn or under `-p`. Off per session with `/route classify off`, per machine with `"classify": false`. The status line reads `route: classifier <phase>`; `/route verbose on` adds the transition line.
|
||||
- `/route` (user command) shows or sets the route: `show`, `clear`, `off`, `on`, `reload`, `pending` (rows and phases not confirmed yet), `ask on|off` (first-use dialog on or off), `forget <name|all|projects>` (takes decisions back: a changed row returns to its shipped phase; `all` and `projects` ask first), a phase name, `model=<alias|id> effort=<level>`, `switch on|off`, `classify on|off` (the prompt classifier, below), `verbose on|off` (logs transitions only: each change of model or effort, with a few words of cause). `/route show` names the run slot when one holds (`main: run <phase>`) and prints the switch with its cap and the prompt-cache TTL (`switch: on (downgrade, cap 120000 tokens cold, ttl 60 min)`). The model sets routes through a `route` tool.
|
||||
- First use: the first time a rowed skill is typed, a rowed agent is spawned or a phase is declared on the main loop through the `route` tool, the mod asks once whether the route is right. The question gives context: the skill's description (first sentence of its `SKILL.md` frontmatter) or the agent's, the phase with its `about` line, and the model id and effort the next step really runs on; a declared phase also says what uses it (rows, prompt rules). A row offers Later, Keep or Change; a declared phase offers Later or Keep. Change asks the model (fable, opus, sonnet, haiku, each shown with the tier it heads), then the effort among those the phases on that model use (shipped table: fable medium, high, xhigh or max; sonnet low, medium, high or xhigh; opus and haiku have one level each, so no question), then Everywhere or This project only. Rows stay phase names, so the pair maps to an existing phase: the row's current phase wins a tie and the same phase counts as Keep; a pair no phase offers needs a new phase added by hand in routing.json. Everywhere moves the row and records the shipped phase under `changed`; This project only stores an exception under `projects`, keyed by the origin remote reduced to `host/path` (no credentials, no local paths; a remote that cannot be read that way offers no project choice). Keep lands under `confirmed`; Later, a dismissed dialog or a free-text answer asks again next session. After a skill row changes, a toast names the model and effort that skill now runs on, plus a hint when the main loop holds back a downgrade: `/route switch on` when the switch is off, the cap hold (`held: downgrade skipped: cold read <n> tokens over <cap>`) when the cold read is over `downgradeMaxTokens`. One dialog at a time, never in a headless (`-p`) run, never inside a sub-agent.
|
||||
- Only a dialog answer, `/route ask on|off` or `/route forget` writes `routing.json`, never the model. Writes are serialized, capped at 64 KiB, and refused when the file is missing (it is never created). Each write leaves the config repo dirty; a toast reminds you to commit it from there. The one other write: `/model <name>` or a `/model` picker pick → This project writes the full id as `model` into the session root's `.claude/settings.local.json` (created if absent, keep it gitignored; refused when `.claude` or the file is a link, or the file is over 64 KiB or not a JSON object). Remove its `model` key to undo.
|
||||
- Only a dialog answer, `/route ask on|off` or `/route forget` writes `routing.json`, never the model. Writes are serialized, capped at 64 KiB, and refused when the file is missing (it is never created). Each write leaves the config repo dirty; a toast reminds you to commit it from there. The one other write: `/model <name>`, the bare `/model` dialog or a `/model` picker pick → This project writes the full id as `model` into the session root's `.claude/settings.local.json` (created if absent, keep it gitignored; refused when `.claude` or the file is a link, or the file is over 64 KiB or not a JSON object). Remove its `model` key to undo.
|
||||
- The spinner suffix and the status line under the prompt show the route in force; the status line adds ` · switch off` when the downgrade switch is off.
|
||||
|
||||
Config layers: `mods/model-router/routing.json` (tracked: phases with their tier, effort and `about` line, rows, decisions, `ask`), then the optional per-machine `~/.claude/model-router.json`, which wins. A `.claude/model-router.json` inside a project is never read. Machine keys: `models` (alias → full id), `windows` (context window per full id), `tiers` (ordered alias lists per tier: `best` fable>opus>sonnet, `big` opus>fable>sonnet, `work` sonnet>opus, `cheap` haiku>sonnet; the first alias not down is used), `fallback` (the rank order of the aliases, best first, used by the breaker), `cooldownMinutes` (how long a model stays marked down after an availability error, 15 by default, doubling per episode up to 300), `mainUpgrade` (default `true`: the main loop may move up to a phase's tier), `upgradeMaxTokens` (default 200000: the largest cold read a main-loop upgrade may cost), `downgradeMaxTokens` (default 120000: the same cap for a downgrade; the cold read is the context minus what the target model's prompt cache already holds, taken from main's last step on that model within the prompt-cache TTL, forgotten by `/clear` and `/route reload`. The TTL follows the engine's `cache_ttl` (5 or 60 minutes) carried by main's model-switch events, is 60 minutes until the first one and survives `/clear`. The context also counts the prompt just submitted, which the engine's usage may not include yet: code points / 3 of its text, its context entries and a typed skill's body, summed and added at the turn's first main step unless usage already grew by half of it. A `document` attachment makes the size unknown, and an unknown context size blocks the switch; the step, `/route show`, the first-use dialog and the toast read the same adjusted size), `phases`, `agents`, `skills`, `prompt` (rules), `mainModelSwitch` (default `true`: the main loop may move down to a cheaper model; a value that is not a boolean turns it off and says so), `classify` (default `true`; `false` stops the prompt classifier on that machine), `probe` (default `true`: the model main runs on, moved to or kept, is tried once, 8 seconds at most, before main is sent to it; `false` skips the probe on that machine; a non-boolean value is ignored and said; `/route show` prints `probe:`), `verbose` (default `false`; `true` logs transitions only, a non-boolean value falls back to `false`), `spinner` (default `true`), `enabled` (default `true`; `false` turns the mod off on that machine), `ask` (overrides routing.json's `ask` on that machine). A `null` value in `agents` or `skills` drops a row. Edit phases and rows by hand in routing.json (a phase's `about`, 120 characters at most, is read from there only and shown in the dialog; a model and effort pair no phase offers needs a new phase there); without it the mod runs the code's default phases, with no rows and no dialog. `/route reload` re-reads both files.
|
||||
|
||||
+7
-2
@@ -43,7 +43,12 @@ relaunch: `ultrathink` in the prompt (turn floor) or `/route effort=max`
|
||||
Builtin `/effort` is NOT a lever inside a run: rows and routes outrank it.
|
||||
|
||||
`/model <name>` typed, or a pick in the `/model` picker, with a name the
|
||||
router knows asks the scope (Esc changes nothing). The picker's switch is
|
||||
router knows asks the scope (Esc changes nothing). A bare `/model` asks
|
||||
which model first (fable, opus, sonnet, or
|
||||
`Other model (native picker)`, which opens the native picker; haiku goes
|
||||
through it or `/model haiku`), then Standard or `[1m]`, then the same
|
||||
scope question, the current model included; Esc changes nothing. The
|
||||
picker's switch is
|
||||
held first: the engine prints that a hook blocked it, then the question
|
||||
comes. This project writes the full id as `model` into
|
||||
`.claude/settings.local.json` (created if absent: keep it gitignored) and
|
||||
@@ -51,7 +56,7 @@ sets a sticky model route. This conversation sets the sticky route only,
|
||||
nothing written. Everywhere is the native command: user `settings.json`,
|
||||
every project. The two non-native answers drop the run slot like a native
|
||||
switch and keep a sticky effort; Everywhere drops an earlier sticky model.
|
||||
Picker Default, no args, an unknown name or a run with no surface (`-p`)
|
||||
Picker Default, an unknown name or a run with no surface (`-p`)
|
||||
go native, no question. A native switch (`/config` Model row included)
|
||||
drops a hand pick. The file is the session root's: in a worktree, that
|
||||
worktree's.
|
||||
|
||||
@@ -237,6 +237,10 @@ function installDialog(on: On, w: World): void {
|
||||
on('tool.call', { tool: 'AskUserQuestion' }, async (_a, e) => {
|
||||
const q = (e as unknown as { questions: Rec[] }).questions[0] ?? {}
|
||||
const options = (q.options as { label: string }[] | undefined) ?? []
|
||||
// the engine takes 2-4 options: a wider ask fails the suite
|
||||
if (options.length < 2 || options.length > 4) {
|
||||
throw new Error(`AskUserQuestion takes 2-4 options, got ${options.length}`)
|
||||
}
|
||||
w.asked.push({
|
||||
text: String(q.question),
|
||||
options: options.map(o => o.label),
|
||||
@@ -6306,7 +6310,7 @@ test('model command: Everywhere drops a sticky tier too, keeps effort', async (
|
||||
|
||||
test('model command: no dialog for a call native owns', async ($, on) => {
|
||||
const m = await bootModel($, on, [])
|
||||
const args = ['', 'fable opus', 'default', 'opusplan', 'claude-opus-5-6',
|
||||
const args = ['fable opus', 'default', 'opusplan', 'claude-opus-5-6',
|
||||
'haiku[1m]', 'whatever']
|
||||
for (const a of args) expect(await modelCmd($, a)).toBe('native')
|
||||
expect(m.ran).toEqual(args)
|
||||
@@ -6315,21 +6319,26 @@ test('model command: no dialog for a call native owns', async ($, on) => {
|
||||
|
||||
test('model command: no dialog from another origin', async ($, on) => {
|
||||
const m = await bootModel($, on, [])
|
||||
expect(await modelCmd($, 'fable', 'sdk')).toBe('native')
|
||||
for (const a of ['fable', '']) {
|
||||
expect(await modelCmd($, a, 'sdk')).toBe('native')
|
||||
}
|
||||
expect(m.w.asked).toEqual([])
|
||||
expect(m.ran).toEqual(['fable', ''])
|
||||
})
|
||||
|
||||
test('model command: no dialog when the router is off', async ($, on) => {
|
||||
const m = await bootModel($, on, [])
|
||||
await route($, 'off')
|
||||
expect(await modelCmd($, 'fable')).toBe('native')
|
||||
for (const a of ['fable', '']) expect(await modelCmd($, a)).toBe('native')
|
||||
expect(m.w.asked).toEqual([])
|
||||
expect(m.ran).toEqual(['fable', ''])
|
||||
})
|
||||
|
||||
test('model command: no dialog without a surface', async ($, on) => {
|
||||
const m = await bootModel($, on, [], OPUS, { surfaces: [] })
|
||||
expect(await modelCmd($, 'fable')).toBe('native')
|
||||
for (const a of ['fable', '']) expect(await modelCmd($, a)).toBe('native')
|
||||
expect(m.w.asked).toEqual([])
|
||||
expect(m.ran).toEqual(['fable', ''])
|
||||
})
|
||||
|
||||
test('model command: a second /model while one is open goes native', async (
|
||||
@@ -6342,9 +6351,11 @@ test('model command: a second /model while one is open goes native', async (
|
||||
const first = modelCmd($, 'fable')
|
||||
await open.gate
|
||||
expect(await modelCmd($, 'opus')).toBe('native')
|
||||
expect(await modelCmd($, '')).toBe('native')
|
||||
held.release()
|
||||
expect(await first).toContain('sticky route')
|
||||
expect(m.w.asked).toHaveLength(1)
|
||||
expect(m.ran).toEqual(['opus', ''])
|
||||
})
|
||||
|
||||
test('model command: the question notes a project pin only when set', async (
|
||||
@@ -6404,6 +6415,127 @@ for (const scope of ['This conversation', 'This project']) {
|
||||
})
|
||||
}
|
||||
|
||||
// ---- bare /model: the router's own dialog ---------------------------------
|
||||
|
||||
const STEP1 = ['fable (best)', 'opus (big)', 'sonnet (work)',
|
||||
'Other model (native picker)']
|
||||
const VARIANTS = ['Standard', '[1m]']
|
||||
const NO_MODEL = 'model: no model chosen, nothing changed'
|
||||
const OPUS_1M = `${OPUS}[1m]`
|
||||
|
||||
test('bare model: step 1 lists the table and the native picker', async (
|
||||
$, on) => {
|
||||
const m = await bootModel($, on, [])
|
||||
expect(await modelCmd($, '')).toBe(NO_MODEL)
|
||||
const [q] = m.w.asked as [Asked]
|
||||
expect(q.options).toEqual(STEP1)
|
||||
expect(q.header).toBe('model-router')
|
||||
expect(q.text).toContain(OPUS)
|
||||
expect(q.text.endsWith('Which model?')).toBe(true)
|
||||
expect(m.ran).toEqual([])
|
||||
})
|
||||
|
||||
test('bare model: opus, [1m], This project writes the full id', async (
|
||||
$, on) => {
|
||||
const m = await bootModel($, on,
|
||||
['opus (big)', '[1m]', 'This project'])
|
||||
await modelCmd($, '')
|
||||
expect(m.w.asked.map(q => q.options)).toEqual([STEP1, VARIANTS, SCOPES])
|
||||
const variant = m.w.asked[1] as Asked
|
||||
expect(variant.text.endsWith('Which variant of opus?')).toBe(true)
|
||||
expect(localOf(m.w).model).toBe(OPUS_1M)
|
||||
expect(m.ran).toEqual([])
|
||||
})
|
||||
|
||||
test('bare model: the current model asks its scope too', async ($, on) => {
|
||||
const m = await bootModel($, on,
|
||||
['opus (big)', 'Standard', 'This conversation'])
|
||||
expect(await modelCmd($, '')).toContain(`sticky route ${OPUS}`)
|
||||
expect(m.w.asked).toHaveLength(3)
|
||||
expect(m.ran).toEqual([])
|
||||
})
|
||||
|
||||
test('bare model: Other model runs native with empty args, no scope', async (
|
||||
$, on) => {
|
||||
const m = await bootModel($, on, ['Other model (native picker)'])
|
||||
expect(await modelCmd($, '')).toBe('native')
|
||||
expect(m.ran).toEqual([''])
|
||||
expect(m.w.asked).toHaveLength(1)
|
||||
})
|
||||
|
||||
test('bare model: a pick inside the native picker asks, never BUSY', async (
|
||||
$, on) => {
|
||||
const ran: string[] = []
|
||||
const outs: unknown[] = []
|
||||
on('command.run', { command: 'model' }, async (_a, e) => {
|
||||
ran.push(e.args)
|
||||
outs.push(await pick($, SONNET))
|
||||
return { text: 'native' }
|
||||
})
|
||||
const toasts = recordToasts(on)
|
||||
const w = newWorld({ answers: ['Other model (native picker)', 'Later'] })
|
||||
const rig = await bootRig($, on, OPUS, 1000, w)
|
||||
expect(await modelCmd($, '')).toBe('native')
|
||||
expect(JSON.stringify(outs)).toContain(DENY)
|
||||
await rig.clock.advance(300)
|
||||
await settle(() => w.asked.length > 1)
|
||||
expect(w.asked[1]?.options).toEqual(SCOPES)
|
||||
expect(toasts).toEqual([])
|
||||
expect(ran).toEqual([''])
|
||||
})
|
||||
|
||||
test('bare model: Esc at step 1 or 2 changes nothing', async ($, on) => {
|
||||
const m = await bootModel($, on, [REJECT, 'sonnet (work)', REJECT])
|
||||
expect(await modelCmd($, '')).toBe(NO_MODEL)
|
||||
expect(m.w.asked).toHaveLength(1)
|
||||
expect(await modelCmd($, '')).toBe(NO_MODEL)
|
||||
expect(m.w.asked).toHaveLength(3)
|
||||
expect(m.ran).toEqual([])
|
||||
expect(m.w.written).toEqual([])
|
||||
expect(mainLine(await route($, 'show'))).toContain('session defaults')
|
||||
})
|
||||
|
||||
test('bare model: Everywhere runs native with the token', async ($, on) => {
|
||||
const m = await bootModel($, on, ['sonnet (work)', 'Standard',
|
||||
'Everywhere', 'sonnet (work)', '[1m]', 'Everywhere'])
|
||||
await modelCmd($, '')
|
||||
await modelCmd($, '')
|
||||
expect(m.ran).toEqual(['sonnet', 'sonnet[1m]'])
|
||||
})
|
||||
|
||||
test('bare model: [1m] with This conversation carries the note', async (
|
||||
$, on) => {
|
||||
await bootModel($, on, ['fable (best)', '[1m]', 'This conversation'])
|
||||
expect(await modelCmd($, '')).toContain("[1m] follows the session's variant")
|
||||
})
|
||||
|
||||
test('bare model: a native throw is reported, native runs once', async (
|
||||
$, on) => {
|
||||
const ran: string[] = []
|
||||
on('command.run', { command: 'model' }, (_a, e) => {
|
||||
ran.push(e.args)
|
||||
throw new Error('boom')
|
||||
})
|
||||
await bootRig($, on, OPUS, 1000,
|
||||
newWorld({ answers: ['Other model (native picker)'] }))
|
||||
const out = await modelCmd($, '')
|
||||
expect(out).toContain('model: native picker failed (')
|
||||
expect(out).not.toContain('boom')
|
||||
expect(ran).toEqual([''])
|
||||
})
|
||||
|
||||
test('kit: an AskUserQuestion of 5 options is refused', async ($, on) => {
|
||||
await bootModel($, on, ['x'])
|
||||
const labels = ['a', 'b', 'c', 'd', 'e']
|
||||
await expect($.tool.call({
|
||||
tool: 'AskUserQuestion',
|
||||
questions: [{
|
||||
question: 'q?', header: 'h', multiSelect: false,
|
||||
options: labels.map(label => ({ label, description: label })),
|
||||
}],
|
||||
} as never)).rejects.toThrow()
|
||||
})
|
||||
|
||||
test('writes: kit: only the project settings.local.json is carved out', {
|
||||
plugins: [PROBE],
|
||||
}, async ($, on) => {
|
||||
|
||||
@@ -202,6 +202,11 @@ const MODEL_SCOPES: readonly string[] = [
|
||||
PROJECT_SCOPE, CONVERSATION, EVERYWHERE,
|
||||
]
|
||||
const NO_SCOPE = 'model: no scope chosen, nothing changed'
|
||||
const NATIVE_PICKER = 'Other model (native picker)'
|
||||
const NO_MODEL = 'model: no model chosen, nothing changed'
|
||||
const BARE_ALIASES: readonly string[] = ['fable', 'opus', 'sonnet']
|
||||
const STANDARD = 'Standard'
|
||||
const LONG = '[1m]'
|
||||
const LOCAL_SETTINGS = '.claude/settings.local.json'
|
||||
const CHOICE_ALIASES: readonly string[] = ['fable', 'opus', 'sonnet', 'haiku']
|
||||
const MAX_DESC = 140 // chars of a skill or agent description in a question
|
||||
@@ -2118,8 +2123,9 @@ async function handleCommand($: Api, st: State, args: string): Promise<string> {
|
||||
}
|
||||
}
|
||||
|
||||
// ---- /model <name>: the scope of a switch ---------------------------------
|
||||
// A typed `/model <name>` of a model the table knows asks where it applies.
|
||||
// ---- /model: the scope of a switch ----------------------------------------
|
||||
// A typed `/model <name>` of a model the table knows asks where it applies;
|
||||
// a bare `/model` opens the router's dialog (model, variant, then scope).
|
||||
// Everywhere is the native command (user settings.json); the two others set
|
||||
// a sticky model route, This project also pins `model` in the project's
|
||||
// settings.local.json. Fail-open to native only before an answer.
|
||||
@@ -2345,6 +2351,49 @@ async function scopeDialog(
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* The bare `/model` dialog: which model, which variant, then the scope.
|
||||
* Returns 'native' when the user picks the native picker.
|
||||
*/
|
||||
async function bareModelDialog(
|
||||
$: Api,
|
||||
st: State,
|
||||
e: CommandRunInput,
|
||||
next: ModelNext,
|
||||
): Promise<CommandRunResult | 'native'> {
|
||||
const labels = BARE_ALIASES.map(a => modelLabel(st.cfg, a))
|
||||
const session = clean(st.sessionModel || 'unknown', 60)
|
||||
const model = await askOr($, `Session: ${session}\nWhich model?`,
|
||||
[...labels, NATIVE_PICKER])
|
||||
if (model === NATIVE_PICKER) return 'native'
|
||||
const alias = BARE_ALIASES[labels.indexOf(model)]
|
||||
if (alias === undefined) return { text: NO_MODEL }
|
||||
const variant = await askOr($,
|
||||
`${STANDARD}: standard context · ${LONG}: 1M context (a conversation ` +
|
||||
`route follows the session's variant)\nWhich variant of ${alias}?`,
|
||||
[STANDARD, LONG])
|
||||
if (variant !== STANDARD && variant !== LONG) return { text: NO_MODEL }
|
||||
const token = variant === LONG ? `${alias}${LONG}` : alias
|
||||
return scopeDialog($, st, token,
|
||||
{ everywhere: () => next({ ...e, args: token }),
|
||||
warnKey: 'command.run model' })
|
||||
}
|
||||
|
||||
/** Native after the dialog slot is free: a pick inside it asks its scope. */
|
||||
async function nativePicker(
|
||||
$: Api,
|
||||
st: State,
|
||||
e: CommandRunInput,
|
||||
next: ModelNext,
|
||||
): Promise<CommandRunResult> {
|
||||
try {
|
||||
return await next(e)
|
||||
} catch (err) {
|
||||
warnOnce(st, $, 'command.run model', errWord(err))
|
||||
return { text: `model: native picker failed (${errWord(err)})` }
|
||||
}
|
||||
}
|
||||
|
||||
async function handleModelCommand(
|
||||
$: Api,
|
||||
st: State,
|
||||
@@ -2354,18 +2403,23 @@ async function handleModelCommand(
|
||||
await ensureConfig($, st)
|
||||
const tokens = e.args.trim().split(/\s+/)
|
||||
const token = tokens[0] ?? ''
|
||||
const bare = token === ''
|
||||
if (st.off || e.origin.kind !== 'composer' || tokens.length !== 1 ||
|
||||
!knownModel(st.cfg, token) ||
|
||||
(!bare && !knownModel(st.cfg, token)) ||
|
||||
(await $.session.surfaces()).length === 0 || st.asking !== null) {
|
||||
return next(e)
|
||||
}
|
||||
st.asking = `model:${token}`
|
||||
let out: CommandRunResult | 'native'
|
||||
try {
|
||||
return await scopeDialog($, st, token,
|
||||
{ everywhere: () => next(e), warnKey: 'command.run model' })
|
||||
out = bare
|
||||
? await bareModelDialog($, st, e, next)
|
||||
: await scopeDialog($, st, token,
|
||||
{ everywhere: () => next(e), warnKey: 'command.run model' })
|
||||
} finally {
|
||||
st.asking = null
|
||||
}
|
||||
return out === 'native' ? nativePicker($, st, e, next) : out
|
||||
}
|
||||
|
||||
// The /model picker: the engine draws nothing while a PreModelSwitch hook
|
||||
|
||||
Reference in new issue
Block a user