Uh oh!
There was an error while loading. Please reload this page.
feat: add multi-account support for providers - #9827
Conversation
Allow users to connect multiple accounts for the same provider (e.g., two OpenAI accounts or two GitHub Copilot accounts with different credentials). - Add label field to auth schema for account identification - Store aliased accounts with keys like 'openai:Work' - Aliased providers inherit models from base provider - Fix SDK caching to use separate instances per provider ID - Add UI flow for 'Add another account' when provider is connected - Pass label through OAuth and API auth flows
Thanks for your contribution! This PR doesn't have a linked issue. All PRs must reference an existing issue. Please:
See CONTRIBUTING.md for details. |
The following comment was made by an LLM, it may be inaccurate: Potential Duplicate PRs Found:
Both of these PRs appear to address similar multi-account functionality. You should review them to ensure PR #9827 doesn't duplicate existing work or if there are complementary aspects that should be coordinated. |
Summary
Allow users to connect multiple accounts for the same provider (e.g., two OpenAI accounts or two GitHub Copilot accounts with different credentials).
Changes
labelfield to auth schema for account identificationopenai:WorkHow it works
pto connect a providergithub-copilot:Work)Files changed
packages/opencode/src/auth/index.ts- Added label field and helper functionspackages/opencode/src/provider/provider.ts- Aliased provider loading + SDK cache fixpackages/opencode/src/provider/auth.ts- Label support in OAuth flowpackages/opencode/src/provider/models.ts- Schema updatespackages/opencode/src/server/routes/provider.ts- API label parameterpackages/opencode/src/cli/cmd/tui/component/dialog-provider.tsx- UI for managing accountspackages/sdk/js/src/v2/gen/*- Regenerated SDK types