mirror of
https://github.com/coder/coder.git
synced 2026-09-22 05:05:20 +08:00
feat: add allow-byok option for ai-gateway (#24274)
## Summary Adds `--ai-gateway-allow-byok` deployment option to control whether users can use Bring Your Own Key (BYOK) mode with AI Gateway. When disabled (`--ai-gateway-allow-byok=false`), BYOK requests are rejected with a 403 and a message directing the admin to enable the flag. Centralized key authentication works regardless of this setting. Defaults to `true` (BYOK allowed). --------- Co-authored-by: Danny Kopping <danny@coder.com>
This commit is contained in:
co-authored by
Danny Kopping
parent
dd7397b42e
commit
dd73ea54bd
@@ -66,6 +66,16 @@ while allowing individual users to bring their own.
|
||||
|
||||
See individual client pages for configuration details.
|
||||
|
||||
### Enabling or disabling BYOK
|
||||
|
||||
BYOK is enabled by default. Administrators can disable it using `--aibridge-allow-byok=false` or `CODER_AIBRIDGE_ALLOW_BYOK=false`:
|
||||
|
||||
```sh
|
||||
coder server --aibridge-allow-byok=false
|
||||
```
|
||||
|
||||
When disabled, BYOK requests are rejected with a `403 Forbidden` response and only centralized key authentication is permitted.
|
||||
|
||||
## Compatibility
|
||||
|
||||
The table below shows tested AI clients and their compatibility with AI Gateway.
|
||||
|
||||
Reference in New Issue
Block a user