@bodhiapp/ts-client 0.1.33 → 0.1.35

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