Skip to content

Commit 8d0432d

Browse files
Update OpenAPI to version generated from ref 304d243 (#805)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent 304d243 commit 8d0432d

File tree

1 file changed

+96
-78
lines changed

1 file changed

+96
-78
lines changed

api/openapi.json

+96-78
Original file line numberDiff line numberDiff line change
@@ -121,22 +121,50 @@
121121
}
122122
}
123123
},
124-
"/api/v1/provider-endpoints/{provider_id}": {
124+
"/api/v1/provider-endpoints/models": {
125125
"get": {
126126
"tags": [
127127
"CodeGate API",
128128
"Providers"
129129
],
130-
"summary": "Get Provider Endpoint",
131-
"description": "Get a provider endpoint by ID.",
132-
"operationId": "v1_get_provider_endpoint",
130+
"summary": "List All Models For All Providers",
131+
"description": "List all models for all providers.",
132+
"operationId": "v1_list_all_models_for_all_providers",
133+
"responses": {
134+
"200": {
135+
"description": "Successful Response",
136+
"content": {
137+
"application/json": {
138+
"schema": {
139+
"items": {
140+
"$ref": "#/components/schemas/ModelByProvider"
141+
},
142+
"type": "array",
143+
"title": "Response V1 List All Models For All Providers"
144+
}
145+
}
146+
}
147+
}
148+
}
149+
}
150+
},
151+
"/api/v1/provider-endpoints/{provider_id}/models": {
152+
"get": {
153+
"tags": [
154+
"CodeGate API",
155+
"Providers"
156+
],
157+
"summary": "List Models By Provider",
158+
"description": "List models by provider.",
159+
"operationId": "v1_list_models_by_provider",
133160
"parameters": [
134161
{
135162
"name": "provider_id",
136163
"in": "path",
137164
"required": true,
138165
"schema": {
139-
"type": "integer",
166+
"type": "string",
167+
"format": "uuid",
140168
"title": "Provider Id"
141169
}
142170
}
@@ -147,7 +175,11 @@
147175
"content": {
148176
"application/json": {
149177
"schema": {
150-
"$ref": "#/components/schemas/ProviderEndpoint"
178+
"type": "array",
179+
"items": {
180+
"$ref": "#/components/schemas/ModelByProvider"
181+
},
182+
"title": "Response V1 List Models By Provider"
151183
}
152184
}
153185
}
@@ -163,36 +195,29 @@
163195
}
164196
}
165197
}
166-
},
167-
"put": {
198+
}
199+
},
200+
"/api/v1/provider-endpoints/{provider_id}": {
201+
"get": {
168202
"tags": [
169203
"CodeGate API",
170204
"Providers"
171205
],
172-
"summary": "Update Provider Endpoint",
173-
"description": "Update a provider endpoint by ID.",
174-
"operationId": "v1_update_provider_endpoint",
206+
"summary": "Get Provider Endpoint",
207+
"description": "Get a provider endpoint by ID.",
208+
"operationId": "v1_get_provider_endpoint",
175209
"parameters": [
176210
{
177211
"name": "provider_id",
178212
"in": "path",
179213
"required": true,
180214
"schema": {
181-
"type": "integer",
215+
"type": "string",
216+
"format": "uuid",
182217
"title": "Provider Id"
183218
}
184219
}
185220
],
186-
"requestBody": {
187-
"required": true,
188-
"content": {
189-
"application/json": {
190-
"schema": {
191-
"$ref": "#/components/schemas/ProviderEndpoint"
192-
}
193-
}
194-
}
195-
},
196221
"responses": {
197222
"200": {
198223
"description": "Successful Response",
@@ -216,31 +241,44 @@
216241
}
217242
}
218243
},
219-
"delete": {
244+
"put": {
220245
"tags": [
221246
"CodeGate API",
222247
"Providers"
223248
],
224-
"summary": "Delete Provider Endpoint",
225-
"description": "Delete a provider endpoint by id.",
226-
"operationId": "v1_delete_provider_endpoint",
249+
"summary": "Update Provider Endpoint",
250+
"description": "Update a provider endpoint by ID.",
251+
"operationId": "v1_update_provider_endpoint",
227252
"parameters": [
228253
{
229254
"name": "provider_id",
230255
"in": "path",
231256
"required": true,
232257
"schema": {
233-
"type": "integer",
258+
"type": "string",
259+
"format": "uuid",
234260
"title": "Provider Id"
235261
}
236262
}
237263
],
264+
"requestBody": {
265+
"required": true,
266+
"content": {
267+
"application/json": {
268+
"schema": {
269+
"$ref": "#/components/schemas/ProviderEndpoint"
270+
}
271+
}
272+
}
273+
},
238274
"responses": {
239275
"200": {
240276
"description": "Successful Response",
241277
"content": {
242278
"application/json": {
243-
"schema": {}
279+
"schema": {
280+
"$ref": "#/components/schemas/ProviderEndpoint"
281+
}
244282
}
245283
}
246284
},
@@ -255,25 +293,24 @@
255293
}
256294
}
257295
}
258-
}
259-
},
260-
"/api/v1/provider-endpoints/{provider_name}/models": {
261-
"get": {
296+
},
297+
"delete": {
262298
"tags": [
263299
"CodeGate API",
264300
"Providers"
265301
],
266-
"summary": "List Models By Provider",
267-
"description": "List models by provider.",
268-
"operationId": "v1_list_models_by_provider",
302+
"summary": "Delete Provider Endpoint",
303+
"description": "Delete a provider endpoint by id.",
304+
"operationId": "v1_delete_provider_endpoint",
269305
"parameters": [
270306
{
271-
"name": "provider_name",
307+
"name": "provider_id",
272308
"in": "path",
273309
"required": true,
274310
"schema": {
275311
"type": "string",
276-
"title": "Provider Name"
312+
"format": "uuid",
313+
"title": "Provider Id"
277314
}
278315
}
279316
],
@@ -282,13 +319,7 @@
282319
"description": "Successful Response",
283320
"content": {
284321
"application/json": {
285-
"schema": {
286-
"type": "array",
287-
"items": {
288-
"$ref": "#/components/schemas/ModelByProvider"
289-
},
290-
"title": "Response V1 List Models By Provider"
291-
}
322+
"schema": {}
292323
}
293324
}
294325
},
@@ -305,33 +336,6 @@
305336
}
306337
}
307338
},
308-
"/api/v1/provider-endpoints/models": {
309-
"get": {
310-
"tags": [
311-
"CodeGate API",
312-
"Providers"
313-
],
314-
"summary": "List All Models For All Providers",
315-
"description": "List all models for all providers.",
316-
"operationId": "v1_list_all_models_for_all_providers",
317-
"responses": {
318-
"200": {
319-
"description": "Successful Response",
320-
"content": {
321-
"application/json": {
322-
"schema": {
323-
"items": {
324-
"$ref": "#/components/schemas/ModelByProvider"
325-
},
326-
"type": "array",
327-
"title": "Response V1 List All Models For All Providers"
328-
}
329-
}
330-
}
331-
}
332-
}
333-
}
334-
},
335339
"/api/v1/workspaces": {
336340
"get": {
337341
"tags": [
@@ -1340,15 +1344,20 @@
13401344
"type": "string",
13411345
"title": "Name"
13421346
},
1343-
"provider": {
1347+
"provider_id": {
13441348
"type": "string",
1345-
"title": "Provider"
1349+
"title": "Provider Id"
1350+
},
1351+
"provider_name": {
1352+
"type": "string",
1353+
"title": "Provider Name"
13461354
}
13471355
},
13481356
"type": "object",
13491357
"required": [
13501358
"name",
1351-
"provider"
1359+
"provider_id",
1360+
"provider_name"
13521361
],
13531362
"title": "ModelByProvider",
13541363
"description": "Represents a model supported by a provider.\n\nNote that these are auto-discovered by the provider."
@@ -1410,8 +1419,16 @@
14101419
"ProviderEndpoint": {
14111420
"properties": {
14121421
"id": {
1413-
"type": "integer",
1414-
"title": "Id"
1422+
"anyOf": [
1423+
{
1424+
"type": "string"
1425+
},
1426+
{
1427+
"type": "null"
1428+
}
1429+
],
1430+
"title": "Id",
1431+
"default": ""
14151432
},
14161433
"name": {
14171434
"type": "string",
@@ -1435,7 +1452,6 @@
14351452
},
14361453
"type": "object",
14371454
"required": [
1438-
"id",
14391455
"name",
14401456
"provider_type",
14411457
"endpoint",
@@ -1449,7 +1465,9 @@
14491465
"enum": [
14501466
"openai",
14511467
"anthropic",
1452-
"vllm"
1468+
"vllm",
1469+
"ollama",
1470+
"lm_studio"
14531471
],
14541472
"title": "ProviderType",
14551473
"description": "Represents the different types of providers we support."

0 commit comments

Comments
 (0)