|
148 | 148 | } |
149 | 149 | } |
150 | 150 | }, |
151 | | - "/api/v1/provider-endpoints/{provider_id}/models": { |
| 151 | + "/api/v1/provider-endpoints/{provider_name}/models": { |
152 | 152 | "get": { |
153 | 153 | "tags": [ |
154 | 154 | "CodeGate API", |
|
159 | 159 | "operationId": "v1_list_models_by_provider", |
160 | 160 | "parameters": [ |
161 | 161 | { |
162 | | - "name": "provider_id", |
| 162 | + "name": "provider_name", |
163 | 163 | "in": "path", |
164 | 164 | "required": true, |
165 | 165 | "schema": { |
166 | 166 | "type": "string", |
167 | | - "format": "uuid", |
168 | | - "title": "Provider Id" |
| 167 | + "title": "Provider Name" |
169 | 168 | } |
170 | 169 | } |
171 | 170 | ], |
|
197 | 196 | } |
198 | 197 | } |
199 | 198 | }, |
200 | | - "/api/v1/provider-endpoints/{provider_id}": { |
| 199 | + "/api/v1/provider-endpoints/{provider_name}": { |
201 | 200 | "get": { |
202 | 201 | "tags": [ |
203 | 202 | "CodeGate API", |
204 | 203 | "Providers" |
205 | 204 | ], |
206 | 205 | "summary": "Get Provider Endpoint", |
207 | | - "description": "Get a provider endpoint by ID.", |
| 206 | + "description": "Get a provider endpoint by name.", |
208 | 207 | "operationId": "v1_get_provider_endpoint", |
209 | 208 | "parameters": [ |
210 | 209 | { |
211 | | - "name": "provider_id", |
| 210 | + "name": "provider_name", |
212 | 211 | "in": "path", |
213 | 212 | "required": true, |
214 | 213 | "schema": { |
215 | 214 | "type": "string", |
216 | | - "format": "uuid", |
217 | | - "title": "Provider Id" |
| 215 | + "title": "Provider Name" |
218 | 216 | } |
219 | 217 | } |
220 | 218 | ], |
|
247 | 245 | "Providers" |
248 | 246 | ], |
249 | 247 | "summary": "Update Provider Endpoint", |
250 | | - "description": "Update a provider endpoint by ID.", |
| 248 | + "description": "Update a provider endpoint by name.", |
251 | 249 | "operationId": "v1_update_provider_endpoint", |
252 | 250 | "parameters": [ |
253 | 251 | { |
254 | | - "name": "provider_id", |
| 252 | + "name": "provider_name", |
255 | 253 | "in": "path", |
256 | 254 | "required": true, |
257 | 255 | "schema": { |
258 | 256 | "type": "string", |
259 | | - "format": "uuid", |
260 | | - "title": "Provider Id" |
| 257 | + "title": "Provider Name" |
261 | 258 | } |
262 | 259 | } |
263 | 260 | ], |
|
300 | 297 | "Providers" |
301 | 298 | ], |
302 | 299 | "summary": "Delete Provider Endpoint", |
303 | | - "description": "Delete a provider endpoint by id.", |
| 300 | + "description": "Delete a provider endpoint by name.", |
304 | 301 | "operationId": "v1_delete_provider_endpoint", |
305 | 302 | "parameters": [ |
306 | 303 | { |
307 | | - "name": "provider_id", |
| 304 | + "name": "provider_name", |
308 | 305 | "in": "path", |
309 | 306 | "required": true, |
310 | 307 | "schema": { |
311 | 308 | "type": "string", |
312 | | - "format": "uuid", |
313 | | - "title": "Provider Id" |
| 309 | + "title": "Provider Name" |
314 | 310 | } |
315 | 311 | } |
316 | 312 | ], |
|
336 | 332 | } |
337 | 333 | } |
338 | 334 | }, |
339 | | - "/api/v1/provider-endpoints/{provider_id}/auth-material": { |
| 335 | + "/api/v1/provider-endpoints/{provider_name}/auth-material": { |
340 | 336 | "put": { |
341 | 337 | "tags": [ |
342 | 338 | "CodeGate API", |
|
347 | 343 | "operationId": "v1_configure_auth_material", |
348 | 344 | "parameters": [ |
349 | 345 | { |
350 | | - "name": "provider_id", |
| 346 | + "name": "provider_name", |
351 | 347 | "in": "path", |
352 | 348 | "required": true, |
353 | 349 | "schema": { |
354 | 350 | "type": "string", |
355 | | - "format": "uuid", |
356 | | - "title": "Provider Id" |
| 351 | + "title": "Provider Name" |
357 | 352 | } |
358 | 353 | } |
359 | 354 | ], |
|
391 | 386 | "Workspaces" |
392 | 387 | ], |
393 | 388 | "summary": "List Workspaces", |
394 | | - "description": "List all workspaces.", |
| 389 | + "description": "List all workspaces.\n\nArgs:\n provider_name (Optional[str]): Filter workspaces by provider name. If provided,\n will return workspaces where models from the specified provider (e.g., OpenAI,\n Anthropic) have been used in workspace muxing rules.\n\nReturns:\n ListWorkspacesResponse: A response object containing the list of workspaces.", |
395 | 390 | "operationId": "v1_list_workspaces", |
| 391 | + "parameters": [ |
| 392 | + { |
| 393 | + "name": "provider_name", |
| 394 | + "in": "query", |
| 395 | + "required": false, |
| 396 | + "schema": { |
| 397 | + "anyOf": [ |
| 398 | + { |
| 399 | + "type": "string" |
| 400 | + }, |
| 401 | + { |
| 402 | + "type": "null" |
| 403 | + } |
| 404 | + ], |
| 405 | + "title": "Provider Name" |
| 406 | + } |
| 407 | + } |
| 408 | + ], |
396 | 409 | "responses": { |
397 | 410 | "200": { |
398 | 411 | "description": "Successful Response", |
|
403 | 416 | } |
404 | 417 | } |
405 | 418 | } |
| 419 | + }, |
| 420 | + "422": { |
| 421 | + "description": "Validation Error", |
| 422 | + "content": { |
| 423 | + "application/json": { |
| 424 | + "schema": { |
| 425 | + "$ref": "#/components/schemas/HTTPValidationError" |
| 426 | + } |
| 427 | + } |
| 428 | + } |
406 | 429 | } |
407 | 430 | } |
408 | 431 | }, |
|
415 | 438 | "description": "Create a new workspace.", |
416 | 439 | "operationId": "v1_create_workspace", |
417 | 440 | "requestBody": { |
| 441 | + "required": true, |
418 | 442 | "content": { |
419 | 443 | "application/json": { |
420 | 444 | "schema": { |
421 | 445 | "$ref": "#/components/schemas/FullWorkspace-Input" |
422 | 446 | } |
423 | 447 | } |
424 | | - }, |
425 | | - "required": true |
| 448 | + } |
426 | 449 | }, |
427 | 450 | "responses": { |
428 | 451 | "201": { |
|
552 | 575 | } |
553 | 576 | }, |
554 | 577 | "responses": { |
555 | | - "201": { |
| 578 | + "200": { |
556 | 579 | "description": "Successful Response", |
557 | 580 | "content": { |
558 | 581 | "application/json": { |
|
613 | 636 | } |
614 | 637 | } |
615 | 638 | } |
| 639 | + }, |
| 640 | + "get": { |
| 641 | + "tags": [ |
| 642 | + "CodeGate API", |
| 643 | + "Workspaces" |
| 644 | + ], |
| 645 | + "summary": "Get Workspace By Name", |
| 646 | + "description": "List workspaces by provider ID.", |
| 647 | + "operationId": "v1_get_workspace_by_name", |
| 648 | + "parameters": [ |
| 649 | + { |
| 650 | + "name": "workspace_name", |
| 651 | + "in": "path", |
| 652 | + "required": true, |
| 653 | + "schema": { |
| 654 | + "type": "string", |
| 655 | + "title": "Workspace Name" |
| 656 | + } |
| 657 | + } |
| 658 | + ], |
| 659 | + "responses": { |
| 660 | + "200": { |
| 661 | + "description": "Successful Response", |
| 662 | + "content": { |
| 663 | + "application/json": { |
| 664 | + "schema": { |
| 665 | + "$ref": "#/components/schemas/FullWorkspace-Output" |
| 666 | + } |
| 667 | + } |
| 668 | + } |
| 669 | + }, |
| 670 | + "422": { |
| 671 | + "description": "Validation Error", |
| 672 | + "content": { |
| 673 | + "application/json": { |
| 674 | + "schema": { |
| 675 | + "$ref": "#/components/schemas/HTTPValidationError" |
| 676 | + } |
| 677 | + } |
| 678 | + } |
| 679 | + } |
| 680 | + } |
616 | 681 | } |
617 | 682 | }, |
618 | 683 | "/api/v1/workspaces/archive": { |
|
1195 | 1260 | } |
1196 | 1261 | } |
1197 | 1262 | }, |
1198 | | - "/api/v1/workspaces/{provider_id}": { |
1199 | | - "get": { |
1200 | | - "tags": [ |
1201 | | - "CodeGate API", |
1202 | | - "Workspaces" |
1203 | | - ], |
1204 | | - "summary": "List Workspaces By Provider", |
1205 | | - "description": "List workspaces by provider ID.", |
1206 | | - "operationId": "v1_list_workspaces_by_provider", |
1207 | | - "parameters": [ |
1208 | | - { |
1209 | | - "name": "provider_id", |
1210 | | - "in": "path", |
1211 | | - "required": true, |
1212 | | - "schema": { |
1213 | | - "type": "string", |
1214 | | - "format": "uuid", |
1215 | | - "title": "Provider Id" |
1216 | | - } |
1217 | | - } |
1218 | | - ], |
1219 | | - "responses": { |
1220 | | - "200": { |
1221 | | - "description": "Successful Response", |
1222 | | - "content": { |
1223 | | - "application/json": { |
1224 | | - "schema": { |
1225 | | - "type": "array", |
1226 | | - "items": { |
1227 | | - "$ref": "#/components/schemas/WorkspaceWithModel" |
1228 | | - }, |
1229 | | - "title": "Response V1 List Workspaces By Provider" |
1230 | | - } |
1231 | | - } |
1232 | | - } |
1233 | | - }, |
1234 | | - "422": { |
1235 | | - "description": "Validation Error", |
1236 | | - "content": { |
1237 | | - "application/json": { |
1238 | | - "schema": { |
1239 | | - "$ref": "#/components/schemas/HTTPValidationError" |
1240 | | - } |
1241 | | - } |
1242 | | - } |
1243 | | - } |
1244 | | - } |
1245 | | - } |
1246 | | - }, |
1247 | 1263 | "/api/v1/alerts_notification": { |
1248 | 1264 | "get": { |
1249 | 1265 | "tags": [ |
|
2136 | 2152 | "type": "string", |
2137 | 2153 | "title": "Name" |
2138 | 2154 | }, |
2139 | | - "provider_id": { |
2140 | | - "type": "string", |
2141 | | - "title": "Provider Id" |
| 2155 | + "provider_type": { |
| 2156 | + "$ref": "#/components/schemas/ProviderType" |
2142 | 2157 | }, |
2143 | 2158 | "provider_name": { |
2144 | 2159 | "type": "string", |
|
2148 | 2163 | "type": "object", |
2149 | 2164 | "required": [ |
2150 | 2165 | "name", |
2151 | | - "provider_id", |
| 2166 | + "provider_type", |
2152 | 2167 | "provider_name" |
2153 | 2168 | ], |
2154 | 2169 | "title": "ModelByProvider", |
|
2168 | 2183 | "MuxRule": { |
2169 | 2184 | "properties": { |
2170 | 2185 | "provider_name": { |
2171 | | - "anyOf": [ |
2172 | | - { |
2173 | | - "type": "string" |
2174 | | - }, |
2175 | | - { |
2176 | | - "type": "null" |
2177 | | - } |
2178 | | - ], |
| 2186 | + "type": "string", |
2179 | 2187 | "title": "Provider Name" |
2180 | 2188 | }, |
2181 | | - "provider_id": { |
2182 | | - "type": "string", |
2183 | | - "title": "Provider Id" |
| 2189 | + "provider_type": { |
| 2190 | + "$ref": "#/components/schemas/ProviderType" |
2184 | 2191 | }, |
2185 | 2192 | "model": { |
2186 | 2193 | "type": "string", |
|
2203 | 2210 | }, |
2204 | 2211 | "type": "object", |
2205 | 2212 | "required": [ |
2206 | | - "provider_id", |
| 2213 | + "provider_name", |
| 2214 | + "provider_type", |
2207 | 2215 | "model", |
2208 | 2216 | "matcher_type" |
2209 | 2217 | ], |
|
2565 | 2573 | "muxing_rules" |
2566 | 2574 | ], |
2567 | 2575 | "title": "WorkspaceConfig" |
2568 | | - }, |
2569 | | - "WorkspaceWithModel": { |
2570 | | - "properties": { |
2571 | | - "id": { |
2572 | | - "type": "string", |
2573 | | - "title": "Id" |
2574 | | - }, |
2575 | | - "name": { |
2576 | | - "type": "string", |
2577 | | - "pattern": "^[a-zA-Z0-9_-]+$", |
2578 | | - "title": "Name" |
2579 | | - }, |
2580 | | - "provider_model_name": { |
2581 | | - "type": "string", |
2582 | | - "title": "Provider Model Name" |
2583 | | - } |
2584 | | - }, |
2585 | | - "type": "object", |
2586 | | - "required": [ |
2587 | | - "id", |
2588 | | - "name", |
2589 | | - "provider_model_name" |
2590 | | - ], |
2591 | | - "title": "WorkspaceWithModel", |
2592 | | - "description": "Returns a workspace ID with model name" |
2593 | 2576 | } |
2594 | 2577 | } |
2595 | 2578 | } |
|
0 commit comments