Skip to content

Add built-in multi-account round-robin switching for ChatGPT OAuth #114

@chindris-mihai-alexandru

Description

Problem

The plugin currently authenticates a single ChatGPT OAuth account at a time. When limits are hit, there is no built-in account pool rotation similar to antigravity-based plugins.

Proposal

  • Persist a local account pool (~/.opencode/openai-codex-accounts.json)
  • Support account selection strategies:
    • round-robin (default)
    • sticky
  • On 429/usage-limit responses, mark account cooldown from response headers and rotate to next available account
  • Keep token refresh per selected account

Implementation

I implemented this in PR #113:

Includes tests, docs updates, and installer cleanup support for the account-pool file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions