Skip to content

fix: keep the selected provider when setting up a chat model - #204440

Merged
hannesrudolph merged 2 commits into
mainfrom
openclaw/fix-picker-provider-204420
Nov 24, 2026
Merged

hannesrudolph merged 2 commits into
mainfrom
openclaw/fix-picker-provider-204420

Conversation

@roboclaw-bot

@roboclaw-bot roboclaw-bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Collaborator

Closes #204420

What Problem This Solves

Choosing Set up in a provider tab of the chat model picker forgets that provider and opens the generic Models catalog. Users must find the same provider again before connecting it.

User Impact

User impact: provider-specific setup opens that provider’s existing connection flow for the source agent. Generic setup and settings-only links retain their behavior; no defaults, credentials, or model selections are changed by opening the flow.

Why This Change Was Made

Carry the active provider through the picker callback and existing provider-aware Settings navigation. The existing connection owner resolves aliases and consumes the route intent; no second dialog or setup owner is introduced.

Evidence

Before: on main cb4f301c6bb7e27946f2cb98ef283f4500dcd6fa, the real picker’s Audit Provider Set up action reached /settings/model-providers?connect=1 with an empty search and no provider dialog.

After: the same real Gateway/production Control UI flow reached /settings/model-providers?provider=audit-provider&connect=1 and opened the Audit Provider connection dialog. Final local diff SHA-256: 9ce5e2e2748a2a2a44265e3fea17a6184b3a8dc674dd16641d9ed88f52966f82.

The provider is a locally authored archive fixture with a static catalog and no saved credentials. The final replay also publishes two login brands under one auth owner: the earlier-sorting sibling is present, but the exact Audit Provider connection opens without the sibling method. No inference or real provider login was performed. Chromium, light theme, 1280×900 viewport, matched 960×900 sidebar-free crops; the before view naturally scrolls to the generic search.

Clean comparison

Before

Before: provider context is lost and the generic search is empty

After

After: Audit Provider’s connection flow opens directly

Annotated comparison

Before

Empty generic provider search highlighted

After

Selected Audit Provider connection highlighted

Validation: two missing/failed-auth callback regressions fail on main and pass with the fix. The three shared-owner/exact-alias regressions also fail on the pre-correction candidate and pass after the matching repair. Initial pre-publication focused suite: 152 tests pass (5.07 s); earlier affected chat consumer suites: 219 pass (14.82 s). Final real-browser replay: 1 pass (49.30 s total; 3.341 s scenario). Two preliminary proof-harness failures were diagnosed and corrected without changing product source. UI build, UI typecheck, formatting, diff check, Solid guard and line-growth ratchet pass. CI is attached to the published head fe961e3b710052fc3d1b7af6a19e3b07803c8df2; see the checks for current status.

CI follow-up: The UI-pages test typecheck found a PR-caused TS2540: the new regression assigned the read-only Settings capability after constructing its application context. The fixture now initializes that real capability during construction and disposes it after the test. The exact test/tsconfig/tsconfig.core.test.ui-pages.json graph fails before and passes after the repair; all 140 tests across its six fixture consumers pass, as do focused lint/format checks. This follow-up changes only two test files (+11/−9), so production UI and the verified real-flow/media evidence are unchanged.

Known local gate limitation: standalone lint still reports the pre-existing picker panel line cap: 709 counted lines versus 714 on main, cap 700. No semantic lint failures remain. The line-growth ratchet passes; no suppression, raised limit, or unrelated cleanup was added. Repository CI classifies size limits as warnings; semantic lint errors remain blocking.

Simplify pass: reuse the connection owner, remove the superseded route dispatch helper, retain source-agent and alias handling. Production delta +104/−49; regression tests +61/−2. Final candidate tree: 1e01b77d6a8a4d32206aa5c4f6c946d9f913dc6a.

Independent review: coverage was completed on the same bound Auto Review route, P0–P2, openai/gpt-6.2-sol, with all 14 changed files and 20 dependency contracts supplied in full. The complete pre-correction review found one P2 issue: exact provider login groups must take precedence over auth-owner matches. That finding is addressed by ordered exact-group, canonical-group, then auth-owner selection; the three red/green regressions and final real shared-owner replay verify the repair. Original reports are preserved, including the historical finding status; no repeat review was requested solely to replace that status. The reviewer performed evidence-only assessment, not independent test execution.

Contributor: @daniel-lxs.

Work sessions

Linked for team reference; these sessions aren’t public.

Worked on by

Worked on by:
- @daniel-lxs

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: b40d5101-e453-4b84-bf91-a187ecae589c
@clawsweeper

clawsweeper Bot commented Nov 24, 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.

@roboclaw-bot
roboclaw-bot marked this pull request as ready for review November 24, 2026 06:25
Worked on by:
- @daniel-lxs

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: d3d2a2a9-1685-40bb-8307-39e621ebf468

@THE-NAVVV THE-NAVVV left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

​

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro 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. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 24, 2026
@clawsweeper

clawsweeper Bot commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR carries the selected provider and source agent from the model picker into the existing provider connection dialog.

Example: Click Set up in the Audit Provider tab of the chat model picker.

  • Before: Models opens at ?connect=1 with an empty provider search and no connection dialog.
  • After: Models opens at ?provider=audit-provider&connect=1 with the Audit Provider connection dialog.

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) A focused, complete repair with inspected browser evidence, distinct alias regressions, passing current-head checks, and no actionable findings.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (screenshot): Inspected screenshots support the declared real Gateway and production Control UI replay: provider-specific Set up opens Audit Provider's connection methods, including the shared-auth-owner case; actual credential submission and inference are outside this change.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Clicking provider-specific Set up forgets the chosen provider and makes the user find it again.
Reason: The maintainer-authored change removes a confirmed extra setup step using the existing connection flow, with no new setting or product policy.

Merge readiness

✅ Ready for maintainer review

Keep this PR open: it fixes a provider-setup handoff still broken on current main, with sufficient visual proof and no blocking findings.

Priority: P2
Reviewed head: fe961e3b710052fc3d1b7af6a19e3b07803c8df2

Before merge

None.

Findings

None.

Agent review details

How this fits together

The Control UI model picker passes provider context through Settings navigation, where the Models controller resolves advertised login groups and opens the existing credential connection flow.

flowchart LR
  A[Chat or New Session picker] --> B[Provider setup callback]
  B --> C[Settings navigation]
  C --> D[Models route intent]
  D --> E[Advertised login groups]
  E --> F[Existing connection dialog]
Loading

Technical review

Best possible solution:

Preserve provider and source-agent context through the existing navigation and login owners while retaining generic setup and settings-only behavior.

Do we have a high-confidence way to reproduce the issue?

Current-main source establishes the lost-provider path, and the contributor supplies matching before/after browser evidence; this read-only review ran no product code or tests.

Is this the best way to solve the issue?

The patch fixes the handoff at its existing owners, removes the superseded dispatcher, and preserves exact-brand precedence without adding another setup flow.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 463d7748595d.

Provenance checked

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Likely related people:

  • Daniel: Raw commit c00e185 adds ui/src/pages/model-providers/login-providers.ts:67 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: c00e1854a506; files: ui/src/pages/model-providers/login-providers.ts)
  • Vyctor H. Brzezowski: Raw commit 2bbbc2c adds ui/src/pages/chat/components/chat-model-auth-state.tsx:33 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 2bbbc2c8a508; files: ui/src/pages/chat/components/chat-model-auth-state.tsx)
  • Peter Steinberger: Raw commit 18cd308 adds ui/src/pages/model-providers/model-providers-controller.ts:247 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 18cd3088f476; files: ui/src/pages/model-providers/model-providers-controller.ts)
  • Ayaan Zaidi: Raw commit 5e97b15 adds ui/src/pages/model-providers/login-providers.ts:58 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 5e97b15d2105; files: ui/src/pages/model-providers/login-providers.ts)

PR surface

Source +55, Tests +59. Total +114 across 15 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 11 104 49 +55
Tests 4 61 2 +59
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 15 165 51 +114

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.

Labels

Label changes:

  • add P2: Provider setup loses a selection the user already made, but the existing in-product catalog provides a recovery path.
  • 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: Provider setup loses a selection the user already made, but the existing in-product catalog provides a recovery path.
  • 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 24, 2026, 1:53 AM ET / 06:53 UTC.

@hannesrudolph
hannesrudolph merged commit e24a2ee into main Nov 24, 2026
119 checks passed
@hannesrudolph
hannesrudolph deleted the openclaw/fix-picker-provider-204420 branch November 24, 2026 12:49
@obviyus

obviyus commented Nov 24, 2026

Copy link
Copy Markdown
Collaborator

Follow-up note on scheduled CI. No action needed: the test is already updated on main.

After this PR, ui/src/e2e/chat-composer-redesign.e2e.test.ts > "keeps auth-failed model availability honest in the composer and picker" failed on two scheduled runs, 45403387860 (a6893b81) and 45414255072 (ad8a7bac). It passed on 45394324890 (546d736d). Assertion:

TimeoutError: page.waitForURL: Timeout 30000ms exceeded.
waiting for navigation to "**/settings/model-providers?connect=1" until "load"
  at ui/src/e2e/chat-composer-redesign.e2e.test.ts:88

Cause: the auth-state "Set up" action now calls navigateToModelProvider(..., provider, { connect: true }), which opens /settings/model-providers?provider=<id>&connect=1. The test waited for the old URL. The product change is intended.

Evidence, in a Linux container matching checks-ui-e2e (Playwright 1.64.1 image, Node 24.22.1, CI's Vitest command, that file only):

Both red scheduled runs predate #204696.

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: M 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.

Provider-specific Set up in the chat picker discards the selected provider

4 participants