Repository navigation
fix: keep OpenAI model discovery on configured auth profile - #137120
Conversation
|
Codex review: blocked before merge. Reviewed September 6, 2026, 2:04 AM ET / 06:04 UTC. ClawSweeper reviewWhat this changesMakes model discovery honor configured account ordering and carry the selected credential’s identity, authentication mode, and refreshed token through catalog requests. Merge readiness⛔ Blocked before merge - 4 items remain This PR remains necessary: current main still contains the reported discovery-order mismatch. The reviewed patch addresses it coherently, preserves earlier catalog compatibility fixes, and has substantial behavior evidence; no blocking code defect was identified. Priority: P1 Review scores
Verification
How this fits togetherModel discovery combines configured providers and stored credentials into account-specific model inventories used by the Gateway, CLI, and model pickers. Authentication selection determines which account supplies that inventory and how discovery failures are reported. flowchart TD
A[Configured account order] --> C[Credential selection]
B[Stored profiles and cooldowns] --> C
C --> D[Prepare selected credential]
D --> E[Provider catalog request]
E --> F[Account inventory and outcome]
F --> G[Gateway CLI and model pickers]
Decision needed
Why: The change tightens behavior present in v2026.9.2 beyond catalog discovery; source and recovery proof support the implementation, but the required auth-path owner's acceptance is not established. Before merge
Agent review detailsSecurityNone. PR surfaceSource +290, Tests +1132, Docs +20. Total +1442 across 24 files. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep account selection canonical and request identity stable, with listed-owner acceptance of the shared locked-profile contract and explicit rotation remaining in the outer auth controller. Do we have a high-confidence way to reproduce the issue? Yes: persist accounts A then B, configure B first, and give the accounts distinct catalog responses. Current-main source still selects by persisted order; this review did not execute a reproduction. Is this the best way to solve the issue? Yes for the ordering repair: reusing canonical selection and carrying credential facts together fixes the producer boundary. Applying strict locking to every shared resolver caller remains an explicit compatibility choice. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 1ad2e83fd7d5. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (22 earlier review cycles; latest 8 shown)
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
e154066 to
b352767
Compare
|
Fixed: OpenAI model discovery now follows configured profile priority and keeps each catalog request bound to its selected account. |
…#137120) Use canonical eligible auth-profile ordering for OpenAI model discovery and keep the selected credential's mode, current material, and profile identity together. Preserve shared provider catalog compatibility. Closes openclaw#137033.
Closes #137033
What Problem This Solves
With multiple OpenAI accounts, model discovery could choose persisted account A even when usable account B was configured first. A rejected or different inventory could hide B's models from listings and pickers.
Why This Change Was Made
Discovery now reuses canonical profile ordering, eligibility and account-wide cooldown rules. Preparation can advance past an unusable expiring OAuth candidate before discovery; each catalog request then stays bound to its selected profile, without another-account retry after rejection.
The selected credential's mode and current material travel together. Configured OpenAI OAuth/token credentials use subscription discovery, refreshed Chutes material reaches its consumer, and MiniMax derives the auth header from the same selection. Existing source precedence, optional profile provenance and provider-owned multiple credential probes remain supported.
A locked credential materialization returns that profile or its failure. The existing outer auth controller still performs permitted rotation and retains a user's stored pin. This is not a new no-failover policy.
User Impact
The preferred usable account supplies discovered models. Unresolved secret markers remain network-free, and asynchronous preparation cannot begin a catalog request after its deadline. Existing inventory retention and generation-owned native/configured rows remain intact. There are no new settings, schema changes or dependencies.
Evidence
/v1/models, HTTP 200, the matching ready outcome and 11 compatible models. Credential bytes and response bodies were not logged. Subscription routing is covered with controlled HTTPS, not claimed as a credentialed subscription run.728cb12fe5794b0c3a8e776fb4994b1650b973a8verifies per-request auth-mode, bearer and account coupling. No universal native-session account-isolation change is claimed.Visual evidence
Before and after: search the real Gateway model picker
openai-catalog-proof.mp4
Visual verification
b352767a5b1941684dc722f925a483d690d6d192