Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion codersdk/aibridge.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Expand Down
16 changes: 9 additions & 7 deletions site/src/api/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<string[]>(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<string[]>(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<TypesGen.AIBridgeListSessionsResponse>(url);
return response.data;
Expand All @@ -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 =
Expand Down Expand Up @@ -3203,7 +3203,7 @@ class ApiMethods {

getAIGatewayKeys = async (): Promise<TypesGen.AIGatewayKey[]> => {
const response = await this.axios.get<TypesGen.AIGatewayKey[]>(
"/api/v2/aibridge/keys",
"/api/v2/ai-gateway/keys",
);
return response.data;
};
Expand All @@ -3212,14 +3212,16 @@ class ApiMethods {
req: TypesGen.CreateAIGatewayKeyRequest,
): Promise<TypesGen.CreateAIGatewayKeyResponse> => {
const response = await this.axios.post<TypesGen.CreateAIGatewayKeyResponse>(
"/api/v2/aibridge/keys",
"/api/v2/ai-gateway/keys",
req,
);
return response.data;
};

deleteAIGatewayKey = async (id: string): Promise<void> => {
await this.axios.delete(`/api/v2/aibridge/keys/${encodeURIComponent(id)}`);
await this.axios.delete(
`/api/v2/ai-gateway/keys/${encodeURIComponent(id)}`,
);
};
}

Expand Down
2 changes: 1 addition & 1 deletion site/src/api/typesGenerated.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading