Repository navigation
Conversation
Model selection resolved the CLI backend without plugin metadata, so a prepared native login was treated as missing.
|
🦞👀 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 real behavior proof before merge. What this changesThis PR passes prepared config, environment, and plugin metadata into CLI backend lookup so model selection recognizes an already prepared Claude CLI login. Example: Claude Code is signed in, anthropic/claude-opus-5-5 is configured for claude-cli, and the backend is available through plugin metadata before runtime registration.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Blocked before merge - 2 items remain Keep open: this PR narrowly repairs a source-confirmed current-main authentication availability bug, with no actionable code findings. Priority: P2 Before merge
FindingsNone. Tests
Agent review detailsHow this fits togetherThe shared model-auth resolver combines configured runtime choices, plugin metadata, and prepared credential facts into availability decisions consumed by model catalogs and model selection. flowchart TD
A[Model command or picker] --> B[Shared model auth resolver]
C[Config and plugin metadata] --> D[CLI backend binding]
B --> D
D --> E[Account policy and prepared login]
E --> F[Model availability decision]
F --> A
Technical reviewBest possible solution: Resolve metadata-declared backends through the existing setup owner while preserving prepared-login, plugin-enablement, and explicit-account checks. Do we have a high-confidence way to reproduce the issue? Current-main source establishes the missing-context rejection path, supported by the released-version report and the contributor's reported red-before/green-after regression; this review ran no target code. Is this the best way to solve the issue? This is a small repair at the existing lookup boundary: it restores context rather than inventing login evidence, and leaves account selection and plugin policy with their current owners. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 4ec97ef5e73e. Provenance checked
TestingProof path: unit tests only. SecurityNone. EvidenceWhat I checked:
PR surfaceSource +14, Tests +56, Other +3. Total +73 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: No label changes. Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
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 10, 2026, 9:49 AM ET / 14:49 UTC. |
Closes #196694
What Problem This Solves
Fixes:
/modelsays Claude needs a sign-in, and choosinganthropic/*says no runtime is available, when Claude CLI is already signed in and agent turns on that runtime still succeed.User Impact
A configured
claude-cliruntime stays selectable after its native login has been prepared. A signed-out CLI still cannot be selected, and an explicit account that is missing still cannot be selected.Why This Change Was Made
Model selection looked up the CLI backend without the prepared config or plugin metadata. When that backend was declared only by metadata, and the process had not registered it yet, selection stopped before the prepared native login was checked. The lookup now uses that prepared context. A native profile id by itself is still not treated as a login.
Evidence
Node v24.22.2, pnpm 12.15.0, Vitest 5.0.5. Package
2026.11.2. Basec321c038b59.The production entry is
evaluateRuntimeModelAuth, which/modeluses while building the catalog decision. This host has no Claude CLI login, so the proof prepares a nativeoauthmode and a metadata snapshot that declaresclaude-cli, with no ambient runtime registration.Red, before the lookup change:
pnpm test src/agents/model-auth-availability.runtime-policy.test.ts --maxWorkers=1 -t "keeps a prepared Claude CLI login"availabilitywasfalsewhere the prepared login expectstrue. Vitest duration 68.83s. Command wall 74.83s, including compiler preparation.Green, head
7276006d754:pnpm test src/agents/model-auth-availability.runtime-policy.test.ts src/agents/model-runtime-choice.native.test.ts src/agents/cli-backends.test.ts --maxWorkers=1node scripts/run-oxlint.mjs --tsconfig tsconfig.core.jsonon the three touched source files passed.pnpm exec oxfmt --writeon those files, thengit diff --check, passed.pnpm check:test-lines-ratchet --base upstream/main --no-merge-base:Test lines OK: 6628762; ceiling: 6628762; slack: 0.Net delta +56. Allocationconfig/test-lines-allocations/claude-cli-metadata-model-auth.txtis 55, which covers the one line of missing slack on this base.pnpm tsgo:coreexited 0.CI on
7276006d754: changed-file tests, lint, typecheck, guards, and baseline ratchets passed (https://github.com/openclaw/openclaw/actions/runs/42835294043). Dependency review passed.openclaw/security-sensitive-reviewis still waiting for a maintainer command on this head, and the commit statusopenclaw/ci-gatefails for that approval rather than a test assertion (https://github.com/openclaw/openclaw/actions/runs/42836980655). Merge-tree against upstreammainf5d0c194fcdon 2026-11-11 has no conflicts.ClawSweeper's review of this head found no code defects. It still asks for a shipped
/modellisting and selection of a metadata-resolved Claude CLI model with a real prepared login, followed by a successful turn. This host has no signed-inclaudebinary, so that capture is not available. No re-review was requested.Not run: a live
/modelturn against a signed-inclaudebinary, fullpnpm test, andpnpm check.Release note:
/modelno longer asks for a Claude sign-in when the Claude CLI login is already prepared.