feat(macos): load provider catalog during AI onboarding#101132
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3678b6a607
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| provider: Type.Optional(Type.String()), | ||
| /** Manual step only: the pasted API key; masked by clients, never echoed. */ | ||
| /** Manual step only: opaque provider-auth choice returned by detection. */ | ||
| authChoice: Type.Optional(Type.String()), |
There was a problem hiding this comment.
Keep accepting legacy setup provider payloads
With provider replaced by authChoice, pre-update macOS clients that still post {kind: "api-key", provider: "openai", apiKey: ...} hit this schema with additionalProperties: false and are rejected before src/gateway/server-methods/crestodian.ts can run. Gateway/app updates can be staggered, and the prior app did send provider, so keep provider as a deprecated optional alias (mapping the old anthropic/openai/google values to the new choice ids) instead of making this an incompatible protocol change.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f6a3f92939
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| "provider": "github-copilot", | ||
| "method": "device", | ||
| "choiceId": "github-copilot", | ||
| "appGuidedSecret": true, |
There was a problem hiding this comment.
Update Copilot provider-auth contract fixture
When this flag is added, normalizeProviderAuthChoices preserves appGuidedSecret, but src/plugins/contracts/registry.contract.test.ts still uses toEqual for the GitHub Copilot providerAuthChoices object without this field. That contract test will fail as soon as the plugin registry is loaded, so update the fixture or loosen the assertion with the manifest change.
Useful? React with 👍 / 👎.
|
Land-ready proof for
Known proof gap: no new screenshot artifact; native compilation/tests and the source-blind catalog response cover this data-driven control change. |
|
Merged via squash.
|
…no starterModel before #101132)
Closes #101019
What Problem This Solves
macOS AI onboarding offered only three hardcoded API-key providers even though OpenClaw ships many more text-inference providers. Users of another supported provider had to leave the app-guided flow and configure it elsewhere.
Why This Change Was Made
The Gateway now derives the manual provider list from trusted installed plugin manifests that explicitly opt into one-secret app-guided setup. The macOS app renders that catalog dynamically, sends the opaque auth choice back, and the Gateway loads only the selected plugin, stages its credential/config, runs a real model check, then persists only after success.
The previous hardcoded
providerrequest field was introduced after the latest release tag and exists in no shipped tag, so this keeps one canonical protocol path instead of adding an unshipped compatibility alias.User Impact
macOS onboarding now offers the supported provider catalog instead of Claude, OpenAI, and Gemini only. The current bundled catalog exposes 59 API-key/token choices, including provider-owned token and dynamic local-provider setup, while older Gateways still retain automatic candidate onboarding and show clear update guidance for the unavailable catalog.
Evidence
tbx_01kwwdatrdyg416c9hrw53vr3p:pnpm check:changedpassed all selected typecheck, core/extension lint, app, import-cycle, database, and packaging lanes (10m59s).swift test --package-path apps/macos --filter Onboardingpassed 18 tests after a clean Swift build.