|
121 | 121 | }
|
122 | 122 | }
|
123 | 123 | },
|
124 |
| - "/api/v1/provider-endpoints/{provider_id}": { |
| 124 | + "/api/v1/provider-endpoints/models": { |
125 | 125 | "get": {
|
126 | 126 | "tags": [
|
127 | 127 | "CodeGate API",
|
128 | 128 | "Providers"
|
129 | 129 | ],
|
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", |
133 | 160 | "parameters": [
|
134 | 161 | {
|
135 | 162 | "name": "provider_id",
|
136 | 163 | "in": "path",
|
137 | 164 | "required": true,
|
138 | 165 | "schema": {
|
139 |
| - "type": "integer", |
| 166 | + "type": "string", |
| 167 | + "format": "uuid", |
140 | 168 | "title": "Provider Id"
|
141 | 169 | }
|
142 | 170 | }
|
|
147 | 175 | "content": {
|
148 | 176 | "application/json": {
|
149 | 177 | "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" |
151 | 183 | }
|
152 | 184 | }
|
153 | 185 | }
|
|
163 | 195 | }
|
164 | 196 | }
|
165 | 197 | }
|
166 |
| - }, |
167 |
| - "put": { |
| 198 | + } |
| 199 | + }, |
| 200 | + "/api/v1/provider-endpoints/{provider_id}": { |
| 201 | + "get": { |
168 | 202 | "tags": [
|
169 | 203 | "CodeGate API",
|
170 | 204 | "Providers"
|
171 | 205 | ],
|
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", |
175 | 209 | "parameters": [
|
176 | 210 | {
|
177 | 211 | "name": "provider_id",
|
178 | 212 | "in": "path",
|
179 | 213 | "required": true,
|
180 | 214 | "schema": {
|
181 |
| - "type": "integer", |
| 215 | + "type": "string", |
| 216 | + "format": "uuid", |
182 | 217 | "title": "Provider Id"
|
183 | 218 | }
|
184 | 219 | }
|
185 | 220 | ],
|
186 |
| - "requestBody": { |
187 |
| - "required": true, |
188 |
| - "content": { |
189 |
| - "application/json": { |
190 |
| - "schema": { |
191 |
| - "$ref": "#/components/schemas/ProviderEndpoint" |
192 |
| - } |
193 |
| - } |
194 |
| - } |
195 |
| - }, |
196 | 221 | "responses": {
|
197 | 222 | "200": {
|
198 | 223 | "description": "Successful Response",
|
|
216 | 241 | }
|
217 | 242 | }
|
218 | 243 | },
|
219 |
| - "delete": { |
| 244 | + "put": { |
220 | 245 | "tags": [
|
221 | 246 | "CodeGate API",
|
222 | 247 | "Providers"
|
223 | 248 | ],
|
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", |
227 | 252 | "parameters": [
|
228 | 253 | {
|
229 | 254 | "name": "provider_id",
|
230 | 255 | "in": "path",
|
231 | 256 | "required": true,
|
232 | 257 | "schema": {
|
233 |
| - "type": "integer", |
| 258 | + "type": "string", |
| 259 | + "format": "uuid", |
234 | 260 | "title": "Provider Id"
|
235 | 261 | }
|
236 | 262 | }
|
237 | 263 | ],
|
| 264 | + "requestBody": { |
| 265 | + "required": true, |
| 266 | + "content": { |
| 267 | + "application/json": { |
| 268 | + "schema": { |
| 269 | + "$ref": "#/components/schemas/ProviderEndpoint" |
| 270 | + } |
| 271 | + } |
| 272 | + } |
| 273 | + }, |
238 | 274 | "responses": {
|
239 | 275 | "200": {
|
240 | 276 | "description": "Successful Response",
|
241 | 277 | "content": {
|
242 | 278 | "application/json": {
|
243 |
| - "schema": {} |
| 279 | + "schema": { |
| 280 | + "$ref": "#/components/schemas/ProviderEndpoint" |
| 281 | + } |
244 | 282 | }
|
245 | 283 | }
|
246 | 284 | },
|
|
255 | 293 | }
|
256 | 294 | }
|
257 | 295 | }
|
258 |
| - } |
259 |
| - }, |
260 |
| - "/api/v1/provider-endpoints/{provider_name}/models": { |
261 |
| - "get": { |
| 296 | + }, |
| 297 | + "delete": { |
262 | 298 | "tags": [
|
263 | 299 | "CodeGate API",
|
264 | 300 | "Providers"
|
265 | 301 | ],
|
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", |
269 | 305 | "parameters": [
|
270 | 306 | {
|
271 |
| - "name": "provider_name", |
| 307 | + "name": "provider_id", |
272 | 308 | "in": "path",
|
273 | 309 | "required": true,
|
274 | 310 | "schema": {
|
275 | 311 | "type": "string",
|
276 |
| - "title": "Provider Name" |
| 312 | + "format": "uuid", |
| 313 | + "title": "Provider Id" |
277 | 314 | }
|
278 | 315 | }
|
279 | 316 | ],
|
|
282 | 319 | "description": "Successful Response",
|
283 | 320 | "content": {
|
284 | 321 | "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": {} |
292 | 323 | }
|
293 | 324 | }
|
294 | 325 | },
|
|
305 | 336 | }
|
306 | 337 | }
|
307 | 338 | },
|
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 |
| - }, |
335 | 339 | "/api/v1/workspaces": {
|
336 | 340 | "get": {
|
337 | 341 | "tags": [
|
|
1340 | 1344 | "type": "string",
|
1341 | 1345 | "title": "Name"
|
1342 | 1346 | },
|
1343 |
| - "provider": { |
| 1347 | + "provider_id": { |
1344 | 1348 | "type": "string",
|
1345 |
| - "title": "Provider" |
| 1349 | + "title": "Provider Id" |
| 1350 | + }, |
| 1351 | + "provider_name": { |
| 1352 | + "type": "string", |
| 1353 | + "title": "Provider Name" |
1346 | 1354 | }
|
1347 | 1355 | },
|
1348 | 1356 | "type": "object",
|
1349 | 1357 | "required": [
|
1350 | 1358 | "name",
|
1351 |
| - "provider" |
| 1359 | + "provider_id", |
| 1360 | + "provider_name" |
1352 | 1361 | ],
|
1353 | 1362 | "title": "ModelByProvider",
|
1354 | 1363 | "description": "Represents a model supported by a provider.\n\nNote that these are auto-discovered by the provider."
|
|
1410 | 1419 | "ProviderEndpoint": {
|
1411 | 1420 | "properties": {
|
1412 | 1421 | "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": "" |
1415 | 1432 | },
|
1416 | 1433 | "name": {
|
1417 | 1434 | "type": "string",
|
|
1435 | 1452 | },
|
1436 | 1453 | "type": "object",
|
1437 | 1454 | "required": [
|
1438 |
| - "id", |
1439 | 1455 | "name",
|
1440 | 1456 | "provider_type",
|
1441 | 1457 | "endpoint",
|
|
1449 | 1465 | "enum": [
|
1450 | 1466 | "openai",
|
1451 | 1467 | "anthropic",
|
1452 |
| - "vllm" |
| 1468 | + "vllm", |
| 1469 | + "ollama", |
| 1470 | + "lm_studio" |
1453 | 1471 | ],
|
1454 | 1472 | "title": "ProviderType",
|
1455 | 1473 | "description": "Represents the different types of providers we support."
|
|
0 commit comments