Repository navigation
fix(ui): Claude CLI native route shows a missing-credential banner and blocks sending - #197164
Conversation
… banner The chat composer read credential readiness from the model's default route, so a session on a runtime choice (for example Claude CLI · native on a model whose default OpenClaw route needs an API key) showed the missing-account banner and blocked sending, even though the selected route was ready. The composer now projects each catalog entry through the session's selected runtime, matching the picker, fast-mode and thinking controls. Co-authored-by: obviyus <[email protected]>
|
🦞👀 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. |
|
Codex review: needs maintainer review before merge. What this changesThe chat composer checks account readiness for the session’s selected runtime instead of the model’s default route. Example: Select Claude CLI · native for anthropic/claude-opus-5-5 when Claude CLI is ready but the default OpenClaw route lacks an Anthropic credential.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review This PR fixes a remaining, source-verifiable composer bug on current main. The focused change and supplied browser proof support merging; no actionable defects were found. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe Control UI combines Gateway model-catalog readiness with the active session’s runtime to determine the composer banner and Send availability. flowchart LR
A[Gateway model catalog] --> C[Existing runtime resolver]
B[Active session runtime] --> C
C --> D[Selected route readiness]
D --> E[Chat setup presentation]
E --> F[Composer banner and Send]
Technical reviewBest possible solution: Use the existing runtime resolver for composer readiness while preserving default-route failures and the existing policy gates. Do we have a high-confidence way to reproduce the issue? Current-main source deterministically reads the default route’s missing-auth despite a ready selected runtime, matching the contributor’s inspected before/after browser evidence; no reproduction was run during this read-only review. Is this the best way to solve the issue? This is the smallest complete repair: pass the session runtime to the existing availability owner and project matching entries through the same helper already used by other model controls. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against b22f35f7ed76. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +7, Tests +39, Other +2. Total +48 across 4 files. Added test files: 0. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. Review metrics
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed November 11, 2026, 5:09 AM ET / 10:09 UTC. |
|
Merged via squash.
|
|
Follow-up proof on the native Claude Code login. There is no API-key upstream this time; the earlier real turn used one because the subscription was at its weekly limit.
|
… banner (openclaw#197164) The chat composer read credential readiness from the model's default route, so a session on a runtime choice (for example Claude CLI · native on a model whose default OpenClaw route needs an API key) showed the missing-account banner and blocked sending, even though the selected route was ready. The composer now projects each catalog entry through the session's selected runtime, matching the picker, fast-mode and thinking controls. Co-authored-by: obviyus <[email protected]>

Closes #186358
What Problem This Solves
Fixes: the Control UI chat composer shows "No account is available for this model" (formerly "No provider credential is configured for this model") and blocks sending after you pick Claude CLI · native for a Claude model whose default route is the OpenClaw API route, even though Claude Code's own login can serve the turn.
User Impact
User impact: picking a runtime choice in the chat model picker now uses that route's readiness. With only a native
claude auth login, the Claude CLI choice can be selected and used without saving an Anthropic credential in OpenClaw. Picking a route that really lacks a credential still shows the banner (or opens account setup from the picker).Why This Change Was Made
The Gateway already reports readiness for each runtime choice of a model (
runtimeChoices). The picker, fast-mode and thinking controls read the session's selected runtime throughresolveModelRuntimeEntry. The composer banner did not:resolveChatModelSetuppassed only model and provider, so it read the default route'smissing-auth. It now passes the session'sagentRuntimeand projects each catalog entry through the same helper before it reads availability.Scope notes:
claude-cli, no OpenClaw Anthropic credential),models.listreports the models as available, the picker applies the selection and no banner appears. I checked this in a real browser against an isolated Gateway. The remaining banner shows up only when the model offers more than one route (pickerRuntimes) and the default route needs a credential. That is what this PR fixes.resolveDraftModelTarget), so it is unchanged.Evidence
Isolated Gateway (
env -i, own state, config, profile and port) running this repo's build with real Claude Code 2.1.322. Config:anthropic/claude-opus-5-5withagentRuntime: openclawandpickerRuntimes: ["claude-cli"], no Anthropic credential in OpenClaw. Gatewaymodels.listfor that model returnsavailable:false, unavailableReason:"missing-auth"(the OpenClaw route) withruntimeChoices: [{ agentRuntime: claude-cli, available: true }]. A Playwright script drove headless Chromium through the visible picker.The picker offers both routes:
Before (origin/main 8830ff6): after picking Claude CLI · native,
sessions.patch {model: anthropic/claude-opus-5-5, agentRuntime: claude-cli}succeeds (the session row reportsagentRuntime: claude-cli). The composer still shows the banner, and Send stays disabled with a typed message:After (this branch): no banner. Send is enabled, and a real turn replies through Claude Code (
[agent/cli-backend] cli turn: provider=claude-cli model=claude-opus-5-5 durationMs=10298):Picking the API · OpenClaw route, which has no credential, still opens the add-account flow from the picker.
The real turn above goes through Claude Code with an API-key upstream, because this host's Claude subscription is at its weekly limit (the same turn on its native login returned "You've hit your weekly limit"). The routing, readiness and banner checks are unaffected. Readiness comes from
claude auth statuson the real login, which reportsloggedIn: true.Tests:
ui/src/pages/chat/chat-model-setup.test.ts: new case. Default route missing-auth with a ready Claude CLI choice gives no banner on the Claude CLI session, and a banner without a session runtime. A ready default route with a missing-auth choice gives a banner on that choice. It fails on origin/main (first assertion) and passes here.model-select-state,chat-model-setup,chat-pane-model-catalog,chat-view,chat-pane-session-controls,chat-effort-picker(browser and service tiers),new-session/model-controlandchat-model-runtime(272 tests). UI E2Echat-composer-catalogandchat-composer-redesign(13 tests).pnpm tsgo:ui. All pass.node scripts/check-changed.mjs: every step passes except the dead-export scan, which lists only files this PR does not touch (extensions/knowledge/*,src/agents/*,src/gateway/openclaw-id/*).Production +10/-3, tests +39 (allocated in
config/test-lines-allocations/claude-cli-control-ui-runtime-banner.txt).