refactor(model-proxy, bus, webui): the provider list comes from the cliproxy plugin, and the Model setup page builds its provider select from the status read (#1873) #2012

Merged
jason.woltje merged 3 commits from settings-backend-a3 into refactor 2026-11-20 09:40:16 +00:00
Owner

What changes

Settings backend slice A3 (lane settings-backend-a3): the provider list comes from the cliproxy plugin. Same three providers, same refusals.

  • One list. packages/plugins/model-provider/cliproxy/index.mjs exports PROVIDERS: id, label, sign-in kind, the sign-in host for a subscription and the base URL for the key provider.
  • Readers. The management client's oauthStart and the bus proxy page (names, login allow list, sign-in host check, key allow list) read it. They refuse with the same codes as before, proxy-client-invalid and provider-not-allowed. An entry that lacks what its door needs is refused before any call.
  • Status. The setup status and the accounts answer carry providers as id, label and sign-in kind only. No URL, no key.
  • Page. Model setup builds the provider select and its help text from that field. With no list, an empty one or a failed read it shows no select and says the providers could not be read.

No new bus verb, refusal code, grant, role, schema or config format. In packages/bus/src only proxy-page.mjs changes.

Tests

  • New: packages/bus/tests/proxy-page-providers.test.mjs, packages/model-proxy/tests/providers.test.mjs. An architecture test holds that no provider id, sign-in host or key base URL is written out in client.mjs, proxy-page.mjs or display.js. Browser tests hold that the select equals status.providers.
  • Lane gate on 9b06c5538: 250 files, 2419 pass, 0 fail, 9 skip.
  • Lead check in a clean environment on the rebased tip 29daa4c4b: 29daa4c4b on base ebfbdb13a: 493 files, 5145 pass, 1 fail, 42 skip. The one fail is packages/conversation/tests/flows.test.mjs, which fails the same way on the base in this clean environment (Python jsonschema is not installed there). 29 of the skips are cohort.test.mjs, the same on the base.

Review

A fresh claude-opus-5-5 reviewer found two small items. The lane fixed one and recorded the other. A second fresh reviewer approved. The last commit after that only adds the providers list to one test fixture.

Rebase note

One conflict with the settings-s5c change in display.js, in the status load() function. Both sides are kept: the function returns whether it painted, and it sets the providers from the status.

Left for later

  • packages/webui/src/public/proxy.js still sends a provider by hand. No page loads it, but it is still served. Delete it.
  • A dev setup note in display.js names two providers in prose.
  • packages/model-proxy/src/ride.mjs prefers one upstream by name for the owner's default model.
  • Inside the plugin a second internal list maps families and routes. It should derive from PROVIDERS.
## What changes Settings backend slice A3 (lane settings-backend-a3): the provider list comes from the cliproxy plugin. Same three providers, same refusals. - **One list.** `packages/plugins/model-provider/cliproxy/index.mjs` exports `PROVIDERS`: id, label, sign-in kind, the sign-in host for a subscription and the base URL for the key provider. - **Readers.** The management client's `oauthStart` and the bus proxy page (names, login allow list, sign-in host check, key allow list) read it. They refuse with the same codes as before, `proxy-client-invalid` and `provider-not-allowed`. An entry that lacks what its door needs is refused before any call. - **Status.** The setup status and the accounts answer carry `providers` as id, label and sign-in kind only. No URL, no key. - **Page.** Model setup builds the provider select and its help text from that field. With no list, an empty one or a failed read it shows no select and says the providers could not be read. No new bus verb, refusal code, grant, role, schema or config format. In `packages/bus/src` only `proxy-page.mjs` changes. ## Tests - New: `packages/bus/tests/proxy-page-providers.test.mjs`, `packages/model-proxy/tests/providers.test.mjs`. An architecture test holds that no provider id, sign-in host or key base URL is written out in `client.mjs`, `proxy-page.mjs` or `display.js`. Browser tests hold that the select equals `status.providers`. - Lane gate on 9b06c5538: 250 files, 2419 pass, 0 fail, 9 skip. - Lead check in a clean environment on the rebased tip 29daa4c4b: 29daa4c4b on base ebfbdb13a: 493 files, 5145 pass, 1 fail, 42 skip. The one fail is `packages/conversation/tests/flows.test.mjs`, which fails the same way on the base in this clean environment (Python `jsonschema` is not installed there). 29 of the skips are `cohort.test.mjs`, the same on the base. ## Review A fresh claude-opus-5-5 reviewer found two small items. The lane fixed one and recorded the other. A second fresh reviewer approved. The last commit after that only adds the providers list to one test fixture. ## Rebase note One conflict with the settings-s5c change in `display.js`, in the status `load()` function. Both sides are kept: the function returns whether it painted, and it sets the providers from the status. ## Left for later - `packages/webui/src/public/proxy.js` still sends a provider by hand. No page loads it, but it is still served. Delete it. - A dev setup note in `display.js` names two providers in prose. - `packages/model-proxy/src/ride.mjs` prefers one upstream by name for the owner's default model. - Inside the plugin a second internal list maps families and routes. It should derive from `PROVIDERS`.
jason.woltje added 3 commits 2026-11-20 09:40:12 +00:00
jason.woltje merged commit 29daa4c4bf into refactor 2026-11-20 09:40:16 +00:00
Sign in to join this conversation.