[FEAT]: Multiple API keys
What would you like to see?
Is it possible to add more than one API key as a backup? If so, the following scenario applies:
Implement an automatic retry system for OpenAI API keys. If a key fails, the system will retry with another key from the list until a working key is found or notify the user if all keys fail.
🧐 Proposed Solution
When setting up a list of OpenAI API keys or other models from providers, if a user is conversing and a request is sent to the API key provider, it is possible that some keys from the list may not work or may encounter errors. In such cases, the system should automatically retry using the latest user query until it randomly finds an API key that can process the request. However, if all the API keys in the list have been tried and none are functional, the system should then notify the user.
📝 Additional Information
In case of retries, it might randomly select from all API keys, or there could be an option for users to specify the number of retries.