Repository navigation
fix(models): keep logged-out Claude CLI models listed with a login reason - #166338
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
@clawsweeper review |
|
🦞👀 Re-review progress:
|
|
|
Codex review: needs maintainer review before merge. Reviewed October 6, 2026, 9:50 PM ET / October 7, 2026, 01:50 UTC (Revision 6). ClawSweeper reviewWhat this changesThe PR keeps configured models visible when authentication is missing and adds Claude Code login guidance to the chat picker and channel model menus. Merge readiness✅ Ready for maintainer review This remains a useful, distinct fix that current main does not provide. The earlier test findings are resolved, the added Telegram evidence satisfies the previous proof request, and no blocking patch defect was found. Priority: P2 Review scores
Verification
How this fits togetherThe Gateway combines configured model choices with prepared runtime authentication facts to publish its model catalog. The Control UI and channel model menus consume that catalog to show available choices and recovery guidance. flowchart LR
A[Configured model choices] --> C[Gateway model catalog]
B[Prepared CLI login facts] --> C
C --> D[Visibility and readiness]
D --> E[Control UI picker]
D --> F[Channel model menu]
E --> G[Unavailable rows and login guidance]
F --> G
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +64, Tests +70, Docs +2. Total +136 across 13 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep configured choices visible with truthful readiness and route-specific recovery guidance while preserving native-login, selected-account, and model-policy restrictions. Do we have a high-confidence way to reproduce the issue? Yes: onboarding-shaped Claude CLI pins with an empty Claude configuration reproduce the reported catalog conditions in source and contributor before-and-after evidence; this review did not execute the application. Is this the best way to solve the issue? Yes: the patch reuses startup preparation and configured-key ownership, preserves authorization checks, and changes recovery copy without adding a competing catalog or authentication policy. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 19cd32da3326. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (5 earlier review cycles)
|
ee81928 to
cafa27b
Compare
|
@clawsweeper review |
|
🦞👀 Re-review progress:
|
cafa27b to
36b263f
Compare
|
@clawsweeper review |
|
🦞👀 Re-review progress:
|
|
@clawsweeper review |
|
🦞👀 Re-review progress:
|
|
@clawsweeper review |
|
🦞👀 Re-review progress:
|
|
@clawsweeper review |
|
🦞👀 Re-review progress:
|
…ason (openclaw#166338) ## What Problem This Solves Claude Code is installed but logged out, and onboarding has pinned the `anthropic/*` models to the `claude-cli` runtime. In that state the Control UI chat picker shows only the default model. It is disabled, has no reason, and the header says "No models available". The other 9 pinned models disappear, so a non-technical user cannot tell what is wrong or how to fix it. ## Root cause and provenance There are two causes. Both were reproduced live on an isolated Gateway, with debug logging that has since been removed. 1. **The login reason is held back until the full catalog finishes.** `evaluateCliRuntimeModelAuthAvailability` only reports `missing-auth` once `preparedSyntheticAuthComplete` is true. That gate came from openclaw#134463 (47f0122), and it exists for a good reason. The full-catalog worker finds direct CLI routes *after* startup, so their login has not been checked yet. In the words of openclaw#134463: "the full-catalog worker prepared synthetic auth only for providers present in the configured startup scope". The gate is too broad for runtimes the config already names. Preparation already checks their login at startup: `collectPreparedModelRuntimeProviderIds` adds every configured harness runtime to the startup provider scope, and `prepared-model-runtime.facts.ts` checks the synthetic auth of that scope. Meanwhile the picker never asks for a full refresh ("Opening the picker reuses prepared catalog facts; explicit Refresh owns discovery", per docs/concepts/models.md). Live logging showed the catalog stayed incomplete, with `anthropic` and `claude-cli` missing from inventory, until someone ran an explicit `refresh`. So the startup check had already returned "logged out", but the picker never displayed it. 2. **Configured rows are hidden when they are not signed in.** With an allow-any policy, the configured view lists only inline provider rows, rows that are signed in, and the default and fallbacks. Each `agents.defaults.models` key is in `configuredKeys` and is tagged `configured`, but it was only listed while signed in. This is a side effect of openclaw#110888 (69e799e). That change made the `models` map metadata only. Before it, any entry turned the map into a closed allowlist, and allowlisted rows always showed. openclaw#113594 also promised that "nobody's pinned model disappears". Earlier decisions are kept: - The per-model `claude-cli` pins (openclaw#82546, openclaw#84374) are kept, and so is Doctor's canonicalization. - openclaw#134463 still applies to routes found later and to runtimes that are not configured: their availability stays unknown until the full catalog arrives. - openclaw#166305's 60-second login recheck is unchanged. After `claude auth login`, the rows still turn available without a restart. ## Fix - `src/agents/model-auth-availability.cli-runtime.ts`: a configured runtime with no prepared runtime auth mode now gets `missing-auth` even before the full catalog arrives. "Configured" is decided by the same `collectPreparedModelRuntimeProviderIds` set that startup checks, computed once per resolver and only on this path. The CLI-runtime evaluator moved here from `model-auth-availability.ts` unchanged, because the line-cap ratchet does not allow that file to grow (-108 lines there). - `src/agents/model-catalog-visibility.ts`: configured refs now stay in the default and configured views, shown as unavailable, until their login or key comes back. This uses the same `configuredKeys` that already keeps deprecated configured rows visible. - Control UI: if the picker has no usable model and a Claude CLI row reports `missing-auth`, the empty-state label becomes "Claude Code isn't ready. If signed out, run claude auth login." instead of "No models available". "Manage models" stays next to it. The copy is conditional on purpose. `missing-auth` on a Claude CLI row also covers a disabled or denied anthropic plugin and a missing personal-account pin, so an already signed-in user can see it. The reason enum (`missing-auth` | `auth-failed` | `cooldown`) is closed and shared with the Swift and Kotlin clients, and no existing value fits a disabled plugin, so this PR keeps the protocol unchanged and words the hint to stay true in every `missing-auth` case. `claude auth login` is the command OpenClaw's own hints already use (`oauth-refresh-failure.ts`, `doctor-claude-cli.ts`, `extensions/anthropic/auth.runtime.ts`). `claude setup-token` makes an API token for the Anthropic provider; it does not log in the CLI runtime. - Channel `/models` (`commands-models-menu.ts`): for Claude CLI rows reporting `missing-auth`, the recovery line now uses the same wording as the picker hint ("If Claude Code is signed out, run claude auth login on the Gateway host, or choose another model.") instead of `/login anthropic`. Other routes are unchanged. - `docs/concepts/models.md`: documents that configured models stay listed as unavailable, and adds the Claude Code login line. No new config keys and no protocol changes: the existing `missing-auth` value is reused. ## Evidence Isolated Gateway on this Mac with state, config and `CLAUDE_CONFIG_DIR` under /tmp. The config is the one written by the real `openclaw onboard --non-interactive --auth-choice anthropic-cli`. The logged-out state is a fresh, empty `CLAUDE_CONFIG_DIR` (`claude auth status` → `loggedIn: false`). The logged-in run uses a wrapper that answers only `claude auth status` with `loggedIn: true`. No real Claude login was touched. Screenshots retaken on the final head (36b263f) and on origin/main (b7dc0bc), each from its own isolated Gateway: | | Logged out | Logged in | |---|---|---| | origin/main |  |  | | this branch |  |  | Picker contents (search "Claude"): - **origin/main, logged out:** "No models available"; one `anthropic/*` row (the default), no reason. - **This branch, logged out:** "Claude Code isn't ready. If signed out, run claude auth login."; all 10 pinned `anthropic/*` rows listed with "Sign-in needed". - **Logged in:** no empty-state label, and the same 23 picker rows in the same order on both heads. ### Telegram Test Server (`/models anthropic`) Ran the repository's Telegram userbot runner on the Telegram Test Server with a Convex-leased bot and QA user (`run-mock-sut-user-e2e.mjs --dm --scenario`). The runner starts a fresh Gateway from each checkout's build. The config patch adds two configured `anthropic/*` models pinned to `claude-cli` and enables the anthropic plugin. `CLAUDE_CONFIG_DIR` points at an empty directory, so Claude Code is logged out. The QA user sends `/models anthropic` at 1 s and again at 40 s, after startup discovery. `/models` is a native command, so no model turn runs; the only mock-provider rows are two `/` readiness probes. | | 1 s | 40 s | |---|---|---| | origin/main `b7dc0bc0fda3` | "anthropic: checking models…" | "Unknown provider: anthropic … Available providers: • openai". The configured Claude CLI models are gone. | | this branch `45dce1142171` | "Models (anthropic) — 0 of 2 available … anthropic: Sign-in needed. If Claude Code is signed out, run claude auth login on the Gateway host, or choose another model." Buttons: `…needed — Claude CLI · claude-opus-4-7`, `…eded — Claude CLI · claude-sonnet-4-6`, `<< Back`. | Same reply and buttons. | The `…` at the start of the button labels comes from Telegram's existing button-length truncation; this PR does not touch it. `models.list {view: "configured"}`, logged out, no refresh: - **origin/main:** 1 `anthropic/*` row (the default), `available: false`, no reason. - **This branch:** all 10 pinned `anthropic/*` rows, `available: false`, `unavailableReason: "missing-auth"`. - **Logged in:** the configured-view rows, runtimes and availability on this branch are identical to the origin/main capture of the same config. The duplicate `claude-cli/*` rows in the screenshots are the existing twins; openclaw#166311 removes them. ## Tests - `models-list-result.cli-runtime-availability.test.ts`, new case: an onboarding-shaped config, Claude logged out, catalog incomplete, configured view, run through the real `buildModelsListResult`. Every pinned row is listed with `missing-auth`, and the unpinned API row stays hidden. It fails on origin/main for both causes (rows missing, no reason). - `models.test.ts`: the existing table row for "logged out, catalog incomplete" now expects `missing-auth`, because the runtime is configured. It fails on origin/main. - `chat-model-catalog-state.test.ts`: the real `renderChatModelPicker`, given a `missing-auth` Claude CLI row, renders exactly the conditional Claude Code hint (the same row a signed-in user gets when the anthropic plugin is disabled, which `models-list-result.cli-runtime-availability.test.ts` already covers on the producer side). Other providers keep "No models available". It fails on origin/main (`expected 'No models available'`). - `commands-models.catalog-recovery.test.ts` and `commands-models.test.ts` go through the real `/models` handler, which reads the same projection as the picker. A CLI-bound configured model is now listed in every auth state. It is marked "Sign-in needed" unless its prepared native login is present and its plugin is enabled. Its recovery line reads "If Claude Code is signed out, run claude auth login on the Gateway host, or choose another model." instead of `/login anthropic`, which can't fix a Claude Code login or a disabled plugin. A logged-out configured Claude CLI default now gets that recovery line instead of "Connection not confirmed". The openclaw#139848 rule still holds: with only an API key, the bound row shows "Sign-in needed" and is not available. - Wall time with `pnpm test <file> --maxWorkers=1`: 35 s, 37 s and 3 s. The new gateway case takes 325 ms. No timers and no new fixtures. - Also run: affected suites (`model-catalog*`, `model-auth-availability*`, `model-selection*`, `server-methods/models*`, `commands/models`, the chat picker UI and new-session), all passing. `node scripts/check-changed.mjs` exits 0 (tsgo core and UI, lint, import cycles, line-cap ratchet, i18n). ## Bounded cost - No new processes, probes, network calls or catalog work. The existing startup `claude auth status` check and openclaw#166305's 60-second recheck are unchanged. - The configured-runtime set is built at most once per auth resolver, which is one per `models.list` read. It is built only when a CLI-runtime row has no prepared login, and it is a pure walk over the config's model refs. - Visibility adds one `Set.has` per catalog row. The UI adds one `.some()` over picker options per render. - Picker size is bounded by configured refs: at most the number of models the user authored, and they were already listed while signed in. ## User impact A logged-out Claude Code user sees every configured Claude model, greyed with "Sign-in needed", and a header that names the command to run. Once `claude auth login` succeeds, the rows turn available on the next read after openclaw#166305's recheck. Configured models for other providers that have lost their key now also stay listed as unavailable instead of disappearing. The channel `/models` command shows the same rows marked "Sign-in needed", and Claude CLI rows get the conditional `claude auth login` recovery line. The logged-in picker is unchanged. ## LOC vs origin/main Production +182/-118. The moved evaluator accounts for +147/-112 and is unchanged apart from the configured-runtime check, so the behaviour change itself is about +35. Tests +82/-12. Docs +3/-1. Co-authored-by: Ayaan Zaidi <[email protected]>
…75114) The Claude CLI readiness probe (`claude auth status`) always stripped the Claude clear list, including CLAUDE_CODE_OAUTH_TOKEN, while CLI execution keeps keys named in OPENCLAW_LIVE_CLI_BACKEND_PRESERVE_ENV for native-login runs. Since #166338 made a configured runtime without prepared native auth authoritatively `missing-auth`, that mismatch makes sessions_spawn refuse an anthropic/* child pinned to claude-cli ("The selected account or native runtime is unavailable") even though the parent turn runs. The Docker live CLI backend lane (env-token subscription auth) hit this on every 2026.10.5 candidate and main, and its announce barrier then timed out at 240s. Probe the same child environment execution uses: preserved keys survive the clear list. Unlisted credentials (for example ANTHROPIC_API_KEY) stay cleared, and a genuinely logged-out CLI still reports missing.
…75114) The Claude CLI readiness probe (`claude auth status`) always stripped the Claude clear list, including CLAUDE_CODE_OAUTH_TOKEN, while CLI execution keeps keys named in OPENCLAW_LIVE_CLI_BACKEND_PRESERVE_ENV for native-login runs. Since #166338 made a configured runtime without prepared native auth authoritatively `missing-auth`, that mismatch makes sessions_spawn refuse an anthropic/* child pinned to claude-cli ("The selected account or native runtime is unavailable") even though the parent turn runs. The Docker live CLI backend lane (env-token subscription auth) hit this on every 2026.10.5 candidate and main, and its announce barrier then timed out at 240s. Probe the same child environment execution uses: preserved keys survive the clear list. Unlisted credentials (for example ANTHROPIC_API_KEY) stay cleared, and a genuinely logged-out CLI still reports missing. (cherry picked from commit a2e6a6b)
…enclaw#175114) The Claude CLI readiness probe (`claude auth status`) always stripped the Claude clear list, including CLAUDE_CODE_OAUTH_TOKEN, while CLI execution keeps keys named in OPENCLAW_LIVE_CLI_BACKEND_PRESERVE_ENV for native-login runs. Since openclaw#166338 made a configured runtime without prepared native auth authoritatively `missing-auth`, that mismatch makes sessions_spawn refuse an anthropic/* child pinned to claude-cli ("The selected account or native runtime is unavailable") even though the parent turn runs. The Docker live CLI backend lane (env-token subscription auth) hit this on every 2026.10.5 candidate and main, and its announce barrier then timed out at 240s. Probe the same child environment execution uses: preserved keys survive the clear list. Unlisted credentials (for example ANTHROPIC_API_KEY) stay cleared, and a genuinely logged-out CLI still reports missing.
…enclaw#175114) The Claude CLI readiness probe (`claude auth status`) always stripped the Claude clear list, including CLAUDE_CODE_OAUTH_TOKEN, while CLI execution keeps keys named in OPENCLAW_LIVE_CLI_BACKEND_PRESERVE_ENV for native-login runs. Since openclaw#166338 made a configured runtime without prepared native auth authoritatively `missing-auth`, that mismatch makes sessions_spawn refuse an anthropic/* child pinned to claude-cli ("The selected account or native runtime is unavailable") even though the parent turn runs. The Docker live CLI backend lane (env-token subscription auth) hit this on every 2026.10.5 candidate and main, and its announce barrier then timed out at 240s. Probe the same child environment execution uses: preserved keys survive the clear list. Unlisted credentials (for example ANTHROPIC_API_KEY) stay cleared, and a genuinely logged-out CLI still reports missing. (cherry picked from commit a2e6a6b) (cherry picked from commit ad67421) Co-authored-by: RomneyDa <[email protected]>
…75114) The Claude CLI readiness probe (`claude auth status`) always stripped the Claude clear list, including CLAUDE_CODE_OAUTH_TOKEN, while CLI execution keeps keys named in OPENCLAW_LIVE_CLI_BACKEND_PRESERVE_ENV for native-login runs. Since #166338 made a configured runtime without prepared native auth authoritatively `missing-auth`, that mismatch makes sessions_spawn refuse an anthropic/* child pinned to claude-cli ("The selected account or native runtime is unavailable") even though the parent turn runs. The Docker live CLI backend lane (env-token subscription auth) hit this on every 2026.10.5 candidate and main, and its announce barrier then timed out at 240s. Probe the same child environment execution uses: preserved keys survive the clear list. Unlisted credentials (for example ANTHROPIC_API_KEY) stay cleared, and a genuinely logged-out CLI still reports missing. (cherry picked from commit a2e6a6b)
What Problem This Solves
Claude Code is installed but logged out, and onboarding has pinned the
anthropic/*models to theclaude-cliruntime. In that state the Control UI chat picker shows only the default model. It is disabled, has no reason, and the header says "No models available". The other 9 pinned models disappear, so a non-technical user cannot tell what is wrong or how to fix it.Root cause and provenance
There are two causes. Both were reproduced live on an isolated Gateway, with debug logging that has since been removed.
evaluateCliRuntimeModelAuthAvailabilityonly reportsmissing-authoncepreparedSyntheticAuthCompleteis true. That gate came from fix(models): pair full catalog with native auth #134463 (84e8133), and it exists for a good reason. The full-catalog worker finds direct CLI routes after startup, so their login has not been checked yet. In the words of fix(models): pair full catalog with native auth #134463: "the full-catalog worker prepared synthetic auth only for providers present in the configured startup scope".The gate is too broad for runtimes the config already names. Preparation already checks their login at startup:
collectPreparedModelRuntimeProviderIdsadds every configured harness runtime to the startup provider scope, andprepared-model-runtime.facts.tschecks the synthetic auth of that scope.Meanwhile the picker never asks for a full refresh ("Opening the picker reuses prepared catalog facts; explicit Refresh owns discovery", per docs/concepts/models.md). Live logging showed the catalog stayed incomplete, with
anthropicandclaude-climissing from inventory, until someone ran an explicitrefresh. So the startup check had already returned "logged out", but the picker never displayed it.agents.defaults.modelskey is inconfiguredKeysand is taggedconfigured, but it was only listed while signed in.This is a side effect of feat(models): make per-agent model allowlist explicit; aliases/defaults no longer restrict #110888 (09a64f7). That change made the
modelsmap metadata only. Before it, any entry turned the map into a closed allowlist, and allowlisted rows always showed. feat(models): curate default model picker to current-generation catalogs #113594 also promised that "nobody's pinned model disappears".Earlier decisions are kept:
claude-clipins (Fix Claude CLI runtime migration for gateway turns #82546, Fix Anthropic CLI auth routing for shorthand refs #84374) are kept, and so is Doctor's canonicalization.claude auth login, the rows still turn available without a restart.Fix
src/agents/model-auth-availability.cli-runtime.ts: a configured runtime with no prepared runtime auth mode now getsmissing-autheven before the full catalog arrives. "Configured" is decided by the samecollectPreparedModelRuntimeProviderIdsset that startup checks, computed once per resolver and only on this path.The CLI-runtime evaluator moved here from
model-auth-availability.tsunchanged, because the line-cap ratchet does not allow that file to grow (-108 lines there).src/agents/model-catalog-visibility.ts: configured refs now stay in the default and configured views, shown as unavailable, until their login or key comes back. This uses the sameconfiguredKeysthat already keeps deprecated configured rows visible.missing-auth, the empty-state label becomes "Claude Code isn't ready. If signed out, run claude auth login." instead of "No models available". "Manage models" stays next to it.The copy is conditional on purpose.
missing-authon a Claude CLI row also covers a disabled or denied anthropic plugin and a missing personal-account pin, so an already signed-in user can see it. The reason enum (missing-auth|auth-failed|cooldown) is closed and shared with the Swift and Kotlin clients, and no existing value fits a disabled plugin, so this PR keeps the protocol unchanged and words the hint to stay true in everymissing-authcase.claude auth loginis the command OpenClaw's own hints already use (oauth-refresh-failure.ts,doctor-claude-cli.ts,extensions/anthropic/auth.runtime.ts).claude setup-tokenmakes an API token for the Anthropic provider; it does not log in the CLI runtime./models(commands-models-menu.ts): for Claude CLI rows reportingmissing-auth, the recovery line now uses the same wording as the picker hint ("If Claude Code is signed out, run claude auth login on the Gateway host, or choose another model.") instead of/login anthropic. Other routes are unchanged.docs/concepts/models.md: documents that configured models stay listed as unavailable, and adds the Claude Code login line.No new config keys and no protocol changes: the existing
missing-authvalue is reused.Evidence
Isolated Gateway on this Mac with state, config and
CLAUDE_CONFIG_DIRunder /tmp. The config is the one written by the realopenclaw onboard --non-interactive --auth-choice anthropic-cli. The logged-out state is a fresh, emptyCLAUDE_CONFIG_DIR(claude auth status→loggedIn: false). The logged-in run uses a wrapper that answers onlyclaude auth statuswithloggedIn: true. No real Claude login was touched.Screenshots retaken on the final head (36b263f) and on origin/main (2c620bb), each from its own isolated Gateway:
Picker contents (search "Claude"):
anthropic/*row (the default), no reason.anthropic/*rows listed with "Sign-in needed".Telegram Test Server (
/models anthropic)Ran the repository's Telegram userbot runner on the Telegram Test Server with a Convex-leased bot and QA user (
run-mock-sut-user-e2e.mjs --dm --scenario). The runner starts a fresh Gateway from each checkout's build. The config patch adds two configuredanthropic/*models pinned toclaude-cliand enables the anthropic plugin.CLAUDE_CONFIG_DIRpoints at an empty directory, so Claude Code is logged out. The QA user sends/models anthropicat 1 s and again at 40 s, after startup discovery./modelsis a native command, so no model turn runs; the only mock-provider rows are two/readiness probes.2c620bbfe84c45dce1142171…needed — Claude CLI · claude-opus-4-7,…eded — Claude CLI · claude-sonnet-4-6,<< Back.The
…at the start of the button labels comes from Telegram's existing button-length truncation; this PR does not touch it.models.list {view: "configured"}, logged out, no refresh:anthropic/*row (the default),available: false, no reason.anthropic/*rows,available: false,unavailableReason: "missing-auth".The duplicate
claude-cli/*rows in the screenshots are the existing twins; #166311 removes them.Tests
models-list-result.cli-runtime-availability.test.ts, new case: an onboarding-shaped config, Claude logged out, catalog incomplete, configured view, run through the realbuildModelsListResult. Every pinned row is listed withmissing-auth, and the unpinned API row stays hidden. It fails on origin/main for both causes (rows missing, no reason).models.test.ts: the existing table row for "logged out, catalog incomplete" now expectsmissing-auth, because the runtime is configured. It fails on origin/main.chat-model-catalog-state.test.ts: the realrenderChatModelPicker, given amissing-authClaude CLI row, renders exactly the conditional Claude Code hint (the same row a signed-in user gets when the anthropic plugin is disabled, whichmodels-list-result.cli-runtime-availability.test.tsalready covers on the producer side). Other providers keep "No models available". It fails on origin/main (expected 'No models available').commands-models.catalog-recovery.test.tsandcommands-models.test.tsgo through the real/modelshandler, which reads the same projection as the picker. A CLI-bound configured model is now listed in every auth state. It is marked "Sign-in needed" unless its prepared native login is present and its plugin is enabled. Its recovery line reads "If Claude Code is signed out, run claude auth login on the Gateway host, or choose another model." instead of/login anthropic, which can't fix a Claude Code login or a disabled plugin.A logged-out configured Claude CLI default now gets that recovery line instead of "Connection not confirmed". The fix(models): restore missing picker choices after startup #139848 rule still holds: with only an API key, the bound row shows "Sign-in needed" and is not available.
pnpm test <file> --maxWorkers=1: 35 s, 37 s and 3 s. The new gateway case takes 325 ms. No timers and no new fixtures.model-catalog*,model-auth-availability*,model-selection*,server-methods/models*,commands/models, the chat picker UI and new-session), all passing.node scripts/check-changed.mjsexits 0 (tsgo core and UI, lint, import cycles, line-cap ratchet, i18n).Bounded cost
claude auth statuscheck and fix(models): recheck Claude CLI login for model lists after Gateway startup #166305's 60-second recheck are unchanged.models.listread. It is built only when a CLI-runtime row has no prepared login, and it is a pure walk over the config's model refs.Set.hasper catalog row. The UI adds one.some()over picker options per render.User impact
A logged-out Claude Code user sees every configured Claude model, greyed with "Sign-in needed", and a header that names the command to run. Once
claude auth loginsucceeds, the rows turn available on the next read after #166305's recheck. Configured models for other providers that have lost their key now also stay listed as unavailable instead of disappearing. The channel/modelscommand shows the same rows marked "Sign-in needed", and Claude CLI rows get the conditionalclaude auth loginrecovery line. The logged-in picker is unchanged.LOC vs origin/main
Production +182/-118. The moved evaluator accounts for +147/-112 and is unchanged apart from the configured-runtime check, so the behaviour change itself is about +35. Tests +82/-12. Docs +3/-1.