From e7a9e4c8b50d7f3d4f7533abd3010ae571e29e3c Mon Sep 17 00:00:00 2001 From: Susana Cardoso Ferreira Date: Mon, 22 Jun 2026 12:25:17 +0000 Subject: [PATCH] feat(site): update API URLs from /aibridge to /ai-gateway --- codersdk/aibridge.go | 2 +- site/src/api/api.ts | 16 +++++++++------- site/src/api/typesGenerated.ts | 2 +- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/codersdk/aibridge.go b/codersdk/aibridge.go index a826b753d761f..fd6adb1859af8 100644 --- a/codersdk/aibridge.go +++ b/codersdk/aibridge.go @@ -40,7 +40,7 @@ type AIBridgeListSessionsResponse struct { } // AIBridgeSessionThreadsResponse is the response for GET -// /api/v2/aibridge/sessions/{session_id} which returns a single +// /api/v2/ai-gateway/sessions/{session_id} which returns a single // session with fully expanded threads. type AIBridgeSessionThreadsResponse struct { ID string `json:"id"` diff --git a/site/src/api/api.ts b/site/src/api/api.ts index 32fffce83a7f0..455478dadf881 100644 --- a/site/src/api/api.ts +++ b/site/src/api/api.ts @@ -3127,21 +3127,21 @@ class ApiMethods { }; getAIBridgeModels = async (options: SearchParamOptions) => { - const url = getURLWithSearchParams("/api/v2/aibridge/models", options); + const url = getURLWithSearchParams("/api/v2/ai-gateway/models", options); const response = await this.axios.get(url); return response.data; }; getAIBridgeClients = async (options: SearchParamOptions) => { - const url = getURLWithSearchParams("/api/v2/aibridge/clients", options); + const url = getURLWithSearchParams("/api/v2/ai-gateway/clients", options); const response = await this.axios.get(url); return response.data; }; getAIBridgeSessionList = async (options: SearchParamOptions) => { - const url = getURLWithSearchParams("/api/v2/aibridge/sessions", options); + const url = getURLWithSearchParams("/api/v2/ai-gateway/sessions", options); const response = await this.axios.get(url); return response.data; @@ -3152,7 +3152,7 @@ class ApiMethods { options?: { after_id?: string; before_id?: string; limit?: number }, ) => { const url = getURLWithSearchParams( - `/api/v2/aibridge/sessions/${sessionId}`, + `/api/v2/ai-gateway/sessions/${sessionId}`, options, ); const response = @@ -3203,7 +3203,7 @@ class ApiMethods { getAIGatewayKeys = async (): Promise => { const response = await this.axios.get( - "/api/v2/aibridge/keys", + "/api/v2/ai-gateway/keys", ); return response.data; }; @@ -3212,14 +3212,16 @@ class ApiMethods { req: TypesGen.CreateAIGatewayKeyRequest, ): Promise => { const response = await this.axios.post( - "/api/v2/aibridge/keys", + "/api/v2/ai-gateway/keys", req, ); return response.data; }; deleteAIGatewayKey = async (id: string): Promise => { - await this.axios.delete(`/api/v2/aibridge/keys/${encodeURIComponent(id)}`); + await this.axios.delete( + `/api/v2/ai-gateway/keys/${encodeURIComponent(id)}`, + ); }; } diff --git a/site/src/api/typesGenerated.ts b/site/src/api/typesGenerated.ts index 9bbc885540862..551e422a46b73 100644 --- a/site/src/api/typesGenerated.ts +++ b/site/src/api/typesGenerated.ts @@ -146,7 +146,7 @@ export interface AIBridgeSession { // From codersdk/aibridge.go /** * AIBridgeSessionThreadsResponse is the response for GET - * /api/v2/aibridge/sessions/{session_id} which returns a single + * /api/v2/ai-gateway/sessions/{session_id} which returns a single * session with fully expanded threads. */ export interface AIBridgeSessionThreadsResponse {