Repository navigation
fix(models): show catalog authentication rejections in models list - #167128
tianhaotian wants to merge 1 commit into
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. |
|
Codex review: needs maintainer review before merge. Reviewed October 8, 2026, 6:37 AM ET / 10:37 UTC (Revision 2). ClawSweeper reviewWhat this changesThe branch displays provider-specific discovery diagnostics on stderr and includes public catalog outcomes in model-list JSON. Example: The user lists an empty xai catalog using profile xai:work.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Partial Merge readiness✅ Ready for maintainer review This PR remains useful because current main still omits catalog authentication diagnostics. No actionable correctness or security finding remains, and the supplied CLI proof covers the changed presentation boundary. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe model-list CLI reads models and discovery outcomes published by the selected Gateway or local catalog owner. It presents these facts as a table, JSON, or plain model keys. flowchart TD
A[User lists models] --> B[Selected Gateway or local catalog]
B --> C[Published models and discovery outcomes]
C --> D[Present discovery diagnostics]
D --> E[Stderr with recovery guidance]
C --> F[Render requested output]
F --> G[Table, JSON, or model keys]
Technical reviewBest possible solution: Present the catalog owner's existing failure facts at the CLI boundary and investigate the remaining xAI entitlement and routing claims separately. Do we have a high-confidence way to reproduce the issue? Yes: an auth-rejected provider outcome without refreshFailed deterministically receives no provider diagnostic on current main. Source and existing coverage establish the trigger; this review did not execute code. Is this the best way to solve the issue? Yes for the diagnostic gap: displaying already-published facts is a narrow repair that preserves discovery ownership and avoids speculative authentication or routing changes. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 5e8fbaf8b422. Provenance checked
TestingProof path: shipped entry point. Added test files: 1. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +25, Tests +79, Docs +9. Total +113 across 4 files. View PR surface stats
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. 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 HistoryReview history (1 earlier review cycle)
|
Related: #166875
What Problem This Solves
Fixes:
openclaw models listsilently shows an empty or partial catalog when the published catalog reports rejected provider authentication withoutrefreshFailed.User Impact
Users now see provider/profile-specific discovery guidance on stderr in human, JSON, and plain modes. JSON also exposes the published
providerOutcomes; available model rows and plain stdout remain usable.This addresses the reproducible CLI diagnostic gap in #166875. It does not establish or repair the reported xAI subscription entitlement or request-routing behavior. Outcomes describe the whole catalog, even when model rows are filtered.
Why This Change Was Made
The catalog already publishes
ready,auth-rejected, andunavailableoutcomes. The CLI now preserves those public facts, sanitizes terminal labels, and keeps authentication rejection separate from the generic refresh-failure warning. It does not manufacture models or change discovery/authentication policy.Evidence
refreshFailed, empty/filtered catalogs, and JSON/plain output. After the change: 23/23 passed (24.61s wrapper, 22.15s Vitest) usingpnpm test src/commands/models/list.prepared-catalog.test.ts --maxWorkers=1.pnpm buildpassed (159.21s wall time; non-fatal UI startup gzip budget warning: 364.8 KiB vs 364.7 KiB).1d4a7a9b41: all fivepnpm openclaw --profile catalog-proof-166875 models listscenarios passed against an isolated WebSocket catalog fixture (8.74s total). Empty human/JSON/plain catalogs all emitted the authentication diagnostic with exit 0; retained JSON/plain catalogs kept the available model. JSON included only public provider outcomes; plain stdout contained only model keys. No generic refresh warning was emitted whenrefreshFailedwas absent.check:changed: production and all six selected test type graphs passed, along with initial guards. The full-tree dead-export scan fails on the same five symbols at pristine baseline0043bb028914e6f92632623a99b482a8cd93b3b5(independently reproduced in 52.88s):LocalRemoteShellSpawnResultinsrc/agents/sandbox/remote-fs-bridge.test-helpers.ts, plusTURN_MODEL_PERSISTED_CHANNEL_REF,TURN_MODEL_PERSISTED_PEER_REF,TURN_MODEL_SESSION_REF, andTurnModelSelectionPathinsrc/test-utils/turn-model-selection-differential.ts. No unrelated baseline edits are included. All nine checks after that scan were run separately and passed, including changed-file type-aware lint, state-schema and database guards, import cycles, and pairing/webhook checks.