Skip to content

[FEATURE] Add Multi-Account Support and Round Robin Request Method #106

@shahid0

Description

@shahid0

Feature Description
Add support for configuring multiple accounts (OpenAI API keys/users) in the authentication backend. Implement a round-robin method so that incoming API requests are distributed evenly across all configured accounts.

Use Case
This feature will allow users to:

  • Load-balance requests to OpenAI APIs across several accounts
  • Reduce rate-limiting issues by spreading requests
  • Use multiple API keys for increased throughput

Proposed Implementation

  • Extend configuration to accept an array/list of API credentials/accounts.
  • Refactor the request dispatch logic to rotate through available accounts using a round-robin algorithm.
  • Ensure account selection is thread-safe (if applicable to the platform).
  • Optionally allow prioritizing or weighting accounts if desired.

Compliance Consideration

  • This feature is for personal development use
  • This feature does not violate or circumvent OpenAI's Terms of Service
  • This feature is not intended for commercial resale or multi-user access

Alternatives Considered

  • Manually switching out API keys
  • Simple failover without true load balancing

Additional Context
Would provide more resilient and efficient API utilization, especially under high-load scenarios.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions