coder / coder/internal

AI Gateway: support multiple API keys per provider in the UI

Open
#1,557 0 comments 0 reactions 1 assignee Claimed by @ssncferreira View on GitHub
Dominant language
No language data
Stars
3
Forks
0
PR merge metrics
No merged PRs in 30d

Description

### Description

The AI Gateway key failover feature supports up to 5 centralized API keys per provider (OpenAI and Anthropic), but the dashboard provider form only allows entering a single key. Multiple keys can currently only be configured via the API with [CreateAIProviderRequest](https://github.com/coder/coder/blob/main/codersdk/aiproviders.go#L200) and [UpdateAIProviderRequest](https://github.com/coder/coder/blob/main/codersdk/aiproviders.go#L269).

Image

This issue covers:
* Update the provider form to support adding, viewing, and removing multiple API keys.
* Only enable multi-key input for OpenAI and Anthropic provider types.
* Show a validation error when more than 5 keys are configured.
* Update `docs/ai-coder/ai-gateway/setup.md` (Dashboard section) to reflect the new multi-key UI.
* Update `docs/ai-coder/ai-gateway/providers.md` to mention dashboard support alongside the API.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.