CodeAssist icon indicating copy to clipboard operation
CodeAssist copied to clipboard

API key ai

Open kercik777 opened this issue 1 month ago • 2 comments

Hello! 👋

The app is absolutely amazing! Thank you so much for your hard work! ❤️

I have a small feature request regarding API key management. It would be great if you could add the ability to save multiple API keys for each provider and automatically switch between them whenever the current key reaches its usage limit.

For example, in Custom Mode, I can add an API key, but its free usage quota is quite limited. I would love to be able to add 10, 50, or even more API keys and use them as backups. When the current key runs out of quota, the app should automatically switch to the next available key so that I don't have to change keys manually every time.

I would also love to see this feature supported not only in Custom Mode but also for other providers, such as Claude, OpenAI, Google Gemini, OpenRouter, and any other providers supported by the app.

Here is how I envision this feature working:

  • The ability to add and store multiple API keys for each provider.
  • The ability to add as many keys as needed, such as 10, 50, or more, without arbitrary limits imposed by the app.
  • Automatically switch to the next available key when the current one runs out of quota, exceeds its usage limit, or reaches its rate limit (HTTP 429).
  • If a key is temporarily unavailable due to rate limiting, the app should retry it later or switch to another available key.
  • If all keys have reached their limits, the app should notify the user.
  • Ideally, all API keys should be saved permanently so that they remain available after restarting the app and don't need to be added again.

Ideally, I would like the app to manage the API key rotation automatically and use the next available key without interrupting the AI workflow or requiring any manual switching.

This feature would make it possible to use AI for much longer, especially when working with free models and providers that have limited usage quotas.

Thank you very much for considering this feature request! 🙏

kercik777 avatar Oct 15 '26 12:10 kercik777

Thanks a lot, I've already seen the update, and it's just awesome ❤️

kercik777 avatar Oct 17 '26 17:10 kercik777

Available since 3.30.0: each provider, including the custom gateway, takes any number of backup keys (Add backup key under the provider's key). When a key hits a rate, quota or plan limit or is rejected, the request moves to the next key, and the first key is used again once its limit resets.

tyron12233 avatar Nov 05 '26 18:11 tyron12233