Revert "chore: hide AI Gateway key management UI/CLI/API (#26879)" (#26913)

Reverting
https://github.com/coder/coder/commit/377c1309b7a42ead9cfbd864f0af8e9b6e472851
since release 2.35 was already cut:
https://github.com/coder/coder/tree/release/2.35
This commit is contained in:
Paweł Banaszewski
2026-07-02 13:45:05 +00:00
committed by GitHub
parent 332e32d42b
commit 79a74fc817
15 changed files with 240 additions and 40 deletions
-1
View File
@@ -42,7 +42,6 @@ const aiGatewayKeyHeartbeatInterval = 60 * time.Second
// @Tags Enterprise
// @Success 101
// @Router /api/v2/ai-gateway/serve [get]
// @x-apidocgen {"skip": true}
func (api *API) aiGatewayServe(rw http.ResponseWriter, r *http.Request) {
key := r.Header.Get(codersdk.AIGatewayKeyHeader)
if key == "" {
-3
View File
@@ -29,7 +29,6 @@ const nameFormatDetail = "Must be 64 characters or fewer, lowercase letters, num
// @Param request body codersdk.CreateAIGatewayKeyRequest true "Create AI Gateway key request"
// @Success 201 {object} codersdk.CreateAIGatewayKeyResponse
// @Router /api/v2/ai-gateway/keys [post]
// @x-apidocgen {"skip": true}
func (api *API) postAIGatewayKey(rw http.ResponseWriter, r *http.Request) {
var (
ctx = r.Context()
@@ -118,7 +117,6 @@ func writeKeyInsertError(ctx context.Context, rw http.ResponseWriter, err error)
// @Tags Enterprise
// @Success 200 {array} codersdk.AIGatewayKey
// @Router /api/v2/ai-gateway/keys [get]
// @x-apidocgen {"skip": true}
func (api *API) aiGatewayKeys(rw http.ResponseWriter, r *http.Request) {
ctx := r.Context()
@@ -149,7 +147,6 @@ func (api *API) aiGatewayKeys(rw http.ResponseWriter, r *http.Request) {
// @Param key path string true "Key ID" format(uuid)
// @Success 204
// @Router /api/v2/ai-gateway/keys/{key} [delete]
// @x-apidocgen {"skip": true}
func (api *API) deleteAIGatewayKey(rw http.ResponseWriter, r *http.Request) {
var (
ctx = r.Context()