mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
Frontend for provider key policies (backend in #23751). ## Changes **Admin provider form**: Three policy toggles (central API key, user API keys, central fallback) with cross-field validation and conditional visibility. Form resets properly after save. **User settings page**: New `/settings/providers` route for personal API key management. Conditional sidebar item (visible only when providers allow user keys). Status badges, masked key input, save/remove actions with confirmation. Read-only model list per provider. Gated behind `agents` experiment flag. **Model selector**: Distinguishes user-fixable (`user_api_key_required`) from admin-fixable (`missing_api_key`) empty states. Links to `/settings/providers` when user action is needed. Applied to both chat detail and agent create flows. **API client**: Query/mutation hooks for user provider configs. Cache invalidation across provider configs and model catalog.