Skip to content

[FEATURE]: Support multiple auth profiles per provider #16866

Closed as not planned
Closed as not planned

Description

@young5lee

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

  • I have searched existing issues and could not find the same request.
  • This is a feature request, not a bug report.
  • I am opening this issue first for design discussion before any PR.

Problem

OpenCode already has strong provider-agnostic support, but authentication still appears to be effectively single-profile per provider in normal usage.

That makes it difficult to use cases like:

  • separate personal and work credentials for the same provider
  • separate org/project credentials
  • explicit backup credentials for the same provider
  • switching between multiple legitimate accounts without rewriting config or re-authing

Proposed solution

Please support multiple named auth profiles per provider.

Example direction:

  • anthropic/personal
  • anthropic/work
  • openai/default
  • openai/team-a

Useful capabilities would be:

  • store multiple auth profiles for the same provider
  • select an active profile
  • optionally reference a profile from config / agent config
  • switch profiles from CLI or TUI
  • keep backward compatibility with the current single-auth setup

Why this belongs in OpenCode

This seems aligned with OpenCode’s provider-agnostic philosophy. It would improve flexibility for real-world usage without coupling the project to any specific provider.

It would also create a clean foundation for future resilience features such as cooldown-aware failover.

Non-goals

I am not asking for hidden quota bypassing. I am asking for explicit, user-configured auth profiles for legitimate multi-account / multi-org setups.

Additional context

A lot of users have separate personal/work credentials or multiple organization-managed credentials for the same provider. Right now that seems harder than it needs to be.

Activity

  1. added
    discussionUsed for feature requests, proposals, ideas, etc. Open discussion
    on Mar 10, 2026
  2. added
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on Mar 10, 2026
  3. github-actions commented on Mar 10, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    Please review the above issues to see if your request is already covered. If it is, consider adding a comment or reaction there rather than opening a new issue.

  4. removed
    discussionUsed for feature requests, proposals, ideas, etc. Open discussion
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on May 3, 2026
  5. github-actions commented on Jul 4, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions