@bodhiapp/ts-client 0.1.32 → 0.1.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/openapi-typescript/openapi-schema-oai.d.ts +0 -437
- package/dist/openapi-typescript/openapi-schema-oai.ts +0 -437
- package/dist/openapi-typescript/openapi-schema.d.ts +1151 -193
- package/dist/openapi-typescript/openapi-schema.ts +1151 -193
- package/dist/types/types.gen.d.ts +739 -188
- package/dist/types/types.gen.ts +789 -177
- package/dist/types-oai/types.gen.d.ts +0 -187
- package/dist/types-oai/types.gen.ts +0 -211
- package/package.json +1 -1
|
@@ -1,71 +1,41 @@
|
|
|
1
1
|
export type AccessRequestActionResponse = {
|
|
2
|
-
/**
|
|
3
|
-
* Updated status after action
|
|
4
|
-
*/
|
|
5
2
|
status: AppAccessRequestStatus;
|
|
6
|
-
/**
|
|
7
|
-
* Flow type of the access request
|
|
8
|
-
*/
|
|
9
3
|
flow_type: FlowType;
|
|
10
4
|
/**
|
|
11
|
-
*
|
|
5
|
+
* Present for redirect flow
|
|
12
6
|
*/
|
|
13
7
|
redirect_url?: string | null;
|
|
14
8
|
};
|
|
15
9
|
export type AccessRequestReviewResponse = {
|
|
16
|
-
/**
|
|
17
|
-
* Access request ID
|
|
18
|
-
*/
|
|
19
10
|
id: string;
|
|
20
|
-
/**
|
|
21
|
-
* App client ID
|
|
22
|
-
*/
|
|
23
11
|
app_client_id: string;
|
|
24
12
|
/**
|
|
25
|
-
*
|
|
13
|
+
* From KC, if available
|
|
26
14
|
*/
|
|
27
15
|
app_name?: string | null;
|
|
28
16
|
/**
|
|
29
|
-
*
|
|
17
|
+
* From KC, if available
|
|
30
18
|
*/
|
|
31
19
|
app_description?: string | null;
|
|
32
20
|
/**
|
|
33
|
-
*
|
|
21
|
+
* One of: "redirect", "popup"
|
|
34
22
|
*/
|
|
35
23
|
flow_type: FlowType;
|
|
36
|
-
/**
|
|
37
|
-
* Current status
|
|
38
|
-
*/
|
|
39
24
|
status: AppAccessRequestStatus;
|
|
40
|
-
/**
|
|
41
|
-
* Role requested by the app
|
|
42
|
-
*/
|
|
43
25
|
requested_role: string;
|
|
44
|
-
/**
|
|
45
|
-
* Resources requested
|
|
46
|
-
*/
|
|
47
26
|
requested: RequestedResources;
|
|
48
|
-
/**
|
|
49
|
-
* MCP server information with user instances
|
|
50
|
-
*/
|
|
51
27
|
mcps_info?: Array<McpServerReviewInfo>;
|
|
52
28
|
};
|
|
53
29
|
export type AccessRequestStatusResponse = {
|
|
54
|
-
/**
|
|
55
|
-
* Access request ID
|
|
56
|
-
*/
|
|
57
30
|
id: string;
|
|
58
31
|
/**
|
|
59
|
-
*
|
|
32
|
+
* One of: "draft", "approved", "denied", "failed"
|
|
60
33
|
*/
|
|
61
34
|
status: AppAccessRequestStatus;
|
|
62
|
-
/**
|
|
63
|
-
* Role requested by the app
|
|
64
|
-
*/
|
|
65
35
|
requested_role: UserScope;
|
|
66
36
|
approved_role?: null | UserScope;
|
|
67
37
|
/**
|
|
68
|
-
*
|
|
38
|
+
* Present when user-approved with tools
|
|
69
39
|
*/
|
|
70
40
|
access_request_scope?: string | null;
|
|
71
41
|
};
|
|
@@ -79,12 +49,51 @@ export type Alias = (UserAlias & {
|
|
|
79
49
|
source: 'model';
|
|
80
50
|
}) | (ApiAlias & {
|
|
81
51
|
source: 'api';
|
|
52
|
+
}) | (ModelRouterAlias & {
|
|
53
|
+
source: 'model_router';
|
|
82
54
|
});
|
|
55
|
+
/**
|
|
56
|
+
* Facet filter query parameters for the All-Models list (`GET /bodhi/v1/models`).
|
|
57
|
+
*
|
|
58
|
+
* All facets are server-side and applied before pagination so `total` and the page
|
|
59
|
+
* reflect the filtered set. Multi-value facets accept a comma-separated list; an empty
|
|
60
|
+
* or absent value means "no filter for this facet" (all rows pass).
|
|
61
|
+
*/
|
|
62
|
+
export type AliasFilterParams = {
|
|
63
|
+
/**
|
|
64
|
+
* Alias type facet (comma-separated): `local_file`, `model_alias`, `api_model`, `fallback`.
|
|
65
|
+
*/
|
|
66
|
+
type?: string | null;
|
|
67
|
+
/**
|
|
68
|
+
* API-format facet (comma-separated), API rows only: `openai`, `responses`, `anthropic`,
|
|
69
|
+
* `gemini`, `liberty`. `anthropic` matches both anthropic and anthropic_oauth aliases.
|
|
70
|
+
*/
|
|
71
|
+
api_format?: string | null;
|
|
72
|
+
/**
|
|
73
|
+
* Minimum local-file size in bytes (inclusive). Applies to local rows with a known size;
|
|
74
|
+
* rows without a size (API/router) are not filtered out by size.
|
|
75
|
+
*/
|
|
76
|
+
size_min?: number | null;
|
|
77
|
+
/**
|
|
78
|
+
* Maximum local-file size in bytes (inclusive). See `size_min`.
|
|
79
|
+
*/
|
|
80
|
+
size_max?: number | null;
|
|
81
|
+
/**
|
|
82
|
+
* Capability facet (comma-separated), local rows only: `vision`, `tool_use`, `reasoning`.
|
|
83
|
+
* A row passes only if it has metadata with every requested capability set true.
|
|
84
|
+
*/
|
|
85
|
+
capability?: string | null;
|
|
86
|
+
/**
|
|
87
|
+
* Free-text search (case-insensitive substring) over a row's identifying fields — alias/name,
|
|
88
|
+
* repo, filename for local rows; id, name, base_url for API rows; alias for routers.
|
|
89
|
+
*/
|
|
90
|
+
search?: string | null;
|
|
91
|
+
};
|
|
83
92
|
/**
|
|
84
93
|
* Response envelope for model aliases - hides internal implementation details
|
|
85
94
|
* Uses untagged serialization - each variant has its own "source" field
|
|
86
95
|
*/
|
|
87
|
-
export type AliasResponse = UserAliasResponse | ModelAliasResponse | ApiAliasResponse;
|
|
96
|
+
export type AliasResponse = ModelRouterResponse | UserAliasResponse | ModelAliasResponse | ApiAliasResponse;
|
|
88
97
|
/**
|
|
89
98
|
* Mirrors Anthropic's `ModelInfo` schema — full model metadata returned by
|
|
90
99
|
* `GET /anthropic/v1/models` and stored alongside model IDs in `ApiAlias.models`.
|
|
@@ -104,13 +113,10 @@ export type AnthropicModel = {
|
|
|
104
113
|
capabilities?: null | AnthropicModelCapabilities;
|
|
105
114
|
max_input_tokens?: number | null;
|
|
106
115
|
max_tokens?: number | null;
|
|
107
|
-
/**
|
|
108
|
-
* Always `"model"` — included for Anthropic API compatibility.
|
|
109
|
-
*/
|
|
110
116
|
type: string;
|
|
111
117
|
};
|
|
112
118
|
/**
|
|
113
|
-
*
|
|
119
|
+
* Anthropic ModelCapabilities schema.
|
|
114
120
|
*/
|
|
115
121
|
export type AnthropicModelCapabilities = {
|
|
116
122
|
batch: CapabilitySupport;
|
|
@@ -125,6 +131,7 @@ export type AnthropicModelCapabilities = {
|
|
|
125
131
|
};
|
|
126
132
|
export type ApiAlias = {
|
|
127
133
|
id: string;
|
|
134
|
+
name: string;
|
|
128
135
|
api_format: ApiFormat;
|
|
129
136
|
base_url: string;
|
|
130
137
|
models: ApiModelVec;
|
|
@@ -141,6 +148,7 @@ export type ApiAlias = {
|
|
|
141
148
|
export type ApiAliasResponse = {
|
|
142
149
|
source: string;
|
|
143
150
|
id: string;
|
|
151
|
+
name: string;
|
|
144
152
|
api_format: ApiFormat;
|
|
145
153
|
base_url: string;
|
|
146
154
|
has_api_key: boolean;
|
|
@@ -215,7 +223,28 @@ export type ApiModelRequest = (DefaultApiModelRequest & {
|
|
|
215
223
|
* DB-storable `Vec<ApiModel>` — stored as JSON binary in SeaORM columns.
|
|
216
224
|
*/
|
|
217
225
|
export type ApiModelVec = Array<ApiModel>;
|
|
218
|
-
export type AppAccessRequestStatus = 'draft' | 'approved' | 'denied' | 'failed' | 'expired';
|
|
226
|
+
export type AppAccessRequestStatus = 'draft' | 'approved' | 'denied' | 'failed' | 'expired' | 'revoked';
|
|
227
|
+
/**
|
|
228
|
+
* One issued app token (approved access request) with its effective grant summary.
|
|
229
|
+
*/
|
|
230
|
+
export type AppAccessSummary = {
|
|
231
|
+
id: string;
|
|
232
|
+
app_client_id: string;
|
|
233
|
+
app_name?: string | null;
|
|
234
|
+
app_description?: string | null;
|
|
235
|
+
status: AppAccessRequestStatus;
|
|
236
|
+
approved_role?: null | UserScope;
|
|
237
|
+
/**
|
|
238
|
+
* Effective model access granted to this app.
|
|
239
|
+
*/
|
|
240
|
+
models: ResourceAccess;
|
|
241
|
+
/**
|
|
242
|
+
* Effective MCP access granted to this app.
|
|
243
|
+
*/
|
|
244
|
+
mcps: ResourceAccess;
|
|
245
|
+
created_at: string;
|
|
246
|
+
updated_at: string;
|
|
247
|
+
};
|
|
219
248
|
/**
|
|
220
249
|
* Application information and status
|
|
221
250
|
*/
|
|
@@ -244,13 +273,15 @@ export type AppInfo = {
|
|
|
244
273
|
* Public URL of the server
|
|
245
274
|
*/
|
|
246
275
|
url: string;
|
|
276
|
+
/**
|
|
277
|
+
* Base URL of the external reference API the frontend calls directly (configurable via
|
|
278
|
+
* `BODHI_REFERENCE_API_URL`, env-overridable for tests)
|
|
279
|
+
*/
|
|
280
|
+
reference_api_url: string;
|
|
247
281
|
};
|
|
248
282
|
export type AppRole = ResourceRole | TokenScope | UserScope;
|
|
249
283
|
export type AppStatus = 'setup' | 'ready' | 'resource_admin';
|
|
250
284
|
export type ApprovalStatus = 'approved' | 'denied';
|
|
251
|
-
/**
|
|
252
|
-
* Request for approving an app access request
|
|
253
|
-
*/
|
|
254
285
|
export type ApproveAccessRequest = {
|
|
255
286
|
/**
|
|
256
287
|
* Role to grant for the approved request (scope_user_user or scope_user_power_user)
|
|
@@ -271,31 +302,41 @@ export type ApproveUserAccessRequest = {
|
|
|
271
302
|
role: ResourceRole;
|
|
272
303
|
};
|
|
273
304
|
/**
|
|
274
|
-
* Versioned envelope for approved resources.
|
|
275
305
|
* The `version` tag is mandatory and must match the corresponding `RequestedResources` version.
|
|
276
306
|
*/
|
|
277
307
|
export type ApprovedResources = ApprovedResourcesV1 & {
|
|
278
308
|
version: '1';
|
|
279
309
|
};
|
|
310
|
+
/**
|
|
311
|
+
* What the owner granted at consent. Field names mirror `RequestedResourcesV1`
|
|
312
|
+
* (`models_list` / `models_access` / `mcps_list` / `mcps_access`) — there the
|
|
313
|
+
* values are UI-driver booleans, here they are the actual grants. `mcps` holds
|
|
314
|
+
* the by-url instance approvals; `mcps_access` is the owner-granted set beyond them.
|
|
315
|
+
*/
|
|
280
316
|
export type ApprovedResourcesV1 = {
|
|
317
|
+
models_list?: boolean;
|
|
318
|
+
models_access?: ModelGrant;
|
|
319
|
+
mcps_list?: boolean;
|
|
281
320
|
mcps?: Array<McpApproval>;
|
|
321
|
+
/**
|
|
322
|
+
* Owner-granted MCP instances beyond the by-url requests. Defaults to none
|
|
323
|
+
* (empty `Specific`) — unlike a token's all-access default.
|
|
324
|
+
*/
|
|
325
|
+
mcps_access?: McpGrant;
|
|
282
326
|
};
|
|
283
327
|
export type AuthCallbackRequest = {
|
|
284
328
|
/**
|
|
285
|
-
*
|
|
329
|
+
* Required for the success flow
|
|
286
330
|
*/
|
|
287
331
|
code?: string | null;
|
|
288
332
|
/**
|
|
289
|
-
*
|
|
333
|
+
* CSRF protection — must match the initiated request
|
|
290
334
|
*/
|
|
291
335
|
state?: string | null;
|
|
292
336
|
/**
|
|
293
337
|
* OAuth error code if authentication failed (e.g., "access_denied")
|
|
294
338
|
*/
|
|
295
339
|
error?: string | null;
|
|
296
|
-
/**
|
|
297
|
-
* Human-readable OAuth error description if authentication failed
|
|
298
|
-
*/
|
|
299
340
|
error_description?: string | null;
|
|
300
341
|
[key: string]: string | (string | null) | (string | null) | (string | null) | (string | null) | undefined;
|
|
301
342
|
};
|
|
@@ -340,9 +381,6 @@ export type BodhiErrorResponse = {
|
|
|
340
381
|
*/
|
|
341
382
|
error: BodhiError;
|
|
342
383
|
};
|
|
343
|
-
/**
|
|
344
|
-
* Whether a single capability is supported by the model.
|
|
345
|
-
*/
|
|
346
384
|
export type CapabilitySupport = {
|
|
347
385
|
supported: boolean;
|
|
348
386
|
};
|
|
@@ -359,9 +397,6 @@ export type ContextLimits = {
|
|
|
359
397
|
max_input_tokens?: number | null;
|
|
360
398
|
max_output_tokens?: number | null;
|
|
361
399
|
};
|
|
362
|
-
/**
|
|
363
|
-
* Context management capability details.
|
|
364
|
-
*/
|
|
365
400
|
export type ContextManagementCapability = {
|
|
366
401
|
clear_thinking_20251015?: null | CapabilitySupport;
|
|
367
402
|
clear_tool_uses_20250919?: null | CapabilitySupport;
|
|
@@ -370,9 +405,6 @@ export type ContextManagementCapability = {
|
|
|
370
405
|
export type CopyAliasRequest = {
|
|
371
406
|
alias: string;
|
|
372
407
|
};
|
|
373
|
-
/**
|
|
374
|
-
* Request for creating an app access request
|
|
375
|
-
*/
|
|
376
408
|
export type CreateAccessRequest = {
|
|
377
409
|
/**
|
|
378
410
|
* App client ID from Keycloak
|
|
@@ -396,17 +428,11 @@ export type CreateAccessRequest = {
|
|
|
396
428
|
requested: RequestedResources;
|
|
397
429
|
};
|
|
398
430
|
export type CreateAccessRequestResponse = {
|
|
399
|
-
/**
|
|
400
|
-
* Access request ID
|
|
401
|
-
*/
|
|
402
431
|
id: string;
|
|
403
432
|
/**
|
|
404
|
-
*
|
|
433
|
+
* Always "draft"
|
|
405
434
|
*/
|
|
406
435
|
status: AppAccessRequestStatus;
|
|
407
|
-
/**
|
|
408
|
-
* Review URL for user to approve/deny
|
|
409
|
-
*/
|
|
410
436
|
review_url: string;
|
|
411
437
|
};
|
|
412
438
|
/**
|
|
@@ -456,6 +482,11 @@ export type CreateTokenRequest = {
|
|
|
456
482
|
* Token scope defining access level
|
|
457
483
|
*/
|
|
458
484
|
scope: TokenScope;
|
|
485
|
+
/**
|
|
486
|
+
* Per-resource grants for this token. Defaults to deny (least-privilege) when
|
|
487
|
+
* omitted — specify grants to widen access.
|
|
488
|
+
*/
|
|
489
|
+
grants?: TokenGrants;
|
|
459
490
|
};
|
|
460
491
|
/**
|
|
461
492
|
* Dashboard user information from a validated dashboard session token
|
|
@@ -471,6 +502,10 @@ export type DashboardUser = {
|
|
|
471
502
|
* Shared across `openai`, `openai_responses`, `anthropic`, `anthropic_oauth`, `gemini`.
|
|
472
503
|
*/
|
|
473
504
|
export type DefaultApiModelRequest = {
|
|
505
|
+
/**
|
|
506
|
+
* User-provided descriptive name for this API model
|
|
507
|
+
*/
|
|
508
|
+
name: string;
|
|
474
509
|
/**
|
|
475
510
|
* API base URL
|
|
476
511
|
*/
|
|
@@ -561,6 +596,7 @@ export type DownloadRequest = {
|
|
|
561
596
|
total_bytes?: number | null;
|
|
562
597
|
downloaded_bytes: number;
|
|
563
598
|
started_at?: string | null;
|
|
599
|
+
archived_at?: string | null;
|
|
564
600
|
created_at: string;
|
|
565
601
|
updated_at: string;
|
|
566
602
|
};
|
|
@@ -585,6 +621,18 @@ export type EffortCapability = {
|
|
|
585
621
|
low: CapabilitySupport;
|
|
586
622
|
max: CapabilitySupport;
|
|
587
623
|
};
|
|
624
|
+
/**
|
|
625
|
+
* Per-strategy resilience config for the fallback strategy. Phase 1 persists defaults
|
|
626
|
+
* and does not yet act on them (failover/health land in later phases).
|
|
627
|
+
*/
|
|
628
|
+
export type FallbackConfig = {
|
|
629
|
+
cooldown_secs?: number;
|
|
630
|
+
/**
|
|
631
|
+
* 0 = try the whole chain.
|
|
632
|
+
*/
|
|
633
|
+
max_attempts?: number;
|
|
634
|
+
honor_retry_after?: boolean;
|
|
635
|
+
};
|
|
588
636
|
/**
|
|
589
637
|
* Request to fetch available models from provider. Discriminated on `api_format`.
|
|
590
638
|
*/
|
|
@@ -627,6 +675,12 @@ export type GeminiModel = {
|
|
|
627
675
|
thinking?: boolean | null;
|
|
628
676
|
};
|
|
629
677
|
export type JsonVec = Array<string>;
|
|
678
|
+
/**
|
|
679
|
+
* Response for GET /access-requests/apps — the caller's issued app tokens.
|
|
680
|
+
*/
|
|
681
|
+
export type ListAppAccessResponse = {
|
|
682
|
+
data: Array<AppAccessSummary>;
|
|
683
|
+
};
|
|
630
684
|
export type ListMcpServersResponse = {
|
|
631
685
|
mcp_servers: Array<McpServerResponse>;
|
|
632
686
|
};
|
|
@@ -651,6 +705,10 @@ export type LlmLibertyApiEndpoints = {
|
|
|
651
705
|
* (or `Keep` to leave existing credentials untouched on update).
|
|
652
706
|
*/
|
|
653
707
|
export type LlmLibertyApiModelRequest = {
|
|
708
|
+
/**
|
|
709
|
+
* User-provided descriptive name for this API model
|
|
710
|
+
*/
|
|
711
|
+
name: string;
|
|
654
712
|
/**
|
|
655
713
|
* Envelope update action — Keep (update only) or Set (create/replace credentials).
|
|
656
714
|
*/
|
|
@@ -668,6 +726,9 @@ export type LlmLibertyApiModelRequest = {
|
|
|
668
726
|
*/
|
|
669
727
|
forward_all_with_prefix?: boolean;
|
|
670
728
|
};
|
|
729
|
+
/**
|
|
730
|
+
* Envelope sub-types mirror the llm-liberty JSON contract v1.0.0.
|
|
731
|
+
*/
|
|
671
732
|
export type LlmLibertyAuthSpec = {
|
|
672
733
|
in: string;
|
|
673
734
|
key: string;
|
|
@@ -762,9 +823,6 @@ export type LlmLibertyTestPromptRequest = {
|
|
|
762
823
|
*/
|
|
763
824
|
prompt: string;
|
|
764
825
|
};
|
|
765
|
-
/**
|
|
766
|
-
* Local model file response
|
|
767
|
-
*/
|
|
768
826
|
export type LocalModelResponse = {
|
|
769
827
|
repo: string;
|
|
770
828
|
filename: string;
|
|
@@ -777,46 +835,22 @@ export type LocalModelResponse = {
|
|
|
777
835
|
* User-owned MCP server instance.
|
|
778
836
|
*/
|
|
779
837
|
export type Mcp = {
|
|
780
|
-
/**
|
|
781
|
-
* Unique instance identifier (UUID)
|
|
782
|
-
*/
|
|
783
838
|
id: string;
|
|
784
839
|
/**
|
|
785
840
|
* Server info resolved via JOIN
|
|
786
841
|
*/
|
|
787
842
|
mcp_server: McpServerInfo;
|
|
788
|
-
/**
|
|
789
|
-
* User-defined slug for this instance
|
|
790
|
-
*/
|
|
791
843
|
slug: string;
|
|
792
|
-
/**
|
|
793
|
-
* Human-readable name
|
|
794
|
-
*/
|
|
795
844
|
name: string;
|
|
796
|
-
/**
|
|
797
|
-
* Optional description for this instance
|
|
798
|
-
*/
|
|
799
845
|
description?: string | null;
|
|
800
|
-
/**
|
|
801
|
-
* Whether this instance is enabled
|
|
802
|
-
*/
|
|
803
846
|
enabled: boolean;
|
|
804
|
-
/**
|
|
805
|
-
* MCP proxy path for this instance
|
|
806
|
-
*/
|
|
807
847
|
path: string;
|
|
808
848
|
auth_type: McpAuthType;
|
|
809
849
|
/**
|
|
810
850
|
* Reference to the auth config (mcp_auth_configs.id)
|
|
811
851
|
*/
|
|
812
852
|
auth_config_id?: string | null;
|
|
813
|
-
/**
|
|
814
|
-
* When this instance was created
|
|
815
|
-
*/
|
|
816
853
|
created_at: string;
|
|
817
|
-
/**
|
|
818
|
-
* When this instance was last updated
|
|
819
|
-
*/
|
|
820
854
|
updated_at: string;
|
|
821
855
|
};
|
|
822
856
|
export type McpApproval = {
|
|
@@ -872,6 +906,9 @@ export type McpAuthConfigType = 'header' | 'oauth';
|
|
|
872
906
|
export type McpAuthConfigsListResponse = {
|
|
873
907
|
auth_configs: Array<McpAuthConfigResponse>;
|
|
874
908
|
};
|
|
909
|
+
/**
|
|
910
|
+
* Masked auth param response.
|
|
911
|
+
*/
|
|
875
912
|
export type McpAuthParam = {
|
|
876
913
|
id: string;
|
|
877
914
|
param_type: McpAuthParamType;
|
|
@@ -885,6 +922,21 @@ export type McpAuthParamInput = {
|
|
|
885
922
|
};
|
|
886
923
|
export type McpAuthParamType = 'header' | 'query';
|
|
887
924
|
export type McpAuthType = 'public' | 'header' | 'oauth';
|
|
925
|
+
/**
|
|
926
|
+
* MCP connect grant. `All` is a wildcard (incl. future MCPs); `Specific` lists
|
|
927
|
+
* the user's own instance ids (empty ⇒ no MCP access).
|
|
928
|
+
*
|
|
929
|
+
* Defaults to **least-privilege** (empty `Specific` ⇒ deny), symmetric with
|
|
930
|
+
* `ModelGrant`: an unspecified or legacy grant grants nothing, so a stored
|
|
931
|
+
* payload that omits `mcps` cannot silently grant every MCP. All-access must be
|
|
932
|
+
* requested explicitly via `McpGrant::All`.
|
|
933
|
+
*/
|
|
934
|
+
export type McpGrant = {
|
|
935
|
+
type: 'all';
|
|
936
|
+
} | {
|
|
937
|
+
ids: Array<string>;
|
|
938
|
+
type: 'specific';
|
|
939
|
+
};
|
|
888
940
|
export type McpInstance = {
|
|
889
941
|
id: string;
|
|
890
942
|
/**
|
|
@@ -896,83 +948,43 @@ export type McpInstance = {
|
|
|
896
948
|
* Input for creating or updating an MCP instance.
|
|
897
949
|
*/
|
|
898
950
|
export type McpRequest = {
|
|
899
|
-
/**
|
|
900
|
-
* Human-readable name (required)
|
|
901
|
-
*/
|
|
902
951
|
name: string;
|
|
903
952
|
/**
|
|
904
|
-
*
|
|
953
|
+
* 1-24 chars, alphanumeric + hyphens.
|
|
905
954
|
*/
|
|
906
955
|
slug: string;
|
|
907
956
|
/**
|
|
908
|
-
*
|
|
957
|
+
* Required for create, ignored for update.
|
|
909
958
|
*/
|
|
910
959
|
mcp_server_id?: string | null;
|
|
911
|
-
/**
|
|
912
|
-
* Optional description
|
|
913
|
-
*/
|
|
914
960
|
description?: string | null;
|
|
915
|
-
/**
|
|
916
|
-
* Whether this instance is enabled
|
|
917
|
-
*/
|
|
918
961
|
enabled: boolean;
|
|
919
|
-
/**
|
|
920
|
-
* Authentication type
|
|
921
|
-
*/
|
|
922
962
|
auth_type?: McpAuthType;
|
|
923
|
-
/**
|
|
924
|
-
* Reference to auth config
|
|
925
|
-
*/
|
|
926
963
|
auth_config_id?: string | null;
|
|
927
964
|
/**
|
|
928
|
-
* Instance-level
|
|
965
|
+
* Instance-level values for the auth config's key definitions.
|
|
929
966
|
*/
|
|
930
967
|
credentials?: Array<McpAuthParamInput> | null;
|
|
931
968
|
/**
|
|
932
|
-
* OAuth token ID to link to this MCP instance (set after OAuth flow)
|
|
969
|
+
* OAuth token ID to link to this MCP instance (set after OAuth flow).
|
|
933
970
|
*/
|
|
934
971
|
oauth_token_id?: string | null;
|
|
935
972
|
};
|
|
936
973
|
/**
|
|
937
|
-
* Admin-managed MCP server registry entry.
|
|
938
|
-
* Admins/managers register MCP server URLs that users can then create instances of.
|
|
974
|
+
* Admin-managed MCP server registry entry that users create instances of.
|
|
939
975
|
*/
|
|
940
976
|
export type McpServer = {
|
|
941
|
-
/**
|
|
942
|
-
* Unique identifier (UUID)
|
|
943
|
-
*/
|
|
944
977
|
id: string;
|
|
945
978
|
/**
|
|
946
979
|
* MCP server endpoint URL (trimmed, case-insensitive unique)
|
|
947
980
|
*/
|
|
948
981
|
url: string;
|
|
949
|
-
/**
|
|
950
|
-
* Human-readable display name
|
|
951
|
-
*/
|
|
952
982
|
name: string;
|
|
953
|
-
/**
|
|
954
|
-
* Optional description
|
|
955
|
-
*/
|
|
956
983
|
description?: string | null;
|
|
957
|
-
/**
|
|
958
|
-
* Whether this MCP server is enabled
|
|
959
|
-
*/
|
|
960
984
|
enabled: boolean;
|
|
961
|
-
/**
|
|
962
|
-
* User who created this entry
|
|
963
|
-
*/
|
|
964
985
|
created_by: string;
|
|
965
|
-
/**
|
|
966
|
-
* User who last updated this entry
|
|
967
|
-
*/
|
|
968
986
|
updated_by: string;
|
|
969
|
-
/**
|
|
970
|
-
* When this entry was created
|
|
971
|
-
*/
|
|
972
987
|
created_at: string;
|
|
973
|
-
/**
|
|
974
|
-
* When this entry was last updated
|
|
975
|
-
*/
|
|
976
988
|
updated_at: string;
|
|
977
989
|
};
|
|
978
990
|
/**
|
|
@@ -989,20 +1001,11 @@ export type McpServerInfo = {
|
|
|
989
1001
|
*/
|
|
990
1002
|
export type McpServerRequest = {
|
|
991
1003
|
/**
|
|
992
|
-
* MCP server endpoint URL (trimmed, case-insensitive unique)
|
|
1004
|
+
* MCP server endpoint URL (trimmed, case-insensitive unique).
|
|
993
1005
|
*/
|
|
994
1006
|
url: string;
|
|
995
|
-
/**
|
|
996
|
-
* Human-readable display name
|
|
997
|
-
*/
|
|
998
1007
|
name: string;
|
|
999
|
-
/**
|
|
1000
|
-
* Optional description
|
|
1001
|
-
*/
|
|
1002
1008
|
description?: string | null;
|
|
1003
|
-
/**
|
|
1004
|
-
* Whether this MCP server is enabled
|
|
1005
|
-
*/
|
|
1006
1009
|
enabled: boolean;
|
|
1007
1010
|
auth_config?: null | CreateMcpAuthConfigRequest;
|
|
1008
1011
|
};
|
|
@@ -1015,9 +1018,6 @@ export type McpServerResponse = McpServer & {
|
|
|
1015
1018
|
auth_config?: null | McpAuthConfigResponse;
|
|
1016
1019
|
};
|
|
1017
1020
|
export type McpServerReviewInfo = {
|
|
1018
|
-
/**
|
|
1019
|
-
* Requested MCP server URL
|
|
1020
|
-
*/
|
|
1021
1021
|
url: string;
|
|
1022
1022
|
/**
|
|
1023
1023
|
* User's MCP instances connected to this server URL
|
|
@@ -1060,6 +1060,10 @@ export type ModelAliasResponse = {
|
|
|
1060
1060
|
repo: string;
|
|
1061
1061
|
filename: string;
|
|
1062
1062
|
snapshot: string;
|
|
1063
|
+
/**
|
|
1064
|
+
* Local GGUF file size in bytes (present when the file is resolvable on disk)
|
|
1065
|
+
*/
|
|
1066
|
+
size?: number | null;
|
|
1063
1067
|
metadata?: null | ModelMetadata;
|
|
1064
1068
|
};
|
|
1065
1069
|
export type ModelArchitecture = {
|
|
@@ -1074,6 +1078,20 @@ export type ModelCapabilities = {
|
|
|
1074
1078
|
thinking?: boolean | null;
|
|
1075
1079
|
tools: ToolCapabilities;
|
|
1076
1080
|
};
|
|
1081
|
+
/**
|
|
1082
|
+
* Model inference grant. `All` is a wildcard that includes models added in the
|
|
1083
|
+
* future; `Specific` lists alias ids (empty ⇒ no model access).
|
|
1084
|
+
*
|
|
1085
|
+
* Defaults to **least-privilege** (empty `Specific` ⇒ deny): an unspecified or
|
|
1086
|
+
* legacy grant grants nothing. All-access must be requested explicitly via
|
|
1087
|
+
* `ModelGrant::All`. Symmetric with `ApprovedResourcesV1`'s empty-MCP default.
|
|
1088
|
+
*/
|
|
1089
|
+
export type ModelGrant = {
|
|
1090
|
+
type: 'all';
|
|
1091
|
+
} | {
|
|
1092
|
+
ids: Array<string>;
|
|
1093
|
+
type: 'specific';
|
|
1094
|
+
};
|
|
1077
1095
|
/**
|
|
1078
1096
|
* Model metadata for API responses
|
|
1079
1097
|
*/
|
|
@@ -1083,6 +1101,45 @@ export type ModelMetadata = {
|
|
|
1083
1101
|
architecture: ModelArchitecture;
|
|
1084
1102
|
chat_template?: string | null;
|
|
1085
1103
|
};
|
|
1104
|
+
/**
|
|
1105
|
+
* A composite alias that fronts an ordered list of targets and routes a chat
|
|
1106
|
+
* request through them via a pluggable strategy. v1 ships only the fallback strategy.
|
|
1107
|
+
*/
|
|
1108
|
+
export type ModelRouterAlias = {
|
|
1109
|
+
id: string;
|
|
1110
|
+
/**
|
|
1111
|
+
* User-facing model name, unique across all alias kinds.
|
|
1112
|
+
*/
|
|
1113
|
+
alias: string;
|
|
1114
|
+
/**
|
|
1115
|
+
* Ordered list of targets; order is the fallback priority.
|
|
1116
|
+
*/
|
|
1117
|
+
targets: Array<RouterTarget>;
|
|
1118
|
+
strategy: RoutingStrategyConfig;
|
|
1119
|
+
created_at: string;
|
|
1120
|
+
updated_at: string;
|
|
1121
|
+
};
|
|
1122
|
+
/**
|
|
1123
|
+
* Input request for creating or updating a model-router. Used as `ValidatedJson` in handlers
|
|
1124
|
+
* for both create and update (PUT). A zero-target or all-disabled router is allowed to save.
|
|
1125
|
+
*/
|
|
1126
|
+
export type ModelRouterRequest = {
|
|
1127
|
+
alias: string;
|
|
1128
|
+
targets?: Array<RouterTargetRequest>;
|
|
1129
|
+
strategy?: RoutingStrategyConfig;
|
|
1130
|
+
};
|
|
1131
|
+
/**
|
|
1132
|
+
* API response for model-router aliases.
|
|
1133
|
+
*/
|
|
1134
|
+
export type ModelRouterResponse = {
|
|
1135
|
+
source: string;
|
|
1136
|
+
id: string;
|
|
1137
|
+
alias: string;
|
|
1138
|
+
targets: Array<RouterTarget>;
|
|
1139
|
+
strategy: RoutingStrategyConfig;
|
|
1140
|
+
created_at: string;
|
|
1141
|
+
updated_at: string;
|
|
1142
|
+
};
|
|
1086
1143
|
/**
|
|
1087
1144
|
* Request for creating a new download request
|
|
1088
1145
|
*/
|
|
@@ -1105,6 +1162,7 @@ export type OaiRequestParams = {
|
|
|
1105
1162
|
temperature?: number | null;
|
|
1106
1163
|
top_p?: number | null;
|
|
1107
1164
|
user?: string | null;
|
|
1165
|
+
system_prompt?: string | null;
|
|
1108
1166
|
};
|
|
1109
1167
|
export type OAuthDiscoverAsRequest = {
|
|
1110
1168
|
url: string;
|
|
@@ -1166,9 +1224,6 @@ export type PaginatedDownloadResponse = {
|
|
|
1166
1224
|
page: number;
|
|
1167
1225
|
page_size: number;
|
|
1168
1226
|
};
|
|
1169
|
-
/**
|
|
1170
|
-
* Paginated list of local model files
|
|
1171
|
-
*/
|
|
1172
1227
|
export type PaginatedLocalModelResponse = {
|
|
1173
1228
|
data: Array<LocalModelResponse>;
|
|
1174
1229
|
total: number;
|
|
@@ -1241,9 +1296,6 @@ export type PingResponse = {
|
|
|
1241
1296
|
*/
|
|
1242
1297
|
message: string;
|
|
1243
1298
|
};
|
|
1244
|
-
/**
|
|
1245
|
-
* Response for queue status operations
|
|
1246
|
-
*/
|
|
1247
1299
|
export type QueueStatusResponse = {
|
|
1248
1300
|
/**
|
|
1249
1301
|
* Queue status ("idle" or "processing")
|
|
@@ -1301,16 +1353,104 @@ export type RequestedMcpServer = {
|
|
|
1301
1353
|
url: string;
|
|
1302
1354
|
};
|
|
1303
1355
|
/**
|
|
1304
|
-
* Versioned envelope for requested resources.
|
|
1305
1356
|
* The `version` tag is mandatory — clients must specify which version they are using.
|
|
1306
1357
|
*/
|
|
1307
1358
|
export type RequestedResources = RequestedResourcesV1 & {
|
|
1308
1359
|
version: '1';
|
|
1309
1360
|
};
|
|
1361
|
+
/**
|
|
1362
|
+
* What the external app asks for. The four booleans are **UI drivers**: they tell
|
|
1363
|
+
* the consent screen which controls to render (the owner decides the actual grant).
|
|
1364
|
+
* Fields are domain-first (`models_*` / `mcps_*`), matching `ApprovedResourcesV1`.
|
|
1365
|
+
* `mcp_servers` is the existing by-url MCP request and is unchanged.
|
|
1366
|
+
*
|
|
1367
|
+
* `models_access` defaults to **true**: unless the app explicitly opts out
|
|
1368
|
+
* (`models_access: false`), the consent screen shows the model-access selector so
|
|
1369
|
+
* the owner can always scope models. (The other UI-driver flags default to false.)
|
|
1370
|
+
*/
|
|
1310
1371
|
export type RequestedResourcesV1 = {
|
|
1372
|
+
/**
|
|
1373
|
+
* Render the "list all models" toggle.
|
|
1374
|
+
*/
|
|
1375
|
+
models_list?: boolean;
|
|
1376
|
+
/**
|
|
1377
|
+
* Render the model All/Specific access selector. Defaults to `true` (shown).
|
|
1378
|
+
*/
|
|
1379
|
+
models_access?: boolean;
|
|
1380
|
+
/**
|
|
1381
|
+
* Render the "list all MCPs" toggle.
|
|
1382
|
+
*/
|
|
1383
|
+
mcps_list?: boolean;
|
|
1384
|
+
/**
|
|
1385
|
+
* Render the owner-extra MCP All/Specific access selector.
|
|
1386
|
+
*/
|
|
1387
|
+
mcps_access?: boolean;
|
|
1311
1388
|
mcp_servers?: Array<RequestedMcpServer>;
|
|
1312
1389
|
};
|
|
1390
|
+
/**
|
|
1391
|
+
* Effective access to a class of resources (models or MCPs) for an API token,
|
|
1392
|
+
* reflected from its grants. Discriminated on `type`: `all` ⇒ every current and
|
|
1393
|
+
* future resource; `specific` ⇒ the listed `ids` (empty ⇒ no access).
|
|
1394
|
+
* `list` is the `list_*` toggle (whether the token may enumerate the full catalog).
|
|
1395
|
+
*/
|
|
1396
|
+
export type ResourceAccess = {
|
|
1397
|
+
list: boolean;
|
|
1398
|
+
type: 'all';
|
|
1399
|
+
} | {
|
|
1400
|
+
list: boolean;
|
|
1401
|
+
ids: Array<string>;
|
|
1402
|
+
type: 'specific';
|
|
1403
|
+
};
|
|
1404
|
+
/**
|
|
1405
|
+
* Effective resource access for a token-bearing principal (API token or external
|
|
1406
|
+
* app), reflected from its grants. Reported uniformly via the `access` envelope
|
|
1407
|
+
* field for both principals.
|
|
1408
|
+
*/
|
|
1409
|
+
export type ResourceAccessInfo = {
|
|
1410
|
+
/**
|
|
1411
|
+
* Effective model access for this principal.
|
|
1412
|
+
*/
|
|
1413
|
+
models: ResourceAccess;
|
|
1414
|
+
/**
|
|
1415
|
+
* Effective MCP access for this principal.
|
|
1416
|
+
*/
|
|
1417
|
+
mcps: ResourceAccess;
|
|
1418
|
+
};
|
|
1313
1419
|
export type ResourceRole = 'resource_anonymous' | 'resource_guest' | 'resource_user' | 'resource_power_user' | 'resource_manager' | 'resource_admin';
|
|
1420
|
+
/**
|
|
1421
|
+
* One target in a model-router: a reference to an existing alias plus a pinned model.
|
|
1422
|
+
*/
|
|
1423
|
+
export type RouterTarget = {
|
|
1424
|
+
/**
|
|
1425
|
+
* Name of an existing user/model/api alias (NOT a model-router).
|
|
1426
|
+
*/
|
|
1427
|
+
alias: string;
|
|
1428
|
+
/**
|
|
1429
|
+
* Concrete model placed into `request["model"]` when forwarding to this target.
|
|
1430
|
+
*/
|
|
1431
|
+
model: string;
|
|
1432
|
+
/**
|
|
1433
|
+
* Whether this target is part of the active sequence. Disabled targets are never
|
|
1434
|
+
* attempted but keep their config and position. Defaults to enabled.
|
|
1435
|
+
*/
|
|
1436
|
+
enabled?: boolean;
|
|
1437
|
+
/**
|
|
1438
|
+
* SEAM (reserved): ignored by Fallback; used by a future weighted strategy.
|
|
1439
|
+
*/
|
|
1440
|
+
weight?: number | null;
|
|
1441
|
+
};
|
|
1442
|
+
export type RouterTargetRequest = {
|
|
1443
|
+
alias: string;
|
|
1444
|
+
model: string;
|
|
1445
|
+
enabled?: boolean;
|
|
1446
|
+
weight?: number | null;
|
|
1447
|
+
};
|
|
1448
|
+
/**
|
|
1449
|
+
* `{"strategy":"fallback", ...}` — try targets in order, first success wins.
|
|
1450
|
+
*/
|
|
1451
|
+
export type RoutingStrategyConfig = FallbackConfig & {
|
|
1452
|
+
strategy: 'fallback';
|
|
1453
|
+
};
|
|
1314
1454
|
export type SettingInfo = {
|
|
1315
1455
|
key: string;
|
|
1316
1456
|
current_value: unknown;
|
|
@@ -1404,16 +1544,10 @@ export type TestPromptResponse = {
|
|
|
1404
1544
|
response?: string | null;
|
|
1405
1545
|
error?: string | null;
|
|
1406
1546
|
};
|
|
1407
|
-
/**
|
|
1408
|
-
* Thinking capability and supported type configurations.
|
|
1409
|
-
*/
|
|
1410
1547
|
export type ThinkingCapability = {
|
|
1411
1548
|
supported: boolean;
|
|
1412
1549
|
types: ThinkingTypes;
|
|
1413
1550
|
};
|
|
1414
|
-
/**
|
|
1415
|
-
* Supported thinking type configurations.
|
|
1416
|
-
*/
|
|
1417
1551
|
export type ThinkingTypes = {
|
|
1418
1552
|
adaptive: CapabilitySupport;
|
|
1419
1553
|
enabled: CapabilitySupport;
|
|
@@ -1431,11 +1565,38 @@ export type TokenDetail = {
|
|
|
1431
1565
|
token_prefix: string;
|
|
1432
1566
|
scopes: string;
|
|
1433
1567
|
status: TokenStatus;
|
|
1568
|
+
/**
|
|
1569
|
+
* Per-resource grants this token carries.
|
|
1570
|
+
*/
|
|
1571
|
+
grants: TokenGrants;
|
|
1572
|
+
last_used_at?: string | null;
|
|
1434
1573
|
created_at: string;
|
|
1435
1574
|
updated_at: string;
|
|
1436
1575
|
};
|
|
1437
1576
|
/**
|
|
1438
|
-
*
|
|
1577
|
+
* Versioned envelope; the `version` tag is mandatory (mirrors `ApprovedResources`).
|
|
1578
|
+
*/
|
|
1579
|
+
export type TokenGrants = TokenGrantsV1 & {
|
|
1580
|
+
version: '1';
|
|
1581
|
+
};
|
|
1582
|
+
/**
|
|
1583
|
+
* Per-resource grants carried by an API token. Listing (`models_list` /
|
|
1584
|
+
* `mcps_list`) is separate from inference/connect: with listing off the
|
|
1585
|
+
* discovery endpoints return an empty set, but inference on an individually
|
|
1586
|
+
* granted resource still succeeds.
|
|
1587
|
+
*
|
|
1588
|
+
* Intentionally standalone — NOT shared with the App-access-request envelope
|
|
1589
|
+
* (`ApprovedResources`); the two may diverge.
|
|
1590
|
+
*/
|
|
1591
|
+
export type TokenGrantsV1 = {
|
|
1592
|
+
models_list?: boolean;
|
|
1593
|
+
models?: ModelGrant;
|
|
1594
|
+
mcps_list?: boolean;
|
|
1595
|
+
mcps?: McpGrant;
|
|
1596
|
+
};
|
|
1597
|
+
/**
|
|
1598
|
+
* API Token information response. Effective model/MCP access is reported uniformly
|
|
1599
|
+
* via the envelope's `access` field (same shape as external apps), not inline here.
|
|
1439
1600
|
*/
|
|
1440
1601
|
export type TokenInfo = {
|
|
1441
1602
|
role: TokenScope;
|
|
@@ -1446,12 +1607,9 @@ export type ToolCapabilities = {
|
|
|
1446
1607
|
function_calling?: boolean | null;
|
|
1447
1608
|
structured_output?: boolean | null;
|
|
1448
1609
|
};
|
|
1449
|
-
/**
|
|
1450
|
-
* Request to update a setting value
|
|
1451
|
-
*/
|
|
1452
1610
|
export type UpdateSettingRequest = {
|
|
1453
1611
|
/**
|
|
1454
|
-
*
|
|
1612
|
+
* type depends on setting metadata
|
|
1455
1613
|
*/
|
|
1456
1614
|
value: unknown;
|
|
1457
1615
|
};
|
|
@@ -1551,6 +1709,10 @@ export type UserAliasResponse = {
|
|
|
1551
1709
|
context_params: Array<string>;
|
|
1552
1710
|
created_at: string;
|
|
1553
1711
|
updated_at: string;
|
|
1712
|
+
/**
|
|
1713
|
+
* Local GGUF file size in bytes (present when the file is resolvable on disk)
|
|
1714
|
+
*/
|
|
1715
|
+
size?: number | null;
|
|
1554
1716
|
metadata?: null | ModelMetadata;
|
|
1555
1717
|
};
|
|
1556
1718
|
export type UserInfo = {
|
|
@@ -1559,12 +1721,18 @@ export type UserInfo = {
|
|
|
1559
1721
|
first_name?: string | null;
|
|
1560
1722
|
last_name?: string | null;
|
|
1561
1723
|
role?: null | AppRole;
|
|
1724
|
+
/**
|
|
1725
|
+
* OIDC id_token for the active session, when present. Used by the frontend to
|
|
1726
|
+
* authenticate direct calls to the external reference API. Omitted for token/exchange auth.
|
|
1727
|
+
*/
|
|
1728
|
+
id_token?: string | null;
|
|
1562
1729
|
};
|
|
1563
1730
|
/**
|
|
1564
1731
|
* Envelope wrapping UserResponse with additional session info
|
|
1565
1732
|
*/
|
|
1566
1733
|
export type UserInfoEnvelope = UserResponse & {
|
|
1567
1734
|
dashboard?: null | DashboardUser;
|
|
1735
|
+
access?: null | ResourceAccessInfo;
|
|
1568
1736
|
};
|
|
1569
1737
|
export type UserListResponse = {
|
|
1570
1738
|
client_id: string;
|
|
@@ -1636,6 +1804,38 @@ export type ListAllAccessRequestsResponses = {
|
|
|
1636
1804
|
200: PaginatedUserAccessResponse;
|
|
1637
1805
|
};
|
|
1638
1806
|
export type ListAllAccessRequestsResponse = ListAllAccessRequestsResponses[keyof ListAllAccessRequestsResponses];
|
|
1807
|
+
export type ListAppAccessData = {
|
|
1808
|
+
body?: never;
|
|
1809
|
+
path?: never;
|
|
1810
|
+
query?: never;
|
|
1811
|
+
url: '/bodhi/v1/access-requests/apps';
|
|
1812
|
+
};
|
|
1813
|
+
export type ListAppAccessErrors = {
|
|
1814
|
+
/**
|
|
1815
|
+
* Invalid request parameters
|
|
1816
|
+
*/
|
|
1817
|
+
400: BodhiErrorResponse;
|
|
1818
|
+
/**
|
|
1819
|
+
* Not authenticated
|
|
1820
|
+
*/
|
|
1821
|
+
401: BodhiErrorResponse;
|
|
1822
|
+
/**
|
|
1823
|
+
* Insufficient permissions
|
|
1824
|
+
*/
|
|
1825
|
+
403: BodhiErrorResponse;
|
|
1826
|
+
/**
|
|
1827
|
+
* Internal server error
|
|
1828
|
+
*/
|
|
1829
|
+
500: BodhiErrorResponse;
|
|
1830
|
+
};
|
|
1831
|
+
export type ListAppAccessError = ListAppAccessErrors[keyof ListAppAccessErrors];
|
|
1832
|
+
export type ListAppAccessResponses = {
|
|
1833
|
+
/**
|
|
1834
|
+
* Issued app tokens
|
|
1835
|
+
*/
|
|
1836
|
+
200: ListAppAccessResponse;
|
|
1837
|
+
};
|
|
1838
|
+
export type ListAppAccessResponse2 = ListAppAccessResponses[keyof ListAppAccessResponses];
|
|
1639
1839
|
export type ListPendingAccessRequestsData = {
|
|
1640
1840
|
body?: never;
|
|
1641
1841
|
path?: never;
|
|
@@ -1832,7 +2032,47 @@ export type RejectAccessRequestData = {
|
|
|
1832
2032
|
query?: never;
|
|
1833
2033
|
url: '/bodhi/v1/access-requests/{id}/reject';
|
|
1834
2034
|
};
|
|
1835
|
-
export type RejectAccessRequestErrors = {
|
|
2035
|
+
export type RejectAccessRequestErrors = {
|
|
2036
|
+
/**
|
|
2037
|
+
* Invalid request parameters
|
|
2038
|
+
*/
|
|
2039
|
+
400: BodhiErrorResponse;
|
|
2040
|
+
/**
|
|
2041
|
+
* Not authenticated
|
|
2042
|
+
*/
|
|
2043
|
+
401: BodhiErrorResponse;
|
|
2044
|
+
/**
|
|
2045
|
+
* Insufficient permissions
|
|
2046
|
+
*/
|
|
2047
|
+
403: BodhiErrorResponse;
|
|
2048
|
+
/**
|
|
2049
|
+
* Request not found
|
|
2050
|
+
*/
|
|
2051
|
+
404: BodhiErrorResponse;
|
|
2052
|
+
/**
|
|
2053
|
+
* Internal server error
|
|
2054
|
+
*/
|
|
2055
|
+
500: BodhiErrorResponse;
|
|
2056
|
+
};
|
|
2057
|
+
export type RejectAccessRequestError = RejectAccessRequestErrors[keyof RejectAccessRequestErrors];
|
|
2058
|
+
export type RejectAccessRequestResponses = {
|
|
2059
|
+
/**
|
|
2060
|
+
* Request rejected successfully
|
|
2061
|
+
*/
|
|
2062
|
+
200: unknown;
|
|
2063
|
+
};
|
|
2064
|
+
export type GetAccessRequestReviewData = {
|
|
2065
|
+
body?: never;
|
|
2066
|
+
path: {
|
|
2067
|
+
/**
|
|
2068
|
+
* Access request ID
|
|
2069
|
+
*/
|
|
2070
|
+
id: string;
|
|
2071
|
+
};
|
|
2072
|
+
query?: never;
|
|
2073
|
+
url: '/bodhi/v1/access-requests/{id}/review';
|
|
2074
|
+
};
|
|
2075
|
+
export type GetAccessRequestReviewErrors = {
|
|
1836
2076
|
/**
|
|
1837
2077
|
* Invalid request parameters
|
|
1838
2078
|
*/
|
|
@@ -1846,22 +2086,27 @@ export type RejectAccessRequestErrors = {
|
|
|
1846
2086
|
*/
|
|
1847
2087
|
403: BodhiErrorResponse;
|
|
1848
2088
|
/**
|
|
1849
|
-
*
|
|
2089
|
+
* Not found
|
|
1850
2090
|
*/
|
|
1851
2091
|
404: BodhiErrorResponse;
|
|
2092
|
+
/**
|
|
2093
|
+
* Request expired
|
|
2094
|
+
*/
|
|
2095
|
+
410: BodhiErrorResponse;
|
|
1852
2096
|
/**
|
|
1853
2097
|
* Internal server error
|
|
1854
2098
|
*/
|
|
1855
2099
|
500: BodhiErrorResponse;
|
|
1856
2100
|
};
|
|
1857
|
-
export type
|
|
1858
|
-
export type
|
|
2101
|
+
export type GetAccessRequestReviewError = GetAccessRequestReviewErrors[keyof GetAccessRequestReviewErrors];
|
|
2102
|
+
export type GetAccessRequestReviewResponses = {
|
|
1859
2103
|
/**
|
|
1860
|
-
*
|
|
2104
|
+
* Review data retrieved
|
|
1861
2105
|
*/
|
|
1862
|
-
200:
|
|
2106
|
+
200: AccessRequestReviewResponse;
|
|
1863
2107
|
};
|
|
1864
|
-
export type
|
|
2108
|
+
export type GetAccessRequestReviewResponse = GetAccessRequestReviewResponses[keyof GetAccessRequestReviewResponses];
|
|
2109
|
+
export type RevokeAppAccessData = {
|
|
1865
2110
|
body?: never;
|
|
1866
2111
|
path: {
|
|
1867
2112
|
/**
|
|
@@ -1870,9 +2115,9 @@ export type GetAccessRequestReviewData = {
|
|
|
1870
2115
|
id: string;
|
|
1871
2116
|
};
|
|
1872
2117
|
query?: never;
|
|
1873
|
-
url: '/bodhi/v1/access-requests/{id}/
|
|
2118
|
+
url: '/bodhi/v1/access-requests/{id}/revoke';
|
|
1874
2119
|
};
|
|
1875
|
-
export type
|
|
2120
|
+
export type RevokeAppAccessErrors = {
|
|
1876
2121
|
/**
|
|
1877
2122
|
* Invalid request parameters
|
|
1878
2123
|
*/
|
|
@@ -1890,22 +2135,22 @@ export type GetAccessRequestReviewErrors = {
|
|
|
1890
2135
|
*/
|
|
1891
2136
|
404: BodhiErrorResponse;
|
|
1892
2137
|
/**
|
|
1893
|
-
*
|
|
2138
|
+
* Not in a revocable state
|
|
1894
2139
|
*/
|
|
1895
|
-
|
|
2140
|
+
409: BodhiErrorResponse;
|
|
1896
2141
|
/**
|
|
1897
2142
|
* Internal server error
|
|
1898
2143
|
*/
|
|
1899
2144
|
500: BodhiErrorResponse;
|
|
1900
2145
|
};
|
|
1901
|
-
export type
|
|
1902
|
-
export type
|
|
2146
|
+
export type RevokeAppAccessError = RevokeAppAccessErrors[keyof RevokeAppAccessErrors];
|
|
2147
|
+
export type RevokeAppAccessResponses = {
|
|
1903
2148
|
/**
|
|
1904
|
-
*
|
|
2149
|
+
* Grant revoked
|
|
1905
2150
|
*/
|
|
1906
|
-
200:
|
|
2151
|
+
200: AppAccessSummary;
|
|
1907
2152
|
};
|
|
1908
|
-
export type
|
|
2153
|
+
export type RevokeAppAccessResponse = RevokeAppAccessResponses[keyof RevokeAppAccessResponses];
|
|
1909
2154
|
export type GetAccessRequestStatusData = {
|
|
1910
2155
|
body?: never;
|
|
1911
2156
|
path: {
|
|
@@ -3079,6 +3324,34 @@ export type ListAllModelsData = {
|
|
|
3079
3324
|
* Sort order: 'asc' for ascending, 'desc' for descending
|
|
3080
3325
|
*/
|
|
3081
3326
|
sort_order?: string;
|
|
3327
|
+
/**
|
|
3328
|
+
* Alias type facet (comma-separated): `local_file`, `model_alias`, `api_model`, `fallback`.
|
|
3329
|
+
*/
|
|
3330
|
+
type?: string;
|
|
3331
|
+
/**
|
|
3332
|
+
* API-format facet (comma-separated), API rows only: `openai`, `responses`, `anthropic`,
|
|
3333
|
+
* `gemini`, `liberty`. `anthropic` matches both anthropic and anthropic_oauth aliases.
|
|
3334
|
+
*/
|
|
3335
|
+
api_format?: string;
|
|
3336
|
+
/**
|
|
3337
|
+
* Minimum local-file size in bytes (inclusive). Applies to local rows with a known size;
|
|
3338
|
+
* rows without a size (API/router) are not filtered out by size.
|
|
3339
|
+
*/
|
|
3340
|
+
size_min?: number;
|
|
3341
|
+
/**
|
|
3342
|
+
* Maximum local-file size in bytes (inclusive). See `size_min`.
|
|
3343
|
+
*/
|
|
3344
|
+
size_max?: number;
|
|
3345
|
+
/**
|
|
3346
|
+
* Capability facet (comma-separated), local rows only: `vision`, `tool_use`, `reasoning`.
|
|
3347
|
+
* A row passes only if it has metadata with every requested capability set true.
|
|
3348
|
+
*/
|
|
3349
|
+
capability?: string;
|
|
3350
|
+
/**
|
|
3351
|
+
* Free-text search (case-insensitive substring) over a row's identifying fields — alias/name,
|
|
3352
|
+
* repo, filename for local rows; id, name, base_url for API rows; alias for routers.
|
|
3353
|
+
*/
|
|
3354
|
+
search?: string;
|
|
3082
3355
|
};
|
|
3083
3356
|
url: '/bodhi/v1/models';
|
|
3084
3357
|
};
|
|
@@ -3732,6 +4005,88 @@ export type GetDownloadStatusResponses = {
|
|
|
3732
4005
|
200: DownloadRequest;
|
|
3733
4006
|
};
|
|
3734
4007
|
export type GetDownloadStatusResponse = GetDownloadStatusResponses[keyof GetDownloadStatusResponses];
|
|
4008
|
+
export type ArchiveDownloadData = {
|
|
4009
|
+
body?: never;
|
|
4010
|
+
path: {
|
|
4011
|
+
/**
|
|
4012
|
+
* Unique identifier of the download request
|
|
4013
|
+
*/
|
|
4014
|
+
id: string;
|
|
4015
|
+
};
|
|
4016
|
+
query?: never;
|
|
4017
|
+
url: '/bodhi/v1/models/files/pull/{id}/archive';
|
|
4018
|
+
};
|
|
4019
|
+
export type ArchiveDownloadErrors = {
|
|
4020
|
+
/**
|
|
4021
|
+
* Invalid request parameters
|
|
4022
|
+
*/
|
|
4023
|
+
400: BodhiErrorResponse;
|
|
4024
|
+
/**
|
|
4025
|
+
* Not authenticated
|
|
4026
|
+
*/
|
|
4027
|
+
401: BodhiErrorResponse;
|
|
4028
|
+
/**
|
|
4029
|
+
* Insufficient permissions
|
|
4030
|
+
*/
|
|
4031
|
+
403: BodhiErrorResponse;
|
|
4032
|
+
/**
|
|
4033
|
+
* Download request not found
|
|
4034
|
+
*/
|
|
4035
|
+
404: BodhiErrorResponse;
|
|
4036
|
+
/**
|
|
4037
|
+
* Internal server error
|
|
4038
|
+
*/
|
|
4039
|
+
500: BodhiErrorResponse;
|
|
4040
|
+
};
|
|
4041
|
+
export type ArchiveDownloadError = ArchiveDownloadErrors[keyof ArchiveDownloadErrors];
|
|
4042
|
+
export type ArchiveDownloadResponses = {
|
|
4043
|
+
/**
|
|
4044
|
+
* Download request archived
|
|
4045
|
+
*/
|
|
4046
|
+
200: DownloadRequest;
|
|
4047
|
+
};
|
|
4048
|
+
export type ArchiveDownloadResponse = ArchiveDownloadResponses[keyof ArchiveDownloadResponses];
|
|
4049
|
+
export type RetryDownloadData = {
|
|
4050
|
+
body?: never;
|
|
4051
|
+
path: {
|
|
4052
|
+
/**
|
|
4053
|
+
* Unique identifier of the download request
|
|
4054
|
+
*/
|
|
4055
|
+
id: string;
|
|
4056
|
+
};
|
|
4057
|
+
query?: never;
|
|
4058
|
+
url: '/bodhi/v1/models/files/pull/{id}/retry';
|
|
4059
|
+
};
|
|
4060
|
+
export type RetryDownloadErrors = {
|
|
4061
|
+
/**
|
|
4062
|
+
* Invalid request parameters
|
|
4063
|
+
*/
|
|
4064
|
+
400: BodhiErrorResponse;
|
|
4065
|
+
/**
|
|
4066
|
+
* Not authenticated
|
|
4067
|
+
*/
|
|
4068
|
+
401: BodhiErrorResponse;
|
|
4069
|
+
/**
|
|
4070
|
+
* Insufficient permissions
|
|
4071
|
+
*/
|
|
4072
|
+
403: BodhiErrorResponse;
|
|
4073
|
+
/**
|
|
4074
|
+
* Download request not found
|
|
4075
|
+
*/
|
|
4076
|
+
404: BodhiErrorResponse;
|
|
4077
|
+
/**
|
|
4078
|
+
* Internal server error
|
|
4079
|
+
*/
|
|
4080
|
+
500: BodhiErrorResponse;
|
|
4081
|
+
};
|
|
4082
|
+
export type RetryDownloadError = RetryDownloadErrors[keyof RetryDownloadErrors];
|
|
4083
|
+
export type RetryDownloadResponses = {
|
|
4084
|
+
/**
|
|
4085
|
+
* Download request reset and re-started
|
|
4086
|
+
*/
|
|
4087
|
+
200: DownloadRequest;
|
|
4088
|
+
};
|
|
4089
|
+
export type RetryDownloadResponse = RetryDownloadResponses[keyof RetryDownloadResponses];
|
|
3735
4090
|
export type RefreshModelMetadataData = {
|
|
3736
4091
|
/**
|
|
3737
4092
|
* Refresh request - either bulk (source='all') or single model (source='model' with identifiers)
|
|
@@ -3775,6 +4130,161 @@ export type RefreshModelMetadataResponses = {
|
|
|
3775
4130
|
202: RefreshResponse;
|
|
3776
4131
|
};
|
|
3777
4132
|
export type RefreshModelMetadataResponse = RefreshModelMetadataResponses[keyof RefreshModelMetadataResponses];
|
|
4133
|
+
export type CreateModelRouterData = {
|
|
4134
|
+
body: ModelRouterRequest;
|
|
4135
|
+
path?: never;
|
|
4136
|
+
query?: never;
|
|
4137
|
+
url: '/bodhi/v1/models/router';
|
|
4138
|
+
};
|
|
4139
|
+
export type CreateModelRouterErrors = {
|
|
4140
|
+
/**
|
|
4141
|
+
* Invalid request parameters
|
|
4142
|
+
*/
|
|
4143
|
+
400: BodhiErrorResponse;
|
|
4144
|
+
/**
|
|
4145
|
+
* Not authenticated
|
|
4146
|
+
*/
|
|
4147
|
+
401: BodhiErrorResponse;
|
|
4148
|
+
/**
|
|
4149
|
+
* Insufficient permissions
|
|
4150
|
+
*/
|
|
4151
|
+
403: BodhiErrorResponse;
|
|
4152
|
+
/**
|
|
4153
|
+
* Internal server error
|
|
4154
|
+
*/
|
|
4155
|
+
500: BodhiErrorResponse;
|
|
4156
|
+
};
|
|
4157
|
+
export type CreateModelRouterError = CreateModelRouterErrors[keyof CreateModelRouterErrors];
|
|
4158
|
+
export type CreateModelRouterResponses = {
|
|
4159
|
+
/**
|
|
4160
|
+
* Model-router created
|
|
4161
|
+
*/
|
|
4162
|
+
201: ModelRouterResponse;
|
|
4163
|
+
};
|
|
4164
|
+
export type CreateModelRouterResponse = CreateModelRouterResponses[keyof CreateModelRouterResponses];
|
|
4165
|
+
export type DeleteModelRouterData = {
|
|
4166
|
+
body?: never;
|
|
4167
|
+
path: {
|
|
4168
|
+
/**
|
|
4169
|
+
* Model-router ID
|
|
4170
|
+
*/
|
|
4171
|
+
id: string;
|
|
4172
|
+
};
|
|
4173
|
+
query?: never;
|
|
4174
|
+
url: '/bodhi/v1/models/router/{id}';
|
|
4175
|
+
};
|
|
4176
|
+
export type DeleteModelRouterErrors = {
|
|
4177
|
+
/**
|
|
4178
|
+
* Invalid request parameters
|
|
4179
|
+
*/
|
|
4180
|
+
400: BodhiErrorResponse;
|
|
4181
|
+
/**
|
|
4182
|
+
* Not authenticated
|
|
4183
|
+
*/
|
|
4184
|
+
401: BodhiErrorResponse;
|
|
4185
|
+
/**
|
|
4186
|
+
* Insufficient permissions
|
|
4187
|
+
*/
|
|
4188
|
+
403: BodhiErrorResponse;
|
|
4189
|
+
/**
|
|
4190
|
+
* Model-router not found
|
|
4191
|
+
*/
|
|
4192
|
+
404: BodhiErrorResponse;
|
|
4193
|
+
/**
|
|
4194
|
+
* Internal server error
|
|
4195
|
+
*/
|
|
4196
|
+
500: BodhiErrorResponse;
|
|
4197
|
+
};
|
|
4198
|
+
export type DeleteModelRouterError = DeleteModelRouterErrors[keyof DeleteModelRouterErrors];
|
|
4199
|
+
export type DeleteModelRouterResponses = {
|
|
4200
|
+
/**
|
|
4201
|
+
* Model-router deleted
|
|
4202
|
+
*/
|
|
4203
|
+
204: void;
|
|
4204
|
+
};
|
|
4205
|
+
export type DeleteModelRouterResponse = DeleteModelRouterResponses[keyof DeleteModelRouterResponses];
|
|
4206
|
+
export type GetModelRouterData = {
|
|
4207
|
+
body?: never;
|
|
4208
|
+
path: {
|
|
4209
|
+
/**
|
|
4210
|
+
* Unique identifier for the model-router alias
|
|
4211
|
+
*/
|
|
4212
|
+
id: string;
|
|
4213
|
+
};
|
|
4214
|
+
query?: never;
|
|
4215
|
+
url: '/bodhi/v1/models/router/{id}';
|
|
4216
|
+
};
|
|
4217
|
+
export type GetModelRouterErrors = {
|
|
4218
|
+
/**
|
|
4219
|
+
* Invalid request parameters
|
|
4220
|
+
*/
|
|
4221
|
+
400: BodhiErrorResponse;
|
|
4222
|
+
/**
|
|
4223
|
+
* Not authenticated
|
|
4224
|
+
*/
|
|
4225
|
+
401: BodhiErrorResponse;
|
|
4226
|
+
/**
|
|
4227
|
+
* Insufficient permissions
|
|
4228
|
+
*/
|
|
4229
|
+
403: BodhiErrorResponse;
|
|
4230
|
+
/**
|
|
4231
|
+
* Model-router with specified ID not found
|
|
4232
|
+
*/
|
|
4233
|
+
404: BodhiErrorResponse;
|
|
4234
|
+
/**
|
|
4235
|
+
* Internal server error
|
|
4236
|
+
*/
|
|
4237
|
+
500: BodhiErrorResponse;
|
|
4238
|
+
};
|
|
4239
|
+
export type GetModelRouterError = GetModelRouterErrors[keyof GetModelRouterErrors];
|
|
4240
|
+
export type GetModelRouterResponses = {
|
|
4241
|
+
/**
|
|
4242
|
+
* Model-router configuration retrieved
|
|
4243
|
+
*/
|
|
4244
|
+
200: ModelRouterResponse;
|
|
4245
|
+
};
|
|
4246
|
+
export type GetModelRouterResponse = GetModelRouterResponses[keyof GetModelRouterResponses];
|
|
4247
|
+
export type UpdateModelRouterData = {
|
|
4248
|
+
body: ModelRouterRequest;
|
|
4249
|
+
path: {
|
|
4250
|
+
/**
|
|
4251
|
+
* Model-router ID
|
|
4252
|
+
*/
|
|
4253
|
+
id: string;
|
|
4254
|
+
};
|
|
4255
|
+
query?: never;
|
|
4256
|
+
url: '/bodhi/v1/models/router/{id}';
|
|
4257
|
+
};
|
|
4258
|
+
export type UpdateModelRouterErrors = {
|
|
4259
|
+
/**
|
|
4260
|
+
* Invalid request parameters
|
|
4261
|
+
*/
|
|
4262
|
+
400: BodhiErrorResponse;
|
|
4263
|
+
/**
|
|
4264
|
+
* Not authenticated
|
|
4265
|
+
*/
|
|
4266
|
+
401: BodhiErrorResponse;
|
|
4267
|
+
/**
|
|
4268
|
+
* Insufficient permissions
|
|
4269
|
+
*/
|
|
4270
|
+
403: BodhiErrorResponse;
|
|
4271
|
+
/**
|
|
4272
|
+
* Model-router not found
|
|
4273
|
+
*/
|
|
4274
|
+
404: BodhiErrorResponse;
|
|
4275
|
+
/**
|
|
4276
|
+
* Internal server error
|
|
4277
|
+
*/
|
|
4278
|
+
500: BodhiErrorResponse;
|
|
4279
|
+
};
|
|
4280
|
+
export type UpdateModelRouterError = UpdateModelRouterErrors[keyof UpdateModelRouterErrors];
|
|
4281
|
+
export type UpdateModelRouterResponses = {
|
|
4282
|
+
/**
|
|
4283
|
+
* Model-router updated
|
|
4284
|
+
*/
|
|
4285
|
+
200: ModelRouterResponse;
|
|
4286
|
+
};
|
|
4287
|
+
export type UpdateModelRouterResponse = UpdateModelRouterResponses[keyof UpdateModelRouterResponses];
|
|
3778
4288
|
export type GetAliasData = {
|
|
3779
4289
|
body?: never;
|
|
3780
4290
|
path: {
|
|
@@ -3923,11 +4433,11 @@ export type DeleteSettingResponses = {
|
|
|
3923
4433
|
export type DeleteSettingResponse = DeleteSettingResponses[keyof DeleteSettingResponses];
|
|
3924
4434
|
export type UpdateSettingData = {
|
|
3925
4435
|
/**
|
|
3926
|
-
*
|
|
4436
|
+
* New setting value
|
|
3927
4437
|
*/
|
|
3928
4438
|
body: {
|
|
3929
4439
|
/**
|
|
3930
|
-
*
|
|
4440
|
+
* type depends on setting metadata
|
|
3931
4441
|
*/
|
|
3932
4442
|
value: unknown;
|
|
3933
4443
|
};
|
|
@@ -4184,6 +4694,47 @@ export type CreateApiTokenResponses = {
|
|
|
4184
4694
|
201: TokenCreated;
|
|
4185
4695
|
};
|
|
4186
4696
|
export type CreateApiTokenResponse = CreateApiTokenResponses[keyof CreateApiTokenResponses];
|
|
4697
|
+
export type DeleteApiTokenData = {
|
|
4698
|
+
body?: never;
|
|
4699
|
+
path: {
|
|
4700
|
+
/**
|
|
4701
|
+
* Unique identifier of the API token to delete
|
|
4702
|
+
*/
|
|
4703
|
+
id: string;
|
|
4704
|
+
};
|
|
4705
|
+
query?: never;
|
|
4706
|
+
url: '/bodhi/v1/tokens/{id}';
|
|
4707
|
+
};
|
|
4708
|
+
export type DeleteApiTokenErrors = {
|
|
4709
|
+
/**
|
|
4710
|
+
* Invalid request parameters
|
|
4711
|
+
*/
|
|
4712
|
+
400: BodhiErrorResponse;
|
|
4713
|
+
/**
|
|
4714
|
+
* Not authenticated
|
|
4715
|
+
*/
|
|
4716
|
+
401: BodhiErrorResponse;
|
|
4717
|
+
/**
|
|
4718
|
+
* Insufficient permissions
|
|
4719
|
+
*/
|
|
4720
|
+
403: BodhiErrorResponse;
|
|
4721
|
+
/**
|
|
4722
|
+
* Token not found
|
|
4723
|
+
*/
|
|
4724
|
+
404: BodhiErrorResponse;
|
|
4725
|
+
/**
|
|
4726
|
+
* Internal server error
|
|
4727
|
+
*/
|
|
4728
|
+
500: BodhiErrorResponse;
|
|
4729
|
+
};
|
|
4730
|
+
export type DeleteApiTokenError = DeleteApiTokenErrors[keyof DeleteApiTokenErrors];
|
|
4731
|
+
export type DeleteApiTokenResponses = {
|
|
4732
|
+
/**
|
|
4733
|
+
* Token deleted successfully
|
|
4734
|
+
*/
|
|
4735
|
+
204: void;
|
|
4736
|
+
};
|
|
4737
|
+
export type DeleteApiTokenResponse = DeleteApiTokenResponses[keyof DeleteApiTokenResponses];
|
|
4187
4738
|
export type UpdateApiTokenData = {
|
|
4188
4739
|
/**
|
|
4189
4740
|
* Token update request
|