Skip to content

fix(ui): Claude CLI native route shows a missing-credential banner and blocks sending - #197164

Merged
obviyus merged 1 commit into
mainfrom
fix/control-ui-claude-cli-credential-banner
Nov 11, 2026
Merged

obviyus merged 1 commit into
mainfrom
fix/control-ui-claude-cli-credential-banner

Conversation

@obviyus

@obviyus obviyus commented Nov 11, 2026

Copy link
Copy Markdown
Collaborator

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 through resolveModelRuntimeEntry. The composer banner did not: resolveChatModelSetup passed only model and provider, so it read the default route's missing-auth. It now passes the session's agentRuntime and projects each catalog entry through the same helper before it reads availability.

Scope notes:

  • fix(models): Claude CLI models stay Sign-in needed after signing in until a Gateway restart #197075 fixed the Gateway login recheck for the same issue. On current main, with the issue's exact config (every Claude model pinned to claude-cli, no OpenClaw Anthropic credential), models.list reports 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.
  • The new-session draft composer already resolves the selected runtime (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-5 with agentRuntime: openclaw and pickerRuntimes: ["claude-cli"], no Anthropic credential in OpenClaw. Gateway models.list for that model returns available:false, unavailableReason:"missing-auth" (the OpenClaw route) with runtimeChoices: [{ agentRuntime: claude-cli, available: true }]. A Playwright script drove headless Chromium through the visible picker.

The picker offers both routes:

Picker: Claude Opus 5.5 offers "1M · Claude CLI · native" and "API · OpenClaw · Sign-in needed"

Before (origin/main 8830ff6): after picking Claude CLI · native, sessions.patch {model: anthropic/claude-opus-5-5, agentRuntime: claude-cli} succeeds (the session row reports agentRuntime: claude-cli). The composer still shows the banner, and Send stays disabled with a typed message:

Before: missing-account banner above the composer, Send 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):

After: no banner above the composer

After: the prompt "Reply with exactly: native-route-ok" answered "native-route-ok" through the Claude CLI route

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 status on the real login, which reports loggedIn: 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.
  • Consumer suites: 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-control and chat-model-runtime (272 tests). UI E2E chat-composer-catalog and chat-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).

… 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]>
@clawsweeper

clawsweeper Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. labels Nov 11, 2026
@clawsweeper

clawsweeper Bot commented Nov 11, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

The 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.

  • Before: The composer shows “No account is available for this model” and disables Send.
  • After: The banner disappears and the Claude CLI route can answer the message.

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) A focused repair with inspected shipped-entry-point evidence, meaningful regression coverage, and no identified correctness or security defects.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (screenshot): The inspected screenshots and accompanying isolated-Gateway trace exercise the visible picker, blocked pre-fix composer, cleared post-fix banner, and completed Claude Code reply; the successful turn’s API-key upstream limitation is explicitly disclosed and does not bypass the changed UI readiness path.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Selecting a ready Claude CLI route leaves the chat composer blocked by an unrelated API-route credential warning.
Reason: The maintainer-authored change restores documented route-specific readiness without introducing options or changing routing policy.

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
Reviewed head: 0a24011173bbf9946981608fa2a0481b0c7f6f4c

Before merge

None.

Findings

None.

Agent review details

How this fits together

The 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]
Loading

Technical review

Best 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

  • Actionable authentication gating keeps the original intent (d6e1f01: Gate composers on actionable missing or failed authentication rather than transient or unknown availability.)
  • Availability priority across aliases keeps the original intent (c9db735: Stop when a usable match is found while preserving unavailable-alias priority and reducing repeated catalog work.)
  • Role policy and composer presentation keeps the original intent (d17bc21: Respect role-permitted models without letting historical session choices override the current policy.)
  • Shared chat setup owner keeps the original intent (81901bf: Consolidate duplicated page rendering and lifecycle logic without changing visible behavior or Gateway authority.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit d6e1f01 adds ui/src/lib/chat/model-select-state.ts:181 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: d6e1f019f088; files: ui/src/lib/chat/model-select-state.ts)
  • Shakker: Raw commit d17bc21 adds ui/src/pages/chat/chat-model-setup.ts:29 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: d17bc2129b60; files: ui/src/pages/chat/chat-model-setup.ts)

PR surface

Source +7, Tests +39, Other +2. Total +48 across 4 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 2 10 3 +7
Tests 1 39 0 +39
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 2 0 +2
Total 4 51 3 +48

Preflight source

Source 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

Metric Value Why it matters
Production versus regression coverage Production +10/-3; tests +39 The small production change reuses an existing resolver; one regression covers route-specific readiness and both default/alternate failure controls.

Labels

Label changes:

  • add P2: A ready alternate runtime is incorrectly blocked in the existing chat composer; the failure is limited to models with differing readiness across routes.
  • add proof: sufficient: Contributor real behavior proof is sufficient.
  • add proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.
  • add rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P2: A ready alternate runtime is incorrectly blocked in the existing chat composer; the failure is limited to models with differing readiness across routes.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • proof: sufficient: Contributor real behavior proof is sufficient.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed November 11, 2026, 5:09 AM ET / 10:09 UTC.

@obviyus
obviyus merged commit 4016869 into main Nov 11, 2026
100 checks passed
@obviyus
obviyus deleted the fix/control-ui-claude-cli-credential-banner branch November 11, 2026 10:28
@obviyus

obviyus commented Nov 11, 2026

Copy link
Copy Markdown
Collaborator Author

Merged via squash.

@obviyus

obviyus commented Nov 11, 2026

Copy link
Copy Markdown
Collaborator Author

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.

  • Build: origin/main with this fix, on an isolated Gateway (env -i, own state and port). The config gives anthropic/claude-haiku-5-5 agentRuntime: openclaw and pickerRuntimes: ["claude-cli"], with no Anthropic credential in OpenClaw.
  • The picker shows "API · OpenClaw · Sign-in needed" and "1M · Claude CLI · native". After picking Claude CLI · native, no banner appears and Send is enabled.
  • The real turn ran on the native login: [agent/cli-backend] cli turn: provider=claude-cli model=claude-haiku-5-5 durationMs=2085, and the reply was native-ok.

Native login: "Reply with exactly: native-ok" answered "native-ok" through Claude CLI

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 12, 2026
… 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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Control UI shows "No provider credential" and rejects Claude CLI model selection with native-only Claude login

1 participant