@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
package/dist/types/types.gen.ts
CHANGED
|
@@ -1,75 +1,45 @@
|
|
|
1
1
|
// This file is auto-generated by @hey-api/openapi-ts
|
|
2
2
|
|
|
3
3
|
export type AccessRequestActionResponse = {
|
|
4
|
-
/**
|
|
5
|
-
* Updated status after action
|
|
6
|
-
*/
|
|
7
4
|
status: AppAccessRequestStatus;
|
|
8
|
-
/**
|
|
9
|
-
* Flow type of the access request
|
|
10
|
-
*/
|
|
11
5
|
flow_type: FlowType;
|
|
12
6
|
/**
|
|
13
|
-
*
|
|
7
|
+
* Present for redirect flow
|
|
14
8
|
*/
|
|
15
9
|
redirect_url?: string | null;
|
|
16
10
|
};
|
|
17
11
|
|
|
18
12
|
export type AccessRequestReviewResponse = {
|
|
19
|
-
/**
|
|
20
|
-
* Access request ID
|
|
21
|
-
*/
|
|
22
13
|
id: string;
|
|
23
|
-
/**
|
|
24
|
-
* App client ID
|
|
25
|
-
*/
|
|
26
14
|
app_client_id: string;
|
|
27
15
|
/**
|
|
28
|
-
*
|
|
16
|
+
* From KC, if available
|
|
29
17
|
*/
|
|
30
18
|
app_name?: string | null;
|
|
31
19
|
/**
|
|
32
|
-
*
|
|
20
|
+
* From KC, if available
|
|
33
21
|
*/
|
|
34
22
|
app_description?: string | null;
|
|
35
23
|
/**
|
|
36
|
-
*
|
|
24
|
+
* One of: "redirect", "popup"
|
|
37
25
|
*/
|
|
38
26
|
flow_type: FlowType;
|
|
39
|
-
/**
|
|
40
|
-
* Current status
|
|
41
|
-
*/
|
|
42
27
|
status: AppAccessRequestStatus;
|
|
43
|
-
/**
|
|
44
|
-
* Role requested by the app
|
|
45
|
-
*/
|
|
46
28
|
requested_role: string;
|
|
47
|
-
/**
|
|
48
|
-
* Resources requested
|
|
49
|
-
*/
|
|
50
29
|
requested: RequestedResources;
|
|
51
|
-
/**
|
|
52
|
-
* MCP server information with user instances
|
|
53
|
-
*/
|
|
54
30
|
mcps_info?: Array<McpServerReviewInfo>;
|
|
55
31
|
};
|
|
56
32
|
|
|
57
33
|
export type AccessRequestStatusResponse = {
|
|
58
|
-
/**
|
|
59
|
-
* Access request ID
|
|
60
|
-
*/
|
|
61
34
|
id: string;
|
|
62
35
|
/**
|
|
63
|
-
*
|
|
36
|
+
* One of: "draft", "approved", "denied", "failed"
|
|
64
37
|
*/
|
|
65
38
|
status: AppAccessRequestStatus;
|
|
66
|
-
/**
|
|
67
|
-
* Role requested by the app
|
|
68
|
-
*/
|
|
69
39
|
requested_role: UserScope;
|
|
70
40
|
approved_role?: null | UserScope;
|
|
71
41
|
/**
|
|
72
|
-
*
|
|
42
|
+
* Present when user-approved with tools
|
|
73
43
|
*/
|
|
74
44
|
access_request_scope?: string | null;
|
|
75
45
|
};
|
|
@@ -84,13 +54,53 @@ export type Alias = (UserAlias & {
|
|
|
84
54
|
source: 'model';
|
|
85
55
|
}) | (ApiAlias & {
|
|
86
56
|
source: 'api';
|
|
57
|
+
}) | (ModelRouterAlias & {
|
|
58
|
+
source: 'model_router';
|
|
87
59
|
});
|
|
88
60
|
|
|
61
|
+
/**
|
|
62
|
+
* Facet filter query parameters for the All-Models list (`GET /bodhi/v1/models`).
|
|
63
|
+
*
|
|
64
|
+
* All facets are server-side and applied before pagination so `total` and the page
|
|
65
|
+
* reflect the filtered set. Multi-value facets accept a comma-separated list; an empty
|
|
66
|
+
* or absent value means "no filter for this facet" (all rows pass).
|
|
67
|
+
*/
|
|
68
|
+
export type AliasFilterParams = {
|
|
69
|
+
/**
|
|
70
|
+
* Alias type facet (comma-separated): `local_file`, `model_alias`, `api_model`, `fallback`.
|
|
71
|
+
*/
|
|
72
|
+
type?: string | null;
|
|
73
|
+
/**
|
|
74
|
+
* API-format facet (comma-separated), API rows only: `openai`, `responses`, `anthropic`,
|
|
75
|
+
* `gemini`, `liberty`. `anthropic` matches both anthropic and anthropic_oauth aliases.
|
|
76
|
+
*/
|
|
77
|
+
api_format?: string | null;
|
|
78
|
+
/**
|
|
79
|
+
* Minimum local-file size in bytes (inclusive). Applies to local rows with a known size;
|
|
80
|
+
* rows without a size (API/router) are not filtered out by size.
|
|
81
|
+
*/
|
|
82
|
+
size_min?: number | null;
|
|
83
|
+
/**
|
|
84
|
+
* Maximum local-file size in bytes (inclusive). See `size_min`.
|
|
85
|
+
*/
|
|
86
|
+
size_max?: number | null;
|
|
87
|
+
/**
|
|
88
|
+
* Capability facet (comma-separated), local rows only: `vision`, `tool_use`, `reasoning`.
|
|
89
|
+
* A row passes only if it has metadata with every requested capability set true.
|
|
90
|
+
*/
|
|
91
|
+
capability?: string | null;
|
|
92
|
+
/**
|
|
93
|
+
* Free-text search (case-insensitive substring) over a row's identifying fields — alias/name,
|
|
94
|
+
* repo, filename for local rows; id, name, base_url for API rows; alias for routers.
|
|
95
|
+
*/
|
|
96
|
+
search?: string | null;
|
|
97
|
+
};
|
|
98
|
+
|
|
89
99
|
/**
|
|
90
100
|
* Response envelope for model aliases - hides internal implementation details
|
|
91
101
|
* Uses untagged serialization - each variant has its own "source" field
|
|
92
102
|
*/
|
|
93
|
-
export type AliasResponse = UserAliasResponse | ModelAliasResponse | ApiAliasResponse;
|
|
103
|
+
export type AliasResponse = ModelRouterResponse | UserAliasResponse | ModelAliasResponse | ApiAliasResponse;
|
|
94
104
|
|
|
95
105
|
/**
|
|
96
106
|
* Mirrors Anthropic's `ModelInfo` schema — full model metadata returned by
|
|
@@ -111,14 +121,11 @@ export type AnthropicModel = {
|
|
|
111
121
|
capabilities?: null | AnthropicModelCapabilities;
|
|
112
122
|
max_input_tokens?: number | null;
|
|
113
123
|
max_tokens?: number | null;
|
|
114
|
-
/**
|
|
115
|
-
* Always `"model"` — included for Anthropic API compatibility.
|
|
116
|
-
*/
|
|
117
124
|
type: string;
|
|
118
125
|
};
|
|
119
126
|
|
|
120
127
|
/**
|
|
121
|
-
*
|
|
128
|
+
* Anthropic ModelCapabilities schema.
|
|
122
129
|
*/
|
|
123
130
|
export type AnthropicModelCapabilities = {
|
|
124
131
|
batch: CapabilitySupport;
|
|
@@ -134,6 +141,7 @@ export type AnthropicModelCapabilities = {
|
|
|
134
141
|
|
|
135
142
|
export type ApiAlias = {
|
|
136
143
|
id: string;
|
|
144
|
+
name: string;
|
|
137
145
|
api_format: ApiFormat;
|
|
138
146
|
base_url: string;
|
|
139
147
|
models: ApiModelVec;
|
|
@@ -151,6 +159,7 @@ export type ApiAlias = {
|
|
|
151
159
|
export type ApiAliasResponse = {
|
|
152
160
|
source: string;
|
|
153
161
|
id: string;
|
|
162
|
+
name: string;
|
|
154
163
|
api_format: ApiFormat;
|
|
155
164
|
base_url: string;
|
|
156
165
|
has_api_key: boolean;
|
|
@@ -233,7 +242,29 @@ export type ApiModelRequest = (DefaultApiModelRequest & {
|
|
|
233
242
|
*/
|
|
234
243
|
export type ApiModelVec = Array<ApiModel>;
|
|
235
244
|
|
|
236
|
-
export type AppAccessRequestStatus = 'draft' | 'approved' | 'denied' | 'failed' | 'expired';
|
|
245
|
+
export type AppAccessRequestStatus = 'draft' | 'approved' | 'denied' | 'failed' | 'expired' | 'revoked';
|
|
246
|
+
|
|
247
|
+
/**
|
|
248
|
+
* One issued app token (approved access request) with its effective grant summary.
|
|
249
|
+
*/
|
|
250
|
+
export type AppAccessSummary = {
|
|
251
|
+
id: string;
|
|
252
|
+
app_client_id: string;
|
|
253
|
+
app_name?: string | null;
|
|
254
|
+
app_description?: string | null;
|
|
255
|
+
status: AppAccessRequestStatus;
|
|
256
|
+
approved_role?: null | UserScope;
|
|
257
|
+
/**
|
|
258
|
+
* Effective model access granted to this app.
|
|
259
|
+
*/
|
|
260
|
+
models: ResourceAccess;
|
|
261
|
+
/**
|
|
262
|
+
* Effective MCP access granted to this app.
|
|
263
|
+
*/
|
|
264
|
+
mcps: ResourceAccess;
|
|
265
|
+
created_at: string;
|
|
266
|
+
updated_at: string;
|
|
267
|
+
};
|
|
237
268
|
|
|
238
269
|
/**
|
|
239
270
|
* Application information and status
|
|
@@ -263,6 +294,11 @@ export type AppInfo = {
|
|
|
263
294
|
* Public URL of the server
|
|
264
295
|
*/
|
|
265
296
|
url: string;
|
|
297
|
+
/**
|
|
298
|
+
* Base URL of the external reference API the frontend calls directly (configurable via
|
|
299
|
+
* `BODHI_REFERENCE_API_URL`, env-overridable for tests)
|
|
300
|
+
*/
|
|
301
|
+
reference_api_url: string;
|
|
266
302
|
};
|
|
267
303
|
|
|
268
304
|
export type AppRole = ResourceRole | TokenScope | UserScope;
|
|
@@ -271,9 +307,6 @@ export type AppStatus = 'setup' | 'ready' | 'resource_admin';
|
|
|
271
307
|
|
|
272
308
|
export type ApprovalStatus = 'approved' | 'denied';
|
|
273
309
|
|
|
274
|
-
/**
|
|
275
|
-
* Request for approving an app access request
|
|
276
|
-
*/
|
|
277
310
|
export type ApproveAccessRequest = {
|
|
278
311
|
/**
|
|
279
312
|
* Role to grant for the approved request (scope_user_user or scope_user_power_user)
|
|
@@ -296,33 +329,43 @@ export type ApproveUserAccessRequest = {
|
|
|
296
329
|
};
|
|
297
330
|
|
|
298
331
|
/**
|
|
299
|
-
* Versioned envelope for approved resources.
|
|
300
332
|
* The `version` tag is mandatory and must match the corresponding `RequestedResources` version.
|
|
301
333
|
*/
|
|
302
334
|
export type ApprovedResources = ApprovedResourcesV1 & {
|
|
303
335
|
version: '1';
|
|
304
336
|
};
|
|
305
337
|
|
|
338
|
+
/**
|
|
339
|
+
* What the owner granted at consent. Field names mirror `RequestedResourcesV1`
|
|
340
|
+
* (`models_list` / `models_access` / `mcps_list` / `mcps_access`) — there the
|
|
341
|
+
* values are UI-driver booleans, here they are the actual grants. `mcps` holds
|
|
342
|
+
* the by-url instance approvals; `mcps_access` is the owner-granted set beyond them.
|
|
343
|
+
*/
|
|
306
344
|
export type ApprovedResourcesV1 = {
|
|
345
|
+
models_list?: boolean;
|
|
346
|
+
models_access?: ModelGrant;
|
|
347
|
+
mcps_list?: boolean;
|
|
307
348
|
mcps?: Array<McpApproval>;
|
|
349
|
+
/**
|
|
350
|
+
* Owner-granted MCP instances beyond the by-url requests. Defaults to none
|
|
351
|
+
* (empty `Specific`) — unlike a token's all-access default.
|
|
352
|
+
*/
|
|
353
|
+
mcps_access?: McpGrant;
|
|
308
354
|
};
|
|
309
355
|
|
|
310
356
|
export type AuthCallbackRequest = {
|
|
311
357
|
/**
|
|
312
|
-
*
|
|
358
|
+
* Required for the success flow
|
|
313
359
|
*/
|
|
314
360
|
code?: string | null;
|
|
315
361
|
/**
|
|
316
|
-
*
|
|
362
|
+
* CSRF protection — must match the initiated request
|
|
317
363
|
*/
|
|
318
364
|
state?: string | null;
|
|
319
365
|
/**
|
|
320
366
|
* OAuth error code if authentication failed (e.g., "access_denied")
|
|
321
367
|
*/
|
|
322
368
|
error?: string | null;
|
|
323
|
-
/**
|
|
324
|
-
* Human-readable OAuth error description if authentication failed
|
|
325
|
-
*/
|
|
326
369
|
error_description?: string | null;
|
|
327
370
|
[key: string]: string | (string | null) | (string | null) | (string | null) | (string | null) | undefined;
|
|
328
371
|
};
|
|
@@ -371,9 +414,6 @@ export type BodhiErrorResponse = {
|
|
|
371
414
|
error: BodhiError;
|
|
372
415
|
};
|
|
373
416
|
|
|
374
|
-
/**
|
|
375
|
-
* Whether a single capability is supported by the model.
|
|
376
|
-
*/
|
|
377
417
|
export type CapabilitySupport = {
|
|
378
418
|
supported: boolean;
|
|
379
419
|
};
|
|
@@ -393,9 +433,6 @@ export type ContextLimits = {
|
|
|
393
433
|
max_output_tokens?: number | null;
|
|
394
434
|
};
|
|
395
435
|
|
|
396
|
-
/**
|
|
397
|
-
* Context management capability details.
|
|
398
|
-
*/
|
|
399
436
|
export type ContextManagementCapability = {
|
|
400
437
|
clear_thinking_20251015?: null | CapabilitySupport;
|
|
401
438
|
clear_tool_uses_20250919?: null | CapabilitySupport;
|
|
@@ -406,9 +443,6 @@ export type CopyAliasRequest = {
|
|
|
406
443
|
alias: string;
|
|
407
444
|
};
|
|
408
445
|
|
|
409
|
-
/**
|
|
410
|
-
* Request for creating an app access request
|
|
411
|
-
*/
|
|
412
446
|
export type CreateAccessRequest = {
|
|
413
447
|
/**
|
|
414
448
|
* App client ID from Keycloak
|
|
@@ -433,17 +467,11 @@ export type CreateAccessRequest = {
|
|
|
433
467
|
};
|
|
434
468
|
|
|
435
469
|
export type CreateAccessRequestResponse = {
|
|
436
|
-
/**
|
|
437
|
-
* Access request ID
|
|
438
|
-
*/
|
|
439
470
|
id: string;
|
|
440
471
|
/**
|
|
441
|
-
*
|
|
472
|
+
* Always "draft"
|
|
442
473
|
*/
|
|
443
474
|
status: AppAccessRequestStatus;
|
|
444
|
-
/**
|
|
445
|
-
* Review URL for user to approve/deny
|
|
446
|
-
*/
|
|
447
475
|
review_url: string;
|
|
448
476
|
};
|
|
449
477
|
|
|
@@ -498,6 +526,11 @@ export type CreateTokenRequest = {
|
|
|
498
526
|
* Token scope defining access level
|
|
499
527
|
*/
|
|
500
528
|
scope: TokenScope;
|
|
529
|
+
/**
|
|
530
|
+
* Per-resource grants for this token. Defaults to deny (least-privilege) when
|
|
531
|
+
* omitted — specify grants to widen access.
|
|
532
|
+
*/
|
|
533
|
+
grants?: TokenGrants;
|
|
501
534
|
};
|
|
502
535
|
|
|
503
536
|
/**
|
|
@@ -515,6 +548,10 @@ export type DashboardUser = {
|
|
|
515
548
|
* Shared across `openai`, `openai_responses`, `anthropic`, `anthropic_oauth`, `gemini`.
|
|
516
549
|
*/
|
|
517
550
|
export type DefaultApiModelRequest = {
|
|
551
|
+
/**
|
|
552
|
+
* User-provided descriptive name for this API model
|
|
553
|
+
*/
|
|
554
|
+
name: string;
|
|
518
555
|
/**
|
|
519
556
|
* API base URL
|
|
520
557
|
*/
|
|
@@ -609,6 +646,7 @@ export type DownloadRequest = {
|
|
|
609
646
|
total_bytes?: number | null;
|
|
610
647
|
downloaded_bytes: number;
|
|
611
648
|
started_at?: string | null;
|
|
649
|
+
archived_at?: string | null;
|
|
612
650
|
created_at: string;
|
|
613
651
|
updated_at: string;
|
|
614
652
|
};
|
|
@@ -638,6 +676,19 @@ export type EffortCapability = {
|
|
|
638
676
|
max: CapabilitySupport;
|
|
639
677
|
};
|
|
640
678
|
|
|
679
|
+
/**
|
|
680
|
+
* Per-strategy resilience config for the fallback strategy. Phase 1 persists defaults
|
|
681
|
+
* and does not yet act on them (failover/health land in later phases).
|
|
682
|
+
*/
|
|
683
|
+
export type FallbackConfig = {
|
|
684
|
+
cooldown_secs?: number;
|
|
685
|
+
/**
|
|
686
|
+
* 0 = try the whole chain.
|
|
687
|
+
*/
|
|
688
|
+
max_attempts?: number;
|
|
689
|
+
honor_retry_after?: boolean;
|
|
690
|
+
};
|
|
691
|
+
|
|
641
692
|
/**
|
|
642
693
|
* Request to fetch available models from provider. Discriminated on `api_format`.
|
|
643
694
|
*/
|
|
@@ -685,6 +736,13 @@ export type GeminiModel = {
|
|
|
685
736
|
|
|
686
737
|
export type JsonVec = Array<string>;
|
|
687
738
|
|
|
739
|
+
/**
|
|
740
|
+
* Response for GET /access-requests/apps — the caller's issued app tokens.
|
|
741
|
+
*/
|
|
742
|
+
export type ListAppAccessResponse = {
|
|
743
|
+
data: Array<AppAccessSummary>;
|
|
744
|
+
};
|
|
745
|
+
|
|
688
746
|
export type ListMcpServersResponse = {
|
|
689
747
|
mcp_servers: Array<McpServerResponse>;
|
|
690
748
|
};
|
|
@@ -713,6 +771,10 @@ export type LlmLibertyApiEndpoints = {
|
|
|
713
771
|
* (or `Keep` to leave existing credentials untouched on update).
|
|
714
772
|
*/
|
|
715
773
|
export type LlmLibertyApiModelRequest = {
|
|
774
|
+
/**
|
|
775
|
+
* User-provided descriptive name for this API model
|
|
776
|
+
*/
|
|
777
|
+
name: string;
|
|
716
778
|
/**
|
|
717
779
|
* Envelope update action — Keep (update only) or Set (create/replace credentials).
|
|
718
780
|
*/
|
|
@@ -731,6 +793,9 @@ export type LlmLibertyApiModelRequest = {
|
|
|
731
793
|
forward_all_with_prefix?: boolean;
|
|
732
794
|
};
|
|
733
795
|
|
|
796
|
+
/**
|
|
797
|
+
* Envelope sub-types mirror the llm-liberty JSON contract v1.0.0.
|
|
798
|
+
*/
|
|
734
799
|
export type LlmLibertyAuthSpec = {
|
|
735
800
|
in: string;
|
|
736
801
|
key: string;
|
|
@@ -832,9 +897,6 @@ export type LlmLibertyTestPromptRequest = {
|
|
|
832
897
|
prompt: string;
|
|
833
898
|
};
|
|
834
899
|
|
|
835
|
-
/**
|
|
836
|
-
* Local model file response
|
|
837
|
-
*/
|
|
838
900
|
export type LocalModelResponse = {
|
|
839
901
|
repo: string;
|
|
840
902
|
filename: string;
|
|
@@ -848,46 +910,22 @@ export type LocalModelResponse = {
|
|
|
848
910
|
* User-owned MCP server instance.
|
|
849
911
|
*/
|
|
850
912
|
export type Mcp = {
|
|
851
|
-
/**
|
|
852
|
-
* Unique instance identifier (UUID)
|
|
853
|
-
*/
|
|
854
913
|
id: string;
|
|
855
914
|
/**
|
|
856
915
|
* Server info resolved via JOIN
|
|
857
916
|
*/
|
|
858
917
|
mcp_server: McpServerInfo;
|
|
859
|
-
/**
|
|
860
|
-
* User-defined slug for this instance
|
|
861
|
-
*/
|
|
862
918
|
slug: string;
|
|
863
|
-
/**
|
|
864
|
-
* Human-readable name
|
|
865
|
-
*/
|
|
866
919
|
name: string;
|
|
867
|
-
/**
|
|
868
|
-
* Optional description for this instance
|
|
869
|
-
*/
|
|
870
920
|
description?: string | null;
|
|
871
|
-
/**
|
|
872
|
-
* Whether this instance is enabled
|
|
873
|
-
*/
|
|
874
921
|
enabled: boolean;
|
|
875
|
-
/**
|
|
876
|
-
* MCP proxy path for this instance
|
|
877
|
-
*/
|
|
878
922
|
path: string;
|
|
879
923
|
auth_type: McpAuthType;
|
|
880
924
|
/**
|
|
881
925
|
* Reference to the auth config (mcp_auth_configs.id)
|
|
882
926
|
*/
|
|
883
927
|
auth_config_id?: string | null;
|
|
884
|
-
/**
|
|
885
|
-
* When this instance was created
|
|
886
|
-
*/
|
|
887
928
|
created_at: string;
|
|
888
|
-
/**
|
|
889
|
-
* When this instance was last updated
|
|
890
|
-
*/
|
|
891
929
|
updated_at: string;
|
|
892
930
|
};
|
|
893
931
|
|
|
@@ -950,6 +988,9 @@ export type McpAuthConfigsListResponse = {
|
|
|
950
988
|
auth_configs: Array<McpAuthConfigResponse>;
|
|
951
989
|
};
|
|
952
990
|
|
|
991
|
+
/**
|
|
992
|
+
* Masked auth param response.
|
|
993
|
+
*/
|
|
953
994
|
export type McpAuthParam = {
|
|
954
995
|
id: string;
|
|
955
996
|
param_type: McpAuthParamType;
|
|
@@ -967,6 +1008,22 @@ export type McpAuthParamType = 'header' | 'query';
|
|
|
967
1008
|
|
|
968
1009
|
export type McpAuthType = 'public' | 'header' | 'oauth';
|
|
969
1010
|
|
|
1011
|
+
/**
|
|
1012
|
+
* MCP connect grant. `All` is a wildcard (incl. future MCPs); `Specific` lists
|
|
1013
|
+
* the user's own instance ids (empty ⇒ no MCP access).
|
|
1014
|
+
*
|
|
1015
|
+
* Defaults to **least-privilege** (empty `Specific` ⇒ deny), symmetric with
|
|
1016
|
+
* `ModelGrant`: an unspecified or legacy grant grants nothing, so a stored
|
|
1017
|
+
* payload that omits `mcps` cannot silently grant every MCP. All-access must be
|
|
1018
|
+
* requested explicitly via `McpGrant::All`.
|
|
1019
|
+
*/
|
|
1020
|
+
export type McpGrant = {
|
|
1021
|
+
type: 'all';
|
|
1022
|
+
} | {
|
|
1023
|
+
ids: Array<string>;
|
|
1024
|
+
type: 'specific';
|
|
1025
|
+
};
|
|
1026
|
+
|
|
970
1027
|
export type McpInstance = {
|
|
971
1028
|
id: string;
|
|
972
1029
|
/**
|
|
@@ -979,84 +1036,44 @@ export type McpInstance = {
|
|
|
979
1036
|
* Input for creating or updating an MCP instance.
|
|
980
1037
|
*/
|
|
981
1038
|
export type McpRequest = {
|
|
982
|
-
/**
|
|
983
|
-
* Human-readable name (required)
|
|
984
|
-
*/
|
|
985
1039
|
name: string;
|
|
986
1040
|
/**
|
|
987
|
-
*
|
|
1041
|
+
* 1-24 chars, alphanumeric + hyphens.
|
|
988
1042
|
*/
|
|
989
1043
|
slug: string;
|
|
990
1044
|
/**
|
|
991
|
-
*
|
|
1045
|
+
* Required for create, ignored for update.
|
|
992
1046
|
*/
|
|
993
1047
|
mcp_server_id?: string | null;
|
|
994
|
-
/**
|
|
995
|
-
* Optional description
|
|
996
|
-
*/
|
|
997
1048
|
description?: string | null;
|
|
998
|
-
/**
|
|
999
|
-
* Whether this instance is enabled
|
|
1000
|
-
*/
|
|
1001
1049
|
enabled: boolean;
|
|
1002
|
-
/**
|
|
1003
|
-
* Authentication type
|
|
1004
|
-
*/
|
|
1005
1050
|
auth_type?: McpAuthType;
|
|
1006
|
-
/**
|
|
1007
|
-
* Reference to auth config
|
|
1008
|
-
*/
|
|
1009
1051
|
auth_config_id?: string | null;
|
|
1010
1052
|
/**
|
|
1011
|
-
* Instance-level
|
|
1053
|
+
* Instance-level values for the auth config's key definitions.
|
|
1012
1054
|
*/
|
|
1013
1055
|
credentials?: Array<McpAuthParamInput> | null;
|
|
1014
1056
|
/**
|
|
1015
|
-
* OAuth token ID to link to this MCP instance (set after OAuth flow)
|
|
1057
|
+
* OAuth token ID to link to this MCP instance (set after OAuth flow).
|
|
1016
1058
|
*/
|
|
1017
1059
|
oauth_token_id?: string | null;
|
|
1018
1060
|
};
|
|
1019
1061
|
|
|
1020
1062
|
/**
|
|
1021
|
-
* Admin-managed MCP server registry entry.
|
|
1022
|
-
* Admins/managers register MCP server URLs that users can then create instances of.
|
|
1063
|
+
* Admin-managed MCP server registry entry that users create instances of.
|
|
1023
1064
|
*/
|
|
1024
1065
|
export type McpServer = {
|
|
1025
|
-
/**
|
|
1026
|
-
* Unique identifier (UUID)
|
|
1027
|
-
*/
|
|
1028
1066
|
id: string;
|
|
1029
1067
|
/**
|
|
1030
1068
|
* MCP server endpoint URL (trimmed, case-insensitive unique)
|
|
1031
1069
|
*/
|
|
1032
1070
|
url: string;
|
|
1033
|
-
/**
|
|
1034
|
-
* Human-readable display name
|
|
1035
|
-
*/
|
|
1036
1071
|
name: string;
|
|
1037
|
-
/**
|
|
1038
|
-
* Optional description
|
|
1039
|
-
*/
|
|
1040
1072
|
description?: string | null;
|
|
1041
|
-
/**
|
|
1042
|
-
* Whether this MCP server is enabled
|
|
1043
|
-
*/
|
|
1044
1073
|
enabled: boolean;
|
|
1045
|
-
/**
|
|
1046
|
-
* User who created this entry
|
|
1047
|
-
*/
|
|
1048
1074
|
created_by: string;
|
|
1049
|
-
/**
|
|
1050
|
-
* User who last updated this entry
|
|
1051
|
-
*/
|
|
1052
1075
|
updated_by: string;
|
|
1053
|
-
/**
|
|
1054
|
-
* When this entry was created
|
|
1055
|
-
*/
|
|
1056
1076
|
created_at: string;
|
|
1057
|
-
/**
|
|
1058
|
-
* When this entry was last updated
|
|
1059
|
-
*/
|
|
1060
1077
|
updated_at: string;
|
|
1061
1078
|
};
|
|
1062
1079
|
|
|
@@ -1075,20 +1092,11 @@ export type McpServerInfo = {
|
|
|
1075
1092
|
*/
|
|
1076
1093
|
export type McpServerRequest = {
|
|
1077
1094
|
/**
|
|
1078
|
-
* MCP server endpoint URL (trimmed, case-insensitive unique)
|
|
1095
|
+
* MCP server endpoint URL (trimmed, case-insensitive unique).
|
|
1079
1096
|
*/
|
|
1080
1097
|
url: string;
|
|
1081
|
-
/**
|
|
1082
|
-
* Human-readable display name
|
|
1083
|
-
*/
|
|
1084
1098
|
name: string;
|
|
1085
|
-
/**
|
|
1086
|
-
* Optional description
|
|
1087
|
-
*/
|
|
1088
1099
|
description?: string | null;
|
|
1089
|
-
/**
|
|
1090
|
-
* Whether this MCP server is enabled
|
|
1091
|
-
*/
|
|
1092
1100
|
enabled: boolean;
|
|
1093
1101
|
auth_config?: null | CreateMcpAuthConfigRequest;
|
|
1094
1102
|
};
|
|
@@ -1103,9 +1111,6 @@ export type McpServerResponse = McpServer & {
|
|
|
1103
1111
|
};
|
|
1104
1112
|
|
|
1105
1113
|
export type McpServerReviewInfo = {
|
|
1106
|
-
/**
|
|
1107
|
-
* Requested MCP server URL
|
|
1108
|
-
*/
|
|
1109
1114
|
url: string;
|
|
1110
1115
|
/**
|
|
1111
1116
|
* User's MCP instances connected to this server URL
|
|
@@ -1151,6 +1156,10 @@ export type ModelAliasResponse = {
|
|
|
1151
1156
|
repo: string;
|
|
1152
1157
|
filename: string;
|
|
1153
1158
|
snapshot: string;
|
|
1159
|
+
/**
|
|
1160
|
+
* Local GGUF file size in bytes (present when the file is resolvable on disk)
|
|
1161
|
+
*/
|
|
1162
|
+
size?: number | null;
|
|
1154
1163
|
metadata?: null | ModelMetadata;
|
|
1155
1164
|
};
|
|
1156
1165
|
|
|
@@ -1168,6 +1177,21 @@ export type ModelCapabilities = {
|
|
|
1168
1177
|
tools: ToolCapabilities;
|
|
1169
1178
|
};
|
|
1170
1179
|
|
|
1180
|
+
/**
|
|
1181
|
+
* Model inference grant. `All` is a wildcard that includes models added in the
|
|
1182
|
+
* future; `Specific` lists alias ids (empty ⇒ no model access).
|
|
1183
|
+
*
|
|
1184
|
+
* Defaults to **least-privilege** (empty `Specific` ⇒ deny): an unspecified or
|
|
1185
|
+
* legacy grant grants nothing. All-access must be requested explicitly via
|
|
1186
|
+
* `ModelGrant::All`. Symmetric with `ApprovedResourcesV1`'s empty-MCP default.
|
|
1187
|
+
*/
|
|
1188
|
+
export type ModelGrant = {
|
|
1189
|
+
type: 'all';
|
|
1190
|
+
} | {
|
|
1191
|
+
ids: Array<string>;
|
|
1192
|
+
type: 'specific';
|
|
1193
|
+
};
|
|
1194
|
+
|
|
1171
1195
|
/**
|
|
1172
1196
|
* Model metadata for API responses
|
|
1173
1197
|
*/
|
|
@@ -1178,6 +1202,48 @@ export type ModelMetadata = {
|
|
|
1178
1202
|
chat_template?: string | null;
|
|
1179
1203
|
};
|
|
1180
1204
|
|
|
1205
|
+
/**
|
|
1206
|
+
* A composite alias that fronts an ordered list of targets and routes a chat
|
|
1207
|
+
* request through them via a pluggable strategy. v1 ships only the fallback strategy.
|
|
1208
|
+
*/
|
|
1209
|
+
export type ModelRouterAlias = {
|
|
1210
|
+
id: string;
|
|
1211
|
+
/**
|
|
1212
|
+
* User-facing model name, unique across all alias kinds.
|
|
1213
|
+
*/
|
|
1214
|
+
alias: string;
|
|
1215
|
+
/**
|
|
1216
|
+
* Ordered list of targets; order is the fallback priority.
|
|
1217
|
+
*/
|
|
1218
|
+
targets: Array<RouterTarget>;
|
|
1219
|
+
strategy: RoutingStrategyConfig;
|
|
1220
|
+
created_at: string;
|
|
1221
|
+
updated_at: string;
|
|
1222
|
+
};
|
|
1223
|
+
|
|
1224
|
+
/**
|
|
1225
|
+
* Input request for creating or updating a model-router. Used as `ValidatedJson` in handlers
|
|
1226
|
+
* for both create and update (PUT). A zero-target or all-disabled router is allowed to save.
|
|
1227
|
+
*/
|
|
1228
|
+
export type ModelRouterRequest = {
|
|
1229
|
+
alias: string;
|
|
1230
|
+
targets?: Array<RouterTargetRequest>;
|
|
1231
|
+
strategy?: RoutingStrategyConfig;
|
|
1232
|
+
};
|
|
1233
|
+
|
|
1234
|
+
/**
|
|
1235
|
+
* API response for model-router aliases.
|
|
1236
|
+
*/
|
|
1237
|
+
export type ModelRouterResponse = {
|
|
1238
|
+
source: string;
|
|
1239
|
+
id: string;
|
|
1240
|
+
alias: string;
|
|
1241
|
+
targets: Array<RouterTarget>;
|
|
1242
|
+
strategy: RoutingStrategyConfig;
|
|
1243
|
+
created_at: string;
|
|
1244
|
+
updated_at: string;
|
|
1245
|
+
};
|
|
1246
|
+
|
|
1181
1247
|
/**
|
|
1182
1248
|
* Request for creating a new download request
|
|
1183
1249
|
*/
|
|
@@ -1201,6 +1267,7 @@ export type OaiRequestParams = {
|
|
|
1201
1267
|
temperature?: number | null;
|
|
1202
1268
|
top_p?: number | null;
|
|
1203
1269
|
user?: string | null;
|
|
1270
|
+
system_prompt?: string | null;
|
|
1204
1271
|
};
|
|
1205
1272
|
|
|
1206
1273
|
export type OAuthDiscoverAsRequest = {
|
|
@@ -1273,9 +1340,6 @@ export type PaginatedDownloadResponse = {
|
|
|
1273
1340
|
page_size: number;
|
|
1274
1341
|
};
|
|
1275
1342
|
|
|
1276
|
-
/**
|
|
1277
|
-
* Paginated list of local model files
|
|
1278
|
-
*/
|
|
1279
1343
|
export type PaginatedLocalModelResponse = {
|
|
1280
1344
|
data: Array<LocalModelResponse>;
|
|
1281
1345
|
total: number;
|
|
@@ -1354,9 +1418,6 @@ export type PingResponse = {
|
|
|
1354
1418
|
message: string;
|
|
1355
1419
|
};
|
|
1356
1420
|
|
|
1357
|
-
/**
|
|
1358
|
-
* Response for queue status operations
|
|
1359
|
-
*/
|
|
1360
1421
|
export type QueueStatusResponse = {
|
|
1361
1422
|
/**
|
|
1362
1423
|
* Queue status ("idle" or "processing")
|
|
@@ -1421,19 +1482,112 @@ export type RequestedMcpServer = {
|
|
|
1421
1482
|
};
|
|
1422
1483
|
|
|
1423
1484
|
/**
|
|
1424
|
-
* Versioned envelope for requested resources.
|
|
1425
1485
|
* The `version` tag is mandatory — clients must specify which version they are using.
|
|
1426
1486
|
*/
|
|
1427
1487
|
export type RequestedResources = RequestedResourcesV1 & {
|
|
1428
1488
|
version: '1';
|
|
1429
1489
|
};
|
|
1430
1490
|
|
|
1491
|
+
/**
|
|
1492
|
+
* What the external app asks for. The four booleans are **UI drivers**: they tell
|
|
1493
|
+
* the consent screen which controls to render (the owner decides the actual grant).
|
|
1494
|
+
* Fields are domain-first (`models_*` / `mcps_*`), matching `ApprovedResourcesV1`.
|
|
1495
|
+
* `mcp_servers` is the existing by-url MCP request and is unchanged.
|
|
1496
|
+
*
|
|
1497
|
+
* `models_access` defaults to **true**: unless the app explicitly opts out
|
|
1498
|
+
* (`models_access: false`), the consent screen shows the model-access selector so
|
|
1499
|
+
* the owner can always scope models. (The other UI-driver flags default to false.)
|
|
1500
|
+
*/
|
|
1431
1501
|
export type RequestedResourcesV1 = {
|
|
1502
|
+
/**
|
|
1503
|
+
* Render the "list all models" toggle.
|
|
1504
|
+
*/
|
|
1505
|
+
models_list?: boolean;
|
|
1506
|
+
/**
|
|
1507
|
+
* Render the model All/Specific access selector. Defaults to `true` (shown).
|
|
1508
|
+
*/
|
|
1509
|
+
models_access?: boolean;
|
|
1510
|
+
/**
|
|
1511
|
+
* Render the "list all MCPs" toggle.
|
|
1512
|
+
*/
|
|
1513
|
+
mcps_list?: boolean;
|
|
1514
|
+
/**
|
|
1515
|
+
* Render the owner-extra MCP All/Specific access selector.
|
|
1516
|
+
*/
|
|
1517
|
+
mcps_access?: boolean;
|
|
1432
1518
|
mcp_servers?: Array<RequestedMcpServer>;
|
|
1433
1519
|
};
|
|
1434
1520
|
|
|
1521
|
+
/**
|
|
1522
|
+
* Effective access to a class of resources (models or MCPs) for an API token,
|
|
1523
|
+
* reflected from its grants. Discriminated on `type`: `all` ⇒ every current and
|
|
1524
|
+
* future resource; `specific` ⇒ the listed `ids` (empty ⇒ no access).
|
|
1525
|
+
* `list` is the `list_*` toggle (whether the token may enumerate the full catalog).
|
|
1526
|
+
*/
|
|
1527
|
+
export type ResourceAccess = {
|
|
1528
|
+
list: boolean;
|
|
1529
|
+
type: 'all';
|
|
1530
|
+
} | {
|
|
1531
|
+
list: boolean;
|
|
1532
|
+
ids: Array<string>;
|
|
1533
|
+
type: 'specific';
|
|
1534
|
+
};
|
|
1535
|
+
|
|
1536
|
+
/**
|
|
1537
|
+
* Effective resource access for a token-bearing principal (API token or external
|
|
1538
|
+
* app), reflected from its grants. Reported uniformly via the `access` envelope
|
|
1539
|
+
* field for both principals.
|
|
1540
|
+
*/
|
|
1541
|
+
export type ResourceAccessInfo = {
|
|
1542
|
+
/**
|
|
1543
|
+
* Effective model access for this principal.
|
|
1544
|
+
*/
|
|
1545
|
+
models: ResourceAccess;
|
|
1546
|
+
/**
|
|
1547
|
+
* Effective MCP access for this principal.
|
|
1548
|
+
*/
|
|
1549
|
+
mcps: ResourceAccess;
|
|
1550
|
+
};
|
|
1551
|
+
|
|
1435
1552
|
export type ResourceRole = 'resource_anonymous' | 'resource_guest' | 'resource_user' | 'resource_power_user' | 'resource_manager' | 'resource_admin';
|
|
1436
1553
|
|
|
1554
|
+
/**
|
|
1555
|
+
* One target in a model-router: a reference to an existing alias plus a pinned model.
|
|
1556
|
+
*/
|
|
1557
|
+
export type RouterTarget = {
|
|
1558
|
+
/**
|
|
1559
|
+
* Name of an existing user/model/api alias (NOT a model-router).
|
|
1560
|
+
*/
|
|
1561
|
+
alias: string;
|
|
1562
|
+
/**
|
|
1563
|
+
* Concrete model placed into `request["model"]` when forwarding to this target.
|
|
1564
|
+
*/
|
|
1565
|
+
model: string;
|
|
1566
|
+
/**
|
|
1567
|
+
* Whether this target is part of the active sequence. Disabled targets are never
|
|
1568
|
+
* attempted but keep their config and position. Defaults to enabled.
|
|
1569
|
+
*/
|
|
1570
|
+
enabled?: boolean;
|
|
1571
|
+
/**
|
|
1572
|
+
* SEAM (reserved): ignored by Fallback; used by a future weighted strategy.
|
|
1573
|
+
*/
|
|
1574
|
+
weight?: number | null;
|
|
1575
|
+
};
|
|
1576
|
+
|
|
1577
|
+
export type RouterTargetRequest = {
|
|
1578
|
+
alias: string;
|
|
1579
|
+
model: string;
|
|
1580
|
+
enabled?: boolean;
|
|
1581
|
+
weight?: number | null;
|
|
1582
|
+
};
|
|
1583
|
+
|
|
1584
|
+
/**
|
|
1585
|
+
* `{"strategy":"fallback", ...}` — try targets in order, first success wins.
|
|
1586
|
+
*/
|
|
1587
|
+
export type RoutingStrategyConfig = FallbackConfig & {
|
|
1588
|
+
strategy: 'fallback';
|
|
1589
|
+
};
|
|
1590
|
+
|
|
1437
1591
|
export type SettingInfo = {
|
|
1438
1592
|
key: string;
|
|
1439
1593
|
current_value: unknown;
|
|
@@ -1537,17 +1691,11 @@ export type TestPromptResponse = {
|
|
|
1537
1691
|
error?: string | null;
|
|
1538
1692
|
};
|
|
1539
1693
|
|
|
1540
|
-
/**
|
|
1541
|
-
* Thinking capability and supported type configurations.
|
|
1542
|
-
*/
|
|
1543
1694
|
export type ThinkingCapability = {
|
|
1544
1695
|
supported: boolean;
|
|
1545
1696
|
types: ThinkingTypes;
|
|
1546
1697
|
};
|
|
1547
1698
|
|
|
1548
|
-
/**
|
|
1549
|
-
* Supported thinking type configurations.
|
|
1550
|
-
*/
|
|
1551
1699
|
export type ThinkingTypes = {
|
|
1552
1700
|
adaptive: CapabilitySupport;
|
|
1553
1701
|
enabled: CapabilitySupport;
|
|
@@ -1567,32 +1715,58 @@ export type TokenDetail = {
|
|
|
1567
1715
|
token_prefix: string;
|
|
1568
1716
|
scopes: string;
|
|
1569
1717
|
status: TokenStatus;
|
|
1718
|
+
/**
|
|
1719
|
+
* Per-resource grants this token carries.
|
|
1720
|
+
*/
|
|
1721
|
+
grants: TokenGrants;
|
|
1722
|
+
last_used_at?: string | null;
|
|
1570
1723
|
created_at: string;
|
|
1571
1724
|
updated_at: string;
|
|
1572
1725
|
};
|
|
1573
1726
|
|
|
1574
1727
|
/**
|
|
1575
|
-
*
|
|
1728
|
+
* Versioned envelope; the `version` tag is mandatory (mirrors `ApprovedResources`).
|
|
1576
1729
|
*/
|
|
1577
|
-
export type
|
|
1578
|
-
|
|
1730
|
+
export type TokenGrants = TokenGrantsV1 & {
|
|
1731
|
+
version: '1';
|
|
1579
1732
|
};
|
|
1580
1733
|
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1734
|
+
/**
|
|
1735
|
+
* Per-resource grants carried by an API token. Listing (`models_list` /
|
|
1736
|
+
* `mcps_list`) is separate from inference/connect: with listing off the
|
|
1737
|
+
* discovery endpoints return an empty set, but inference on an individually
|
|
1738
|
+
* granted resource still succeeds.
|
|
1739
|
+
*
|
|
1740
|
+
* Intentionally standalone — NOT shared with the App-access-request envelope
|
|
1741
|
+
* (`ApprovedResources`); the two may diverge.
|
|
1742
|
+
*/
|
|
1743
|
+
export type TokenGrantsV1 = {
|
|
1744
|
+
models_list?: boolean;
|
|
1745
|
+
models?: ModelGrant;
|
|
1746
|
+
mcps_list?: boolean;
|
|
1747
|
+
mcps?: McpGrant;
|
|
1748
|
+
};
|
|
1749
|
+
|
|
1750
|
+
/**
|
|
1751
|
+
* API Token information response. Effective model/MCP access is reported uniformly
|
|
1752
|
+
* via the envelope's `access` field (same shape as external apps), not inline here.
|
|
1753
|
+
*/
|
|
1754
|
+
export type TokenInfo = {
|
|
1755
|
+
role: TokenScope;
|
|
1756
|
+
};
|
|
1757
|
+
|
|
1758
|
+
export type TokenScope = 'scope_token_user' | 'scope_token_power_user';
|
|
1759
|
+
|
|
1760
|
+
export type TokenStatus = 'active' | 'inactive';
|
|
1584
1761
|
|
|
1585
1762
|
export type ToolCapabilities = {
|
|
1586
1763
|
function_calling?: boolean | null;
|
|
1587
1764
|
structured_output?: boolean | null;
|
|
1588
1765
|
};
|
|
1589
1766
|
|
|
1590
|
-
/**
|
|
1591
|
-
* Request to update a setting value
|
|
1592
|
-
*/
|
|
1593
1767
|
export type UpdateSettingRequest = {
|
|
1594
1768
|
/**
|
|
1595
|
-
*
|
|
1769
|
+
* type depends on setting metadata
|
|
1596
1770
|
*/
|
|
1597
1771
|
value: unknown;
|
|
1598
1772
|
};
|
|
@@ -1699,6 +1873,10 @@ export type UserAliasResponse = {
|
|
|
1699
1873
|
context_params: Array<string>;
|
|
1700
1874
|
created_at: string;
|
|
1701
1875
|
updated_at: string;
|
|
1876
|
+
/**
|
|
1877
|
+
* Local GGUF file size in bytes (present when the file is resolvable on disk)
|
|
1878
|
+
*/
|
|
1879
|
+
size?: number | null;
|
|
1702
1880
|
metadata?: null | ModelMetadata;
|
|
1703
1881
|
};
|
|
1704
1882
|
|
|
@@ -1708,6 +1886,11 @@ export type UserInfo = {
|
|
|
1708
1886
|
first_name?: string | null;
|
|
1709
1887
|
last_name?: string | null;
|
|
1710
1888
|
role?: null | AppRole;
|
|
1889
|
+
/**
|
|
1890
|
+
* OIDC id_token for the active session, when present. Used by the frontend to
|
|
1891
|
+
* authenticate direct calls to the external reference API. Omitted for token/exchange auth.
|
|
1892
|
+
*/
|
|
1893
|
+
id_token?: string | null;
|
|
1711
1894
|
};
|
|
1712
1895
|
|
|
1713
1896
|
/**
|
|
@@ -1715,6 +1898,7 @@ export type UserInfo = {
|
|
|
1715
1898
|
*/
|
|
1716
1899
|
export type UserInfoEnvelope = UserResponse & {
|
|
1717
1900
|
dashboard?: null | DashboardUser;
|
|
1901
|
+
access?: null | ResourceAccessInfo;
|
|
1718
1902
|
};
|
|
1719
1903
|
|
|
1720
1904
|
export type UserListResponse = {
|
|
@@ -1795,6 +1979,43 @@ export type ListAllAccessRequestsResponses = {
|
|
|
1795
1979
|
|
|
1796
1980
|
export type ListAllAccessRequestsResponse = ListAllAccessRequestsResponses[keyof ListAllAccessRequestsResponses];
|
|
1797
1981
|
|
|
1982
|
+
export type ListAppAccessData = {
|
|
1983
|
+
body?: never;
|
|
1984
|
+
path?: never;
|
|
1985
|
+
query?: never;
|
|
1986
|
+
url: '/bodhi/v1/access-requests/apps';
|
|
1987
|
+
};
|
|
1988
|
+
|
|
1989
|
+
export type ListAppAccessErrors = {
|
|
1990
|
+
/**
|
|
1991
|
+
* Invalid request parameters
|
|
1992
|
+
*/
|
|
1993
|
+
400: BodhiErrorResponse;
|
|
1994
|
+
/**
|
|
1995
|
+
* Not authenticated
|
|
1996
|
+
*/
|
|
1997
|
+
401: BodhiErrorResponse;
|
|
1998
|
+
/**
|
|
1999
|
+
* Insufficient permissions
|
|
2000
|
+
*/
|
|
2001
|
+
403: BodhiErrorResponse;
|
|
2002
|
+
/**
|
|
2003
|
+
* Internal server error
|
|
2004
|
+
*/
|
|
2005
|
+
500: BodhiErrorResponse;
|
|
2006
|
+
};
|
|
2007
|
+
|
|
2008
|
+
export type ListAppAccessError = ListAppAccessErrors[keyof ListAppAccessErrors];
|
|
2009
|
+
|
|
2010
|
+
export type ListAppAccessResponses = {
|
|
2011
|
+
/**
|
|
2012
|
+
* Issued app tokens
|
|
2013
|
+
*/
|
|
2014
|
+
200: ListAppAccessResponse;
|
|
2015
|
+
};
|
|
2016
|
+
|
|
2017
|
+
export type ListAppAccessResponse2 = ListAppAccessResponses[keyof ListAppAccessResponses];
|
|
2018
|
+
|
|
1798
2019
|
export type ListPendingAccessRequestsData = {
|
|
1799
2020
|
body?: never;
|
|
1800
2021
|
path?: never;
|
|
@@ -2093,6 +2314,56 @@ export type GetAccessRequestReviewResponses = {
|
|
|
2093
2314
|
|
|
2094
2315
|
export type GetAccessRequestReviewResponse = GetAccessRequestReviewResponses[keyof GetAccessRequestReviewResponses];
|
|
2095
2316
|
|
|
2317
|
+
export type RevokeAppAccessData = {
|
|
2318
|
+
body?: never;
|
|
2319
|
+
path: {
|
|
2320
|
+
/**
|
|
2321
|
+
* Access request ID
|
|
2322
|
+
*/
|
|
2323
|
+
id: string;
|
|
2324
|
+
};
|
|
2325
|
+
query?: never;
|
|
2326
|
+
url: '/bodhi/v1/access-requests/{id}/revoke';
|
|
2327
|
+
};
|
|
2328
|
+
|
|
2329
|
+
export type RevokeAppAccessErrors = {
|
|
2330
|
+
/**
|
|
2331
|
+
* Invalid request parameters
|
|
2332
|
+
*/
|
|
2333
|
+
400: BodhiErrorResponse;
|
|
2334
|
+
/**
|
|
2335
|
+
* Not authenticated
|
|
2336
|
+
*/
|
|
2337
|
+
401: BodhiErrorResponse;
|
|
2338
|
+
/**
|
|
2339
|
+
* Insufficient permissions
|
|
2340
|
+
*/
|
|
2341
|
+
403: BodhiErrorResponse;
|
|
2342
|
+
/**
|
|
2343
|
+
* Not found
|
|
2344
|
+
*/
|
|
2345
|
+
404: BodhiErrorResponse;
|
|
2346
|
+
/**
|
|
2347
|
+
* Not in a revocable state
|
|
2348
|
+
*/
|
|
2349
|
+
409: BodhiErrorResponse;
|
|
2350
|
+
/**
|
|
2351
|
+
* Internal server error
|
|
2352
|
+
*/
|
|
2353
|
+
500: BodhiErrorResponse;
|
|
2354
|
+
};
|
|
2355
|
+
|
|
2356
|
+
export type RevokeAppAccessError = RevokeAppAccessErrors[keyof RevokeAppAccessErrors];
|
|
2357
|
+
|
|
2358
|
+
export type RevokeAppAccessResponses = {
|
|
2359
|
+
/**
|
|
2360
|
+
* Grant revoked
|
|
2361
|
+
*/
|
|
2362
|
+
200: AppAccessSummary;
|
|
2363
|
+
};
|
|
2364
|
+
|
|
2365
|
+
export type RevokeAppAccessResponse = RevokeAppAccessResponses[keyof RevokeAppAccessResponses];
|
|
2366
|
+
|
|
2096
2367
|
export type GetAccessRequestStatusData = {
|
|
2097
2368
|
body?: never;
|
|
2098
2369
|
path: {
|
|
@@ -3420,6 +3691,34 @@ export type ListAllModelsData = {
|
|
|
3420
3691
|
* Sort order: 'asc' for ascending, 'desc' for descending
|
|
3421
3692
|
*/
|
|
3422
3693
|
sort_order?: string;
|
|
3694
|
+
/**
|
|
3695
|
+
* Alias type facet (comma-separated): `local_file`, `model_alias`, `api_model`, `fallback`.
|
|
3696
|
+
*/
|
|
3697
|
+
type?: string;
|
|
3698
|
+
/**
|
|
3699
|
+
* API-format facet (comma-separated), API rows only: `openai`, `responses`, `anthropic`,
|
|
3700
|
+
* `gemini`, `liberty`. `anthropic` matches both anthropic and anthropic_oauth aliases.
|
|
3701
|
+
*/
|
|
3702
|
+
api_format?: string;
|
|
3703
|
+
/**
|
|
3704
|
+
* Minimum local-file size in bytes (inclusive). Applies to local rows with a known size;
|
|
3705
|
+
* rows without a size (API/router) are not filtered out by size.
|
|
3706
|
+
*/
|
|
3707
|
+
size_min?: number;
|
|
3708
|
+
/**
|
|
3709
|
+
* Maximum local-file size in bytes (inclusive). See `size_min`.
|
|
3710
|
+
*/
|
|
3711
|
+
size_max?: number;
|
|
3712
|
+
/**
|
|
3713
|
+
* Capability facet (comma-separated), local rows only: `vision`, `tool_use`, `reasoning`.
|
|
3714
|
+
* A row passes only if it has metadata with every requested capability set true.
|
|
3715
|
+
*/
|
|
3716
|
+
capability?: string;
|
|
3717
|
+
/**
|
|
3718
|
+
* Free-text search (case-insensitive substring) over a row's identifying fields — alias/name,
|
|
3719
|
+
* repo, filename for local rows; id, name, base_url for API rows; alias for routers.
|
|
3720
|
+
*/
|
|
3721
|
+
search?: string;
|
|
3423
3722
|
};
|
|
3424
3723
|
url: '/bodhi/v1/models';
|
|
3425
3724
|
};
|
|
@@ -4157,6 +4456,98 @@ export type GetDownloadStatusResponses = {
|
|
|
4157
4456
|
|
|
4158
4457
|
export type GetDownloadStatusResponse = GetDownloadStatusResponses[keyof GetDownloadStatusResponses];
|
|
4159
4458
|
|
|
4459
|
+
export type ArchiveDownloadData = {
|
|
4460
|
+
body?: never;
|
|
4461
|
+
path: {
|
|
4462
|
+
/**
|
|
4463
|
+
* Unique identifier of the download request
|
|
4464
|
+
*/
|
|
4465
|
+
id: string;
|
|
4466
|
+
};
|
|
4467
|
+
query?: never;
|
|
4468
|
+
url: '/bodhi/v1/models/files/pull/{id}/archive';
|
|
4469
|
+
};
|
|
4470
|
+
|
|
4471
|
+
export type ArchiveDownloadErrors = {
|
|
4472
|
+
/**
|
|
4473
|
+
* Invalid request parameters
|
|
4474
|
+
*/
|
|
4475
|
+
400: BodhiErrorResponse;
|
|
4476
|
+
/**
|
|
4477
|
+
* Not authenticated
|
|
4478
|
+
*/
|
|
4479
|
+
401: BodhiErrorResponse;
|
|
4480
|
+
/**
|
|
4481
|
+
* Insufficient permissions
|
|
4482
|
+
*/
|
|
4483
|
+
403: BodhiErrorResponse;
|
|
4484
|
+
/**
|
|
4485
|
+
* Download request not found
|
|
4486
|
+
*/
|
|
4487
|
+
404: BodhiErrorResponse;
|
|
4488
|
+
/**
|
|
4489
|
+
* Internal server error
|
|
4490
|
+
*/
|
|
4491
|
+
500: BodhiErrorResponse;
|
|
4492
|
+
};
|
|
4493
|
+
|
|
4494
|
+
export type ArchiveDownloadError = ArchiveDownloadErrors[keyof ArchiveDownloadErrors];
|
|
4495
|
+
|
|
4496
|
+
export type ArchiveDownloadResponses = {
|
|
4497
|
+
/**
|
|
4498
|
+
* Download request archived
|
|
4499
|
+
*/
|
|
4500
|
+
200: DownloadRequest;
|
|
4501
|
+
};
|
|
4502
|
+
|
|
4503
|
+
export type ArchiveDownloadResponse = ArchiveDownloadResponses[keyof ArchiveDownloadResponses];
|
|
4504
|
+
|
|
4505
|
+
export type RetryDownloadData = {
|
|
4506
|
+
body?: never;
|
|
4507
|
+
path: {
|
|
4508
|
+
/**
|
|
4509
|
+
* Unique identifier of the download request
|
|
4510
|
+
*/
|
|
4511
|
+
id: string;
|
|
4512
|
+
};
|
|
4513
|
+
query?: never;
|
|
4514
|
+
url: '/bodhi/v1/models/files/pull/{id}/retry';
|
|
4515
|
+
};
|
|
4516
|
+
|
|
4517
|
+
export type RetryDownloadErrors = {
|
|
4518
|
+
/**
|
|
4519
|
+
* Invalid request parameters
|
|
4520
|
+
*/
|
|
4521
|
+
400: BodhiErrorResponse;
|
|
4522
|
+
/**
|
|
4523
|
+
* Not authenticated
|
|
4524
|
+
*/
|
|
4525
|
+
401: BodhiErrorResponse;
|
|
4526
|
+
/**
|
|
4527
|
+
* Insufficient permissions
|
|
4528
|
+
*/
|
|
4529
|
+
403: BodhiErrorResponse;
|
|
4530
|
+
/**
|
|
4531
|
+
* Download request not found
|
|
4532
|
+
*/
|
|
4533
|
+
404: BodhiErrorResponse;
|
|
4534
|
+
/**
|
|
4535
|
+
* Internal server error
|
|
4536
|
+
*/
|
|
4537
|
+
500: BodhiErrorResponse;
|
|
4538
|
+
};
|
|
4539
|
+
|
|
4540
|
+
export type RetryDownloadError = RetryDownloadErrors[keyof RetryDownloadErrors];
|
|
4541
|
+
|
|
4542
|
+
export type RetryDownloadResponses = {
|
|
4543
|
+
/**
|
|
4544
|
+
* Download request reset and re-started
|
|
4545
|
+
*/
|
|
4546
|
+
200: DownloadRequest;
|
|
4547
|
+
};
|
|
4548
|
+
|
|
4549
|
+
export type RetryDownloadResponse = RetryDownloadResponses[keyof RetryDownloadResponses];
|
|
4550
|
+
|
|
4160
4551
|
export type RefreshModelMetadataData = {
|
|
4161
4552
|
/**
|
|
4162
4553
|
* Refresh request - either bulk (source='all') or single model (source='model' with identifiers)
|
|
@@ -4205,6 +4596,181 @@ export type RefreshModelMetadataResponses = {
|
|
|
4205
4596
|
|
|
4206
4597
|
export type RefreshModelMetadataResponse = RefreshModelMetadataResponses[keyof RefreshModelMetadataResponses];
|
|
4207
4598
|
|
|
4599
|
+
export type CreateModelRouterData = {
|
|
4600
|
+
body: ModelRouterRequest;
|
|
4601
|
+
path?: never;
|
|
4602
|
+
query?: never;
|
|
4603
|
+
url: '/bodhi/v1/models/router';
|
|
4604
|
+
};
|
|
4605
|
+
|
|
4606
|
+
export type CreateModelRouterErrors = {
|
|
4607
|
+
/**
|
|
4608
|
+
* Invalid request parameters
|
|
4609
|
+
*/
|
|
4610
|
+
400: BodhiErrorResponse;
|
|
4611
|
+
/**
|
|
4612
|
+
* Not authenticated
|
|
4613
|
+
*/
|
|
4614
|
+
401: BodhiErrorResponse;
|
|
4615
|
+
/**
|
|
4616
|
+
* Insufficient permissions
|
|
4617
|
+
*/
|
|
4618
|
+
403: BodhiErrorResponse;
|
|
4619
|
+
/**
|
|
4620
|
+
* Internal server error
|
|
4621
|
+
*/
|
|
4622
|
+
500: BodhiErrorResponse;
|
|
4623
|
+
};
|
|
4624
|
+
|
|
4625
|
+
export type CreateModelRouterError = CreateModelRouterErrors[keyof CreateModelRouterErrors];
|
|
4626
|
+
|
|
4627
|
+
export type CreateModelRouterResponses = {
|
|
4628
|
+
/**
|
|
4629
|
+
* Model-router created
|
|
4630
|
+
*/
|
|
4631
|
+
201: ModelRouterResponse;
|
|
4632
|
+
};
|
|
4633
|
+
|
|
4634
|
+
export type CreateModelRouterResponse = CreateModelRouterResponses[keyof CreateModelRouterResponses];
|
|
4635
|
+
|
|
4636
|
+
export type DeleteModelRouterData = {
|
|
4637
|
+
body?: never;
|
|
4638
|
+
path: {
|
|
4639
|
+
/**
|
|
4640
|
+
* Model-router ID
|
|
4641
|
+
*/
|
|
4642
|
+
id: string;
|
|
4643
|
+
};
|
|
4644
|
+
query?: never;
|
|
4645
|
+
url: '/bodhi/v1/models/router/{id}';
|
|
4646
|
+
};
|
|
4647
|
+
|
|
4648
|
+
export type DeleteModelRouterErrors = {
|
|
4649
|
+
/**
|
|
4650
|
+
* Invalid request parameters
|
|
4651
|
+
*/
|
|
4652
|
+
400: BodhiErrorResponse;
|
|
4653
|
+
/**
|
|
4654
|
+
* Not authenticated
|
|
4655
|
+
*/
|
|
4656
|
+
401: BodhiErrorResponse;
|
|
4657
|
+
/**
|
|
4658
|
+
* Insufficient permissions
|
|
4659
|
+
*/
|
|
4660
|
+
403: BodhiErrorResponse;
|
|
4661
|
+
/**
|
|
4662
|
+
* Model-router not found
|
|
4663
|
+
*/
|
|
4664
|
+
404: BodhiErrorResponse;
|
|
4665
|
+
/**
|
|
4666
|
+
* Internal server error
|
|
4667
|
+
*/
|
|
4668
|
+
500: BodhiErrorResponse;
|
|
4669
|
+
};
|
|
4670
|
+
|
|
4671
|
+
export type DeleteModelRouterError = DeleteModelRouterErrors[keyof DeleteModelRouterErrors];
|
|
4672
|
+
|
|
4673
|
+
export type DeleteModelRouterResponses = {
|
|
4674
|
+
/**
|
|
4675
|
+
* Model-router deleted
|
|
4676
|
+
*/
|
|
4677
|
+
204: void;
|
|
4678
|
+
};
|
|
4679
|
+
|
|
4680
|
+
export type DeleteModelRouterResponse = DeleteModelRouterResponses[keyof DeleteModelRouterResponses];
|
|
4681
|
+
|
|
4682
|
+
export type GetModelRouterData = {
|
|
4683
|
+
body?: never;
|
|
4684
|
+
path: {
|
|
4685
|
+
/**
|
|
4686
|
+
* Unique identifier for the model-router alias
|
|
4687
|
+
*/
|
|
4688
|
+
id: string;
|
|
4689
|
+
};
|
|
4690
|
+
query?: never;
|
|
4691
|
+
url: '/bodhi/v1/models/router/{id}';
|
|
4692
|
+
};
|
|
4693
|
+
|
|
4694
|
+
export type GetModelRouterErrors = {
|
|
4695
|
+
/**
|
|
4696
|
+
* Invalid request parameters
|
|
4697
|
+
*/
|
|
4698
|
+
400: BodhiErrorResponse;
|
|
4699
|
+
/**
|
|
4700
|
+
* Not authenticated
|
|
4701
|
+
*/
|
|
4702
|
+
401: BodhiErrorResponse;
|
|
4703
|
+
/**
|
|
4704
|
+
* Insufficient permissions
|
|
4705
|
+
*/
|
|
4706
|
+
403: BodhiErrorResponse;
|
|
4707
|
+
/**
|
|
4708
|
+
* Model-router with specified ID not found
|
|
4709
|
+
*/
|
|
4710
|
+
404: BodhiErrorResponse;
|
|
4711
|
+
/**
|
|
4712
|
+
* Internal server error
|
|
4713
|
+
*/
|
|
4714
|
+
500: BodhiErrorResponse;
|
|
4715
|
+
};
|
|
4716
|
+
|
|
4717
|
+
export type GetModelRouterError = GetModelRouterErrors[keyof GetModelRouterErrors];
|
|
4718
|
+
|
|
4719
|
+
export type GetModelRouterResponses = {
|
|
4720
|
+
/**
|
|
4721
|
+
* Model-router configuration retrieved
|
|
4722
|
+
*/
|
|
4723
|
+
200: ModelRouterResponse;
|
|
4724
|
+
};
|
|
4725
|
+
|
|
4726
|
+
export type GetModelRouterResponse = GetModelRouterResponses[keyof GetModelRouterResponses];
|
|
4727
|
+
|
|
4728
|
+
export type UpdateModelRouterData = {
|
|
4729
|
+
body: ModelRouterRequest;
|
|
4730
|
+
path: {
|
|
4731
|
+
/**
|
|
4732
|
+
* Model-router ID
|
|
4733
|
+
*/
|
|
4734
|
+
id: string;
|
|
4735
|
+
};
|
|
4736
|
+
query?: never;
|
|
4737
|
+
url: '/bodhi/v1/models/router/{id}';
|
|
4738
|
+
};
|
|
4739
|
+
|
|
4740
|
+
export type UpdateModelRouterErrors = {
|
|
4741
|
+
/**
|
|
4742
|
+
* Invalid request parameters
|
|
4743
|
+
*/
|
|
4744
|
+
400: BodhiErrorResponse;
|
|
4745
|
+
/**
|
|
4746
|
+
* Not authenticated
|
|
4747
|
+
*/
|
|
4748
|
+
401: BodhiErrorResponse;
|
|
4749
|
+
/**
|
|
4750
|
+
* Insufficient permissions
|
|
4751
|
+
*/
|
|
4752
|
+
403: BodhiErrorResponse;
|
|
4753
|
+
/**
|
|
4754
|
+
* Model-router not found
|
|
4755
|
+
*/
|
|
4756
|
+
404: BodhiErrorResponse;
|
|
4757
|
+
/**
|
|
4758
|
+
* Internal server error
|
|
4759
|
+
*/
|
|
4760
|
+
500: BodhiErrorResponse;
|
|
4761
|
+
};
|
|
4762
|
+
|
|
4763
|
+
export type UpdateModelRouterError = UpdateModelRouterErrors[keyof UpdateModelRouterErrors];
|
|
4764
|
+
|
|
4765
|
+
export type UpdateModelRouterResponses = {
|
|
4766
|
+
/**
|
|
4767
|
+
* Model-router updated
|
|
4768
|
+
*/
|
|
4769
|
+
200: ModelRouterResponse;
|
|
4770
|
+
};
|
|
4771
|
+
|
|
4772
|
+
export type UpdateModelRouterResponse = UpdateModelRouterResponses[keyof UpdateModelRouterResponses];
|
|
4773
|
+
|
|
4208
4774
|
export type GetAliasData = {
|
|
4209
4775
|
body?: never;
|
|
4210
4776
|
path: {
|
|
@@ -4373,11 +4939,11 @@ export type DeleteSettingResponse = DeleteSettingResponses[keyof DeleteSettingRe
|
|
|
4373
4939
|
|
|
4374
4940
|
export type UpdateSettingData = {
|
|
4375
4941
|
/**
|
|
4376
|
-
*
|
|
4942
|
+
* New setting value
|
|
4377
4943
|
*/
|
|
4378
4944
|
body: {
|
|
4379
4945
|
/**
|
|
4380
|
-
*
|
|
4946
|
+
* type depends on setting metadata
|
|
4381
4947
|
*/
|
|
4382
4948
|
value: unknown;
|
|
4383
4949
|
};
|
|
@@ -4668,6 +5234,52 @@ export type CreateApiTokenResponses = {
|
|
|
4668
5234
|
|
|
4669
5235
|
export type CreateApiTokenResponse = CreateApiTokenResponses[keyof CreateApiTokenResponses];
|
|
4670
5236
|
|
|
5237
|
+
export type DeleteApiTokenData = {
|
|
5238
|
+
body?: never;
|
|
5239
|
+
path: {
|
|
5240
|
+
/**
|
|
5241
|
+
* Unique identifier of the API token to delete
|
|
5242
|
+
*/
|
|
5243
|
+
id: string;
|
|
5244
|
+
};
|
|
5245
|
+
query?: never;
|
|
5246
|
+
url: '/bodhi/v1/tokens/{id}';
|
|
5247
|
+
};
|
|
5248
|
+
|
|
5249
|
+
export type DeleteApiTokenErrors = {
|
|
5250
|
+
/**
|
|
5251
|
+
* Invalid request parameters
|
|
5252
|
+
*/
|
|
5253
|
+
400: BodhiErrorResponse;
|
|
5254
|
+
/**
|
|
5255
|
+
* Not authenticated
|
|
5256
|
+
*/
|
|
5257
|
+
401: BodhiErrorResponse;
|
|
5258
|
+
/**
|
|
5259
|
+
* Insufficient permissions
|
|
5260
|
+
*/
|
|
5261
|
+
403: BodhiErrorResponse;
|
|
5262
|
+
/**
|
|
5263
|
+
* Token not found
|
|
5264
|
+
*/
|
|
5265
|
+
404: BodhiErrorResponse;
|
|
5266
|
+
/**
|
|
5267
|
+
* Internal server error
|
|
5268
|
+
*/
|
|
5269
|
+
500: BodhiErrorResponse;
|
|
5270
|
+
};
|
|
5271
|
+
|
|
5272
|
+
export type DeleteApiTokenError = DeleteApiTokenErrors[keyof DeleteApiTokenErrors];
|
|
5273
|
+
|
|
5274
|
+
export type DeleteApiTokenResponses = {
|
|
5275
|
+
/**
|
|
5276
|
+
* Token deleted successfully
|
|
5277
|
+
*/
|
|
5278
|
+
204: void;
|
|
5279
|
+
};
|
|
5280
|
+
|
|
5281
|
+
export type DeleteApiTokenResponse = DeleteApiTokenResponses[keyof DeleteApiTokenResponses];
|
|
5282
|
+
|
|
4671
5283
|
export type UpdateApiTokenData = {
|
|
4672
5284
|
/**
|
|
4673
5285
|
* Token update request
|