@bodhiapp/ts-client 0.1.5 → 0.1.6

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,14 +1,51 @@
1
1
  // This file is auto-generated by @hey-api/openapi-ts
2
2
 
3
- export type AliasResponse = {
4
- alias: string;
5
- context_params: GptContextParams;
6
- filename: string;
7
- model_params: {};
8
- repo: string;
9
- request_params: OaiRequestParams;
10
- snapshot: string;
11
- source: string;
3
+ /**
4
+ * Flat enum representing all types of model aliases
5
+ * Each variant is identified by the source field
6
+ */
7
+ export type Alias = (UserAlias & {
8
+ source: 'user';
9
+ }) | (ModelAlias & {
10
+ source: 'model';
11
+ }) | (ApiAlias & {
12
+ source: 'api';
13
+ });
14
+
15
+ export type ApiAlias = {
16
+ api_format: ApiFormat;
17
+ base_url: string;
18
+ created_at: string;
19
+ id: string;
20
+ models: Array<string>;
21
+ prefix?: string | null;
22
+ updated_at: string;
23
+ };
24
+
25
+ /**
26
+ * API format/protocol specification
27
+ */
28
+ export type ApiFormat = 'openai' | 'placeholder';
29
+
30
+ /**
31
+ * Response containing available API formats
32
+ */
33
+ export type ApiFormatsResponse = {
34
+ data: Array<ApiFormat>;
35
+ };
36
+
37
+ /**
38
+ * Response containing API model configuration
39
+ */
40
+ export type ApiModelResponse = {
41
+ api_format: ApiFormat;
42
+ api_key_masked: string;
43
+ base_url: string;
44
+ created_at: string;
45
+ id: string;
46
+ models: Array<string>;
47
+ prefix?: string | null;
48
+ updated_at: string;
12
49
  };
13
50
 
14
51
  export type ApiToken = {
@@ -24,47 +61,77 @@ export type ApiToken = {
24
61
 
25
62
  export type ApiTokenResponse = {
26
63
  /**
27
- * Offline token that can be used as API Token
64
+ * API token with bapp_ prefix for programmatic access
28
65
  */
29
66
  offline_token: string;
30
67
  };
31
68
 
69
+ export type AppAccessRequest = {
70
+ app_client_id: string;
71
+ };
72
+
73
+ export type AppAccessResponse = {
74
+ scope: string;
75
+ };
76
+
32
77
  /**
33
78
  * Application information and status
34
79
  */
35
80
  export type AppInfo = {
36
81
  /**
37
- * Current application status
82
+ * Current application setup and operational status
38
83
  */
39
84
  status: AppStatus;
40
85
  /**
41
- * Application version
86
+ * Application version number (semantic versioning)
42
87
  */
43
88
  version: string;
44
89
  };
45
90
 
91
+ export type AppRole = Role | TokenScope | UserScope;
92
+
46
93
  export type AppStatus = 'setup' | 'ready' | 'resource-admin';
47
94
 
95
+ /**
96
+ * Request body for approving access with role assignment
97
+ */
98
+ export type ApproveUserAccessRequest = {
99
+ /**
100
+ * Role to assign to the user
101
+ */
102
+ role: Role;
103
+ };
104
+
48
105
  export type AuthCallbackRequest = {
49
106
  /**
50
- * OAuth authorization code from successful authentication
107
+ * OAuth authorization code from successful authentication (required for success flow)
51
108
  */
52
109
  code?: string | null;
53
110
  /**
54
- * OAuth error code if authentication failed
111
+ * OAuth error code if authentication failed (e.g., "access_denied")
55
112
  */
56
113
  error?: string | null;
57
114
  /**
58
- * OAuth error description if authentication failed
115
+ * Human-readable OAuth error description if authentication failed
59
116
  */
60
117
  error_description?: string | null;
61
118
  /**
62
- * OAuth state parameter for CSRF protection
119
+ * OAuth state parameter for CSRF protection (must match initiated request)
63
120
  */
64
121
  state?: string | null;
65
122
  [key: string]: string | (string | null) | (string | null) | (string | null) | (string | null) | undefined;
66
123
  };
67
124
 
125
+ /**
126
+ * Change user role request
127
+ */
128
+ export type ChangeRoleRequest = {
129
+ /**
130
+ * Role to assign to the user
131
+ */
132
+ role: string;
133
+ };
134
+
68
135
  export type ChatRequest = {
69
136
  format?: string | null;
70
137
  keep_alive?: null | Duration;
@@ -74,23 +141,61 @@ export type ChatRequest = {
74
141
  stream?: boolean | null;
75
142
  };
76
143
 
144
+ export type CreateAliasRequest = {
145
+ alias: string;
146
+ context_params?: Array<string> | null;
147
+ filename: string;
148
+ repo: string;
149
+ request_params?: null | OaiRequestParams;
150
+ snapshot?: string | null;
151
+ };
152
+
153
+ /**
154
+ * Request to create a new API model configuration
155
+ */
156
+ export type CreateApiModelRequest = {
157
+ /**
158
+ * API format/protocol (e.g., "openai")
159
+ */
160
+ api_format: ApiFormat;
161
+ /**
162
+ * API key for authentication
163
+ */
164
+ api_key: string;
165
+ /**
166
+ * API base URL
167
+ */
168
+ base_url: string;
169
+ /**
170
+ * List of available models
171
+ */
172
+ models: Array<string>;
173
+ /**
174
+ * Optional prefix for model namespacing (e.g., "azure/" for "azure/gpt-4", "openai:" for "openai:gpt-4")
175
+ */
176
+ prefix?: string | null;
177
+ };
178
+
77
179
  /**
78
180
  * Request to create a new API token
79
181
  */
80
182
  export type CreateApiTokenRequest = {
81
183
  /**
82
- * Optional name for the API token
184
+ * Descriptive name for the API token (minimum 3 characters)
83
185
  */
84
186
  name?: string | null;
85
187
  };
86
188
 
87
189
  export type DownloadRequest = {
88
190
  created_at: string;
191
+ downloaded_bytes?: number;
89
192
  error?: string | null;
90
193
  filename: string;
91
194
  id: string;
92
195
  repo: string;
196
+ started_at: string;
93
197
  status: DownloadStatus;
198
+ total_bytes?: number | null;
94
199
  updated_at: string;
95
200
  };
96
201
 
@@ -98,23 +203,55 @@ export type DownloadStatus = 'pending' | 'completed' | 'error';
98
203
 
99
204
  export type Duration = string;
100
205
 
206
+ export type EmptyResponse = {
207
+ [key: string]: unknown;
208
+ };
209
+
101
210
  export type ErrorBody = {
211
+ /**
212
+ * Specific error code for programmatic error handling
213
+ */
102
214
  code?: string | null;
215
+ /**
216
+ * Human-readable error message describing what went wrong
217
+ */
103
218
  message: string;
219
+ /**
220
+ * Parameter name that caused the error (for validation errors)
221
+ */
104
222
  param?: string | null;
223
+ /**
224
+ * Error type categorizing the kind of error that occurred
225
+ */
105
226
  type: string;
106
227
  };
107
228
 
108
- export type GptContextParams = {
109
- n_ctx?: number | null;
110
- n_keep?: number | null;
111
- n_parallel?: number | null;
112
- n_predict?: number | null;
113
- n_seed?: number | null;
114
- n_threads?: number | null;
229
+ /**
230
+ * Request to fetch available models from provider
231
+ */
232
+ export type FetchModelsRequest = {
233
+ /**
234
+ * API key for authentication (provide either api_key OR id, api_key takes preference if both provided)
235
+ */
236
+ api_key?: string;
237
+ /**
238
+ * API base URL (optional when using id)
239
+ */
240
+ base_url: string;
241
+ /**
242
+ * API model ID to look up stored credentials (provide either api_key OR id, api_key takes preference if both provided)
243
+ */
244
+ id?: string;
245
+ };
246
+
247
+ /**
248
+ * Response containing available models from provider
249
+ */
250
+ export type FetchModelsResponse = {
251
+ models: Array<string>;
115
252
  };
116
253
 
117
- export type ListModelResponseWrapper = {
254
+ export type ListModelResponse = {
118
255
  data: Array<{
119
256
  /**
120
257
  * The Unix timestamp (in seconds) when the model was created.
@@ -136,6 +273,14 @@ export type ListModelResponseWrapper = {
136
273
  object: string;
137
274
  };
138
275
 
276
+ /**
277
+ * List users query parameters
278
+ */
279
+ export type ListUsersParams = {
280
+ page?: number | null;
281
+ page_size?: number | null;
282
+ };
283
+
139
284
  export type LocalModelResponse = {
140
285
  filename: string;
141
286
  model_params: {};
@@ -158,6 +303,13 @@ export type Model = {
158
303
  size: number;
159
304
  };
160
305
 
306
+ export type ModelAlias = {
307
+ alias: string;
308
+ filename: string;
309
+ repo: string;
310
+ snapshot: string;
311
+ };
312
+
161
313
  export type ModelDetails = {
162
314
  families?: Array<string> | null;
163
315
  family: string;
@@ -167,6 +319,28 @@ export type ModelDetails = {
167
319
  quantization_level: string;
168
320
  };
169
321
 
322
+ /**
323
+ * Describes an OpenAI model offering that can be used with the API.
324
+ */
325
+ export type ModelResponse = {
326
+ /**
327
+ * The Unix timestamp (in seconds) when the model was created.
328
+ */
329
+ created: number;
330
+ /**
331
+ * The model identifier, which can be referenced in the API endpoints.
332
+ */
333
+ id: string;
334
+ /**
335
+ * The object type, which is always "model".
336
+ */
337
+ object: string;
338
+ /**
339
+ * The organization that owns the model.
340
+ */
341
+ owned_by: string;
342
+ };
343
+
170
344
  export type ModelsResponse = {
171
345
  models: Array<Model>;
172
346
  };
@@ -176,11 +350,11 @@ export type ModelsResponse = {
176
350
  */
177
351
  export type NewDownloadRequest = {
178
352
  /**
179
- * Model file name to pull
353
+ * Model file name to download (typically .gguf format)
180
354
  */
181
355
  filename: string;
182
356
  /**
183
- * HuggingFace repository name
357
+ * HuggingFace repository name in format 'username/repository-name'
184
358
  */
185
359
  repo: string;
186
360
  };
@@ -201,6 +375,9 @@ export type OllamaError = {
201
375
  };
202
376
 
203
377
  export type OpenAiApiError = {
378
+ /**
379
+ * Error details following OpenAI API error format
380
+ */
204
381
  error: ErrorBody;
205
382
  };
206
383
 
@@ -236,87 +413,113 @@ export type Options = {
236
413
  vocab_only?: boolean | null;
237
414
  };
238
415
 
239
- export type PaginatedResponseAliasResponse = {
240
- data: Array<{
241
- alias: string;
242
- context_params: GptContextParams;
243
- filename: string;
244
- model_params: {};
245
- repo: string;
246
- request_params: OaiRequestParams;
247
- snapshot: string;
248
- source: string;
249
- }>;
416
+ export type PaginatedAliasResponse = {
417
+ data: Array<Alias>;
250
418
  page: number;
251
419
  page_size: number;
252
420
  total: number;
253
421
  };
254
422
 
255
- export type PaginatedResponseApiToken = {
256
- data: Array<{
257
- created_at: string;
258
- id: string;
259
- name: string;
260
- status: TokenStatus;
261
- token_hash: string;
262
- token_id: string;
263
- updated_at: string;
264
- user_id: string;
265
- }>;
423
+ /**
424
+ * Paginated response for API model listings
425
+ */
426
+ export type PaginatedApiModelResponse = {
427
+ data: Array<ApiModelResponse>;
266
428
  page: number;
267
429
  page_size: number;
268
430
  total: number;
269
431
  };
270
432
 
271
- export type PaginatedResponseDownloadRequest = {
272
- data: Array<{
273
- created_at: string;
274
- error?: string | null;
275
- filename: string;
276
- id: string;
277
- repo: string;
278
- status: DownloadStatus;
279
- updated_at: string;
280
- }>;
433
+ export type PaginatedApiTokenResponse = {
434
+ data: Array<ApiToken>;
281
435
  page: number;
282
436
  page_size: number;
283
437
  total: number;
284
438
  };
285
439
 
286
- export type PaginatedResponseLocalModelResponse = {
287
- data: Array<{
288
- filename: string;
289
- model_params: {};
290
- repo: string;
291
- size?: number | null;
292
- snapshot: string;
293
- }>;
440
+ export type PaginatedDownloadResponse = {
441
+ data: Array<DownloadRequest>;
442
+ page: number;
443
+ page_size: number;
444
+ total: number;
445
+ };
446
+
447
+ export type PaginatedLocalModelResponse = {
448
+ data: Array<LocalModelResponse>;
449
+ page: number;
450
+ page_size: number;
451
+ total: number;
452
+ };
453
+
454
+ /**
455
+ * Paginated response for access requests
456
+ */
457
+ export type PaginatedUserAccessResponse = {
458
+ /**
459
+ * Current page number
460
+ */
461
+ page: number;
462
+ /**
463
+ * Number of items per page
464
+ */
465
+ page_size: number;
466
+ /**
467
+ * List of access requests
468
+ */
469
+ requests: Array<UserAccessRequest>;
470
+ /**
471
+ * Total number of requests
472
+ */
473
+ total: number;
474
+ };
475
+
476
+ export type PaginatedUserAliasResponse = {
477
+ data: Array<UserAliasResponse>;
294
478
  page: number;
295
479
  page_size: number;
296
480
  total: number;
297
481
  };
298
482
 
483
+ /**
484
+ * Query parameters for pagination and sorting
485
+ */
486
+ export type PaginationSortParams = {
487
+ /**
488
+ * Page number (1-based indexing)
489
+ */
490
+ page?: number;
491
+ /**
492
+ * Number of items to return per page (maximum 100)
493
+ */
494
+ page_size?: number;
495
+ /**
496
+ * Field to sort by. Common values: repo, filename, size, updated_at, snapshot, created_at
497
+ */
498
+ sort?: string | null;
499
+ /**
500
+ * Sort order: 'asc' for ascending, 'desc' for descending
501
+ */
502
+ sort_order?: string;
503
+ };
504
+
299
505
  /**
300
506
  * Response to the ping endpoint
301
507
  */
302
508
  export type PingResponse = {
303
509
  /**
304
- * always returns "pong"
510
+ * Simple ping response message
305
511
  */
306
512
  message: string;
307
513
  };
308
514
 
309
515
  export type RedirectResponse = {
310
516
  /**
311
- * The URL to redirect to for OAuth authentication
517
+ * The URL to redirect to (OAuth authorization URL or application home page)
312
518
  */
313
519
  location: string;
314
520
  };
315
521
 
316
- export type Repo = {
317
- name: string;
318
- user: string;
319
- };
522
+ export type Role = 'resource_user' | 'resource_power_user' | 'resource_manager' | 'resource_admin';
320
523
 
321
524
  export type SettingInfo = {
322
525
  current_value: unknown;
@@ -345,7 +548,14 @@ export type SettingSource = 'system' | 'command_line' | 'environment' | 'setting
345
548
  * Request to setup the application in authenticated mode
346
549
  */
347
550
  export type SetupRequest = {
348
- [key: string]: unknown;
551
+ /**
552
+ * Optional description of the server's purpose
553
+ */
554
+ description?: string | null;
555
+ /**
556
+ * Server name for identification (minimum 10 characters)
557
+ */
558
+ name: string;
349
559
  };
350
560
 
351
561
  /**
@@ -353,9 +563,7 @@ export type SetupRequest = {
353
563
  */
354
564
  export type SetupResponse = {
355
565
  /**
356
- * New application status after setup
357
- * - resource-admin: When setup in authenticated mode
358
- * - ready: When setup in non-authenticated mode
566
+ * New application status after successful setup
359
567
  */
360
568
  status: AppStatus;
361
569
  };
@@ -374,110 +582,268 @@ export type ShowResponse = {
374
582
  template: string;
375
583
  };
376
584
 
377
- export type TokenStatus = 'active' | 'inactive';
378
-
379
585
  /**
380
- * Request to update an existing API token
586
+ * Request to test API connectivity with a prompt
381
587
  */
382
- export type UpdateApiTokenRequest = {
588
+ export type TestPromptRequest = {
383
589
  /**
384
- * New name for the token
590
+ * API key for authentication (provide either api_key OR id, api_key takes preference if both provided)
385
591
  */
386
- name: string;
592
+ api_key?: string;
387
593
  /**
388
- * New status for the token (active/inactive)
594
+ * API base URL (optional when using id)
389
595
  */
390
- status: TokenStatus;
596
+ base_url: string;
597
+ /**
598
+ * API model ID to look up stored credentials (provide either api_key OR id, api_key takes preference if both provided)
599
+ */
600
+ id?: string;
601
+ /**
602
+ * Model to use for testing
603
+ */
604
+ model: string;
605
+ /**
606
+ * Test prompt (max 30 characters for cost control)
607
+ */
608
+ prompt: string;
391
609
  };
392
610
 
393
611
  /**
394
- * Request to update a setting value
612
+ * Response from testing API connectivity
395
613
  */
396
- export type UpdateSettingRequest = {
397
- value: unknown;
614
+ export type TestPromptResponse = {
615
+ error?: string | null;
616
+ response?: string | null;
617
+ success: boolean;
618
+ };
619
+
620
+ export type TokenScope = 'scope_token_user' | 'scope_token_power_user' | 'scope_token_manager' | 'scope_token_admin';
621
+
622
+ export type TokenStatus = 'active' | 'inactive';
623
+
624
+ export type UpdateAliasRequest = {
625
+ context_params?: Array<string> | null;
626
+ filename: string;
627
+ repo: string;
628
+ request_params?: null | OaiRequestParams;
629
+ snapshot?: string | null;
398
630
  };
399
631
 
400
632
  /**
401
- * Information about the currently logged in user
633
+ * Request to update an existing API model configuration
402
634
  */
403
- export type UserInfo = {
635
+ export type UpdateApiModelRequest = {
404
636
  /**
405
- * User's email address
637
+ * API format/protocol (required)
406
638
  */
407
- email?: string | null;
639
+ api_format: ApiFormat;
408
640
  /**
409
- * If user is logged in
641
+ * API key for authentication (optional, only update if provided for security)
410
642
  */
411
- logged_in: boolean;
643
+ api_key?: string | null;
412
644
  /**
413
- * List of roles assigned to the user
645
+ * API base URL (required)
414
646
  */
415
- roles: Array<string>;
416
- };
417
-
418
- export type ChatOllamaModelData = {
647
+ base_url: string;
419
648
  /**
420
- * Chat request in Ollama format
649
+ * List of available models (required)
421
650
  */
422
- body: ChatRequest;
423
- path?: never;
424
- query?: never;
425
- url: '/api/chat';
426
- };
427
-
428
- export type ChatOllamaModelErrors = {
651
+ models: Array<string>;
429
652
  /**
430
- * Invalid request
653
+ * Optional prefix for model namespacing
431
654
  */
432
- 400: OllamaError;
655
+ prefix?: string | null;
656
+ };
657
+
658
+ /**
659
+ * Request to update an existing API token
660
+ */
661
+ export type UpdateApiTokenRequest = {
433
662
  /**
434
- * Model not found
663
+ * New descriptive name for the token (minimum 3 characters)
435
664
  */
436
- 404: OllamaError;
665
+ name: string;
437
666
  /**
438
- * Internal server error
667
+ * New status for the token (active/inactive)
439
668
  */
440
- 500: OllamaError;
669
+ status: TokenStatus;
441
670
  };
442
671
 
443
- export type ChatOllamaModelError = ChatOllamaModelErrors[keyof ChatOllamaModelErrors];
444
-
445
- export type ChatOllamaModelResponses = {
672
+ /**
673
+ * Request to update a setting value
674
+ */
675
+ export type UpdateSettingRequest = {
446
676
  /**
447
- * Chat response
677
+ * New value for the setting (type depends on setting metadata)
448
678
  */
449
- 200: unknown;
679
+ value: unknown;
450
680
  };
451
681
 
452
- export type ShowOllamaModelData = {
682
+ export type UserAccessRequest = {
453
683
  /**
454
- * Model name to get details for
684
+ * Creation timestamp
455
685
  */
456
- body: ShowRequest;
457
- path?: never;
458
- query?: never;
459
- url: '/api/show';
460
- };
461
-
462
- export type ShowOllamaModelErrors = {
686
+ created_at: string;
463
687
  /**
464
- * Model not found
688
+ * Unique identifier for the request
465
689
  */
466
- 404: OllamaError;
690
+ id: number;
691
+ reviewer?: string | null;
467
692
  /**
468
- * Internal server error
693
+ * Current status of the request
469
694
  */
470
- 500: OllamaError;
471
- };
472
-
473
- export type ShowOllamaModelError = ShowOllamaModelErrors[keyof ShowOllamaModelErrors];
474
-
475
- export type ShowOllamaModelResponses = {
695
+ status: UserAccessRequestStatus;
476
696
  /**
477
- * Model details
697
+ * Last update timestamp
478
698
  */
479
- 200: ShowResponse;
480
- };
699
+ updated_at: string;
700
+ /**
701
+ * User ID (UUID) of the requesting user
702
+ */
703
+ user_id: string;
704
+ /**
705
+ * Username of the requesting user
706
+ */
707
+ username: string;
708
+ };
709
+
710
+ export type UserAccessRequestStatus = 'pending' | 'approved' | 'rejected';
711
+
712
+ /**
713
+ * Response for checking access request status
714
+ */
715
+ export type UserAccessStatusResponse = {
716
+ /**
717
+ * Creation timestamp
718
+ */
719
+ created_at: string;
720
+ /**
721
+ * Current status of the request (pending, approved, rejected)
722
+ */
723
+ status: UserAccessRequestStatus;
724
+ /**
725
+ * Last update timestamp
726
+ */
727
+ updated_at: string;
728
+ /**
729
+ * Username of the requesting user
730
+ */
731
+ username: string;
732
+ };
733
+
734
+ export type UserAlias = {
735
+ alias: string;
736
+ context_params?: Array<string>;
737
+ filename: string;
738
+ repo: string;
739
+ request_params?: OaiRequestParams;
740
+ snapshot: string;
741
+ };
742
+
743
+ export type UserAliasResponse = {
744
+ alias: string;
745
+ context_params: Array<string>;
746
+ filename: string;
747
+ model_params: {};
748
+ repo: string;
749
+ request_params: OaiRequestParams;
750
+ snapshot: string;
751
+ source: string;
752
+ };
753
+
754
+ export type UserInfo = {
755
+ first_name?: string | null;
756
+ last_name?: string | null;
757
+ role?: null | AppRole;
758
+ user_id: string;
759
+ username: string;
760
+ };
761
+
762
+ export type UserListResponse = {
763
+ client_id: string;
764
+ has_next: boolean;
765
+ has_previous: boolean;
766
+ page: number;
767
+ page_size: number;
768
+ total_pages: number;
769
+ total_users: number;
770
+ users: Array<UserInfo>;
771
+ };
772
+
773
+ /**
774
+ * User authentication response with discriminated union
775
+ */
776
+ export type UserResponse = {
777
+ auth_status: 'logged_out';
778
+ } | (UserInfo & {
779
+ auth_status: 'logged_in';
780
+ });
781
+
782
+ export type UserScope = 'scope_user_user' | 'scope_user_power_user' | 'scope_user_manager' | 'scope_user_admin';
783
+
784
+ export type ChatOllamaModelData = {
785
+ /**
786
+ * Chat request in Ollama format
787
+ */
788
+ body: ChatRequest;
789
+ path?: never;
790
+ query?: never;
791
+ url: '/api/chat';
792
+ };
793
+
794
+ export type ChatOllamaModelErrors = {
795
+ /**
796
+ * Invalid request
797
+ */
798
+ 400: OllamaError;
799
+ /**
800
+ * Model not found
801
+ */
802
+ 404: OllamaError;
803
+ /**
804
+ * Internal server error
805
+ */
806
+ 500: OllamaError;
807
+ };
808
+
809
+ export type ChatOllamaModelError = ChatOllamaModelErrors[keyof ChatOllamaModelErrors];
810
+
811
+ export type ChatOllamaModelResponses = {
812
+ /**
813
+ * Chat response
814
+ */
815
+ 200: unknown;
816
+ };
817
+
818
+ export type ShowOllamaModelData = {
819
+ /**
820
+ * Model name to get details for
821
+ */
822
+ body: ShowRequest;
823
+ path?: never;
824
+ query?: never;
825
+ url: '/api/show';
826
+ };
827
+
828
+ export type ShowOllamaModelErrors = {
829
+ /**
830
+ * Model not found
831
+ */
832
+ 404: OllamaError;
833
+ /**
834
+ * Internal server error
835
+ */
836
+ 500: OllamaError;
837
+ };
838
+
839
+ export type ShowOllamaModelError = ShowOllamaModelErrors[keyof ShowOllamaModelErrors];
840
+
841
+ export type ShowOllamaModelResponses = {
842
+ /**
843
+ * Model details
844
+ */
845
+ 200: ShowResponse;
846
+ };
481
847
 
482
848
  export type ShowOllamaModelResponse = ShowOllamaModelResponses[keyof ShowOllamaModelResponses];
483
849
 
@@ -490,23 +856,489 @@ export type ListOllamaModelsData = {
490
856
 
491
857
  export type ListOllamaModelsErrors = {
492
858
  /**
493
- * Internal server error
859
+ * Internal server error
860
+ */
861
+ 500: OllamaError;
862
+ };
863
+
864
+ export type ListOllamaModelsError = ListOllamaModelsErrors[keyof ListOllamaModelsErrors];
865
+
866
+ export type ListOllamaModelsResponses = {
867
+ /**
868
+ * List of available models
869
+ */
870
+ 200: ModelsResponse;
871
+ };
872
+
873
+ export type ListOllamaModelsResponse = ListOllamaModelsResponses[keyof ListOllamaModelsResponses];
874
+
875
+ export type ListAllAccessRequestsData = {
876
+ body?: never;
877
+ path?: never;
878
+ query?: {
879
+ /**
880
+ * Page number (1-based indexing)
881
+ */
882
+ page?: number;
883
+ /**
884
+ * Number of items to return per page (maximum 100)
885
+ */
886
+ page_size?: number;
887
+ /**
888
+ * Field to sort by. Common values: repo, filename, size, updated_at, snapshot, created_at
889
+ */
890
+ sort?: string;
891
+ /**
892
+ * Sort order: 'asc' for ascending, 'desc' for descending
893
+ */
894
+ sort_order?: string;
895
+ };
896
+ url: '/bodhi/v1/access-requests';
897
+ };
898
+
899
+ export type ListAllAccessRequestsErrors = {
900
+ /**
901
+ * Not authenticated
902
+ */
903
+ 401: OpenAiApiError;
904
+ /**
905
+ * Insufficient permissions
906
+ */
907
+ 403: OpenAiApiError;
908
+ };
909
+
910
+ export type ListAllAccessRequestsError = ListAllAccessRequestsErrors[keyof ListAllAccessRequestsErrors];
911
+
912
+ export type ListAllAccessRequestsResponses = {
913
+ /**
914
+ * All requests retrieved
915
+ */
916
+ 200: PaginatedUserAccessResponse;
917
+ };
918
+
919
+ export type ListAllAccessRequestsResponse = ListAllAccessRequestsResponses[keyof ListAllAccessRequestsResponses];
920
+
921
+ export type ListPendingAccessRequestsData = {
922
+ body?: never;
923
+ path?: never;
924
+ query?: {
925
+ /**
926
+ * Page number (1-based indexing)
927
+ */
928
+ page?: number;
929
+ /**
930
+ * Number of items to return per page (maximum 100)
931
+ */
932
+ page_size?: number;
933
+ /**
934
+ * Field to sort by. Common values: repo, filename, size, updated_at, snapshot, created_at
935
+ */
936
+ sort?: string;
937
+ /**
938
+ * Sort order: 'asc' for ascending, 'desc' for descending
939
+ */
940
+ sort_order?: string;
941
+ };
942
+ url: '/bodhi/v1/access-requests/pending';
943
+ };
944
+
945
+ export type ListPendingAccessRequestsErrors = {
946
+ /**
947
+ * Not authenticated
948
+ */
949
+ 401: OpenAiApiError;
950
+ /**
951
+ * Insufficient permissions
952
+ */
953
+ 403: OpenAiApiError;
954
+ };
955
+
956
+ export type ListPendingAccessRequestsError = ListPendingAccessRequestsErrors[keyof ListPendingAccessRequestsErrors];
957
+
958
+ export type ListPendingAccessRequestsResponses = {
959
+ /**
960
+ * Pending requests retrieved
961
+ */
962
+ 200: PaginatedUserAccessResponse;
963
+ };
964
+
965
+ export type ListPendingAccessRequestsResponse = ListPendingAccessRequestsResponses[keyof ListPendingAccessRequestsResponses];
966
+
967
+ export type ApproveAccessRequestData = {
968
+ /**
969
+ * Role to assign to the user
970
+ */
971
+ body: ApproveUserAccessRequest;
972
+ path: {
973
+ /**
974
+ * Access request ID
975
+ */
976
+ id: number;
977
+ };
978
+ query?: never;
979
+ url: '/bodhi/v1/access-requests/{id}/approve';
980
+ };
981
+
982
+ export type ApproveAccessRequestErrors = {
983
+ /**
984
+ * Not authenticated
985
+ */
986
+ 401: OpenAiApiError;
987
+ /**
988
+ * Insufficient permissions
989
+ */
990
+ 403: OpenAiApiError;
991
+ /**
992
+ * Request not found
993
+ */
994
+ 404: OpenAiApiError;
995
+ };
996
+
997
+ export type ApproveAccessRequestError = ApproveAccessRequestErrors[keyof ApproveAccessRequestErrors];
998
+
999
+ export type ApproveAccessRequestResponses = {
1000
+ /**
1001
+ * Request approved successfully
1002
+ */
1003
+ 200: unknown;
1004
+ };
1005
+
1006
+ export type RejectAccessRequestData = {
1007
+ body?: never;
1008
+ path: {
1009
+ /**
1010
+ * Access request ID
1011
+ */
1012
+ id: number;
1013
+ };
1014
+ query?: never;
1015
+ url: '/bodhi/v1/access-requests/{id}/reject';
1016
+ };
1017
+
1018
+ export type RejectAccessRequestErrors = {
1019
+ /**
1020
+ * Not authenticated
1021
+ */
1022
+ 401: OpenAiApiError;
1023
+ /**
1024
+ * Insufficient permissions
1025
+ */
1026
+ 403: OpenAiApiError;
1027
+ /**
1028
+ * Request not found
1029
+ */
1030
+ 404: OpenAiApiError;
1031
+ };
1032
+
1033
+ export type RejectAccessRequestError = RejectAccessRequestErrors[keyof RejectAccessRequestErrors];
1034
+
1035
+ export type RejectAccessRequestResponses = {
1036
+ /**
1037
+ * Request rejected successfully
1038
+ */
1039
+ 200: unknown;
1040
+ };
1041
+
1042
+ export type ListApiModelsData = {
1043
+ body?: never;
1044
+ path?: never;
1045
+ query?: {
1046
+ /**
1047
+ * Page number (1-based indexing)
1048
+ */
1049
+ page?: number;
1050
+ /**
1051
+ * Number of items to return per page (maximum 100)
1052
+ */
1053
+ page_size?: number;
1054
+ /**
1055
+ * Field to sort by. Common values: repo, filename, size, updated_at, snapshot, created_at
1056
+ */
1057
+ sort?: string;
1058
+ /**
1059
+ * Sort order: 'asc' for ascending, 'desc' for descending
1060
+ */
1061
+ sort_order?: string;
1062
+ };
1063
+ url: '/bodhi/v1/api-models';
1064
+ };
1065
+
1066
+ export type ListApiModelsErrors = {
1067
+ /**
1068
+ * Internal server error during API model retrieval
1069
+ */
1070
+ 500: OpenAiApiError;
1071
+ };
1072
+
1073
+ export type ListApiModelsError = ListApiModelsErrors[keyof ListApiModelsErrors];
1074
+
1075
+ export type ListApiModelsResponses = {
1076
+ /**
1077
+ * API model configurations retrieved successfully
1078
+ */
1079
+ 200: PaginatedApiModelResponse;
1080
+ };
1081
+
1082
+ export type ListApiModelsResponse = ListApiModelsResponses[keyof ListApiModelsResponses];
1083
+
1084
+ export type CreateApiModelData = {
1085
+ body: CreateApiModelRequest;
1086
+ path?: never;
1087
+ query?: never;
1088
+ url: '/bodhi/v1/api-models';
1089
+ };
1090
+
1091
+ export type CreateApiModelErrors = {
1092
+ /**
1093
+ * Invalid request
1094
+ */
1095
+ 400: OpenAiApiError;
1096
+ /**
1097
+ * Alias already exists
1098
+ */
1099
+ 409: OpenAiApiError;
1100
+ /**
1101
+ * Internal server error
1102
+ */
1103
+ 500: OpenAiApiError;
1104
+ };
1105
+
1106
+ export type CreateApiModelError = CreateApiModelErrors[keyof CreateApiModelErrors];
1107
+
1108
+ export type CreateApiModelResponses = {
1109
+ /**
1110
+ * API model created
1111
+ */
1112
+ 201: ApiModelResponse;
1113
+ };
1114
+
1115
+ export type CreateApiModelResponse = CreateApiModelResponses[keyof CreateApiModelResponses];
1116
+
1117
+ export type GetApiFormatsData = {
1118
+ body?: never;
1119
+ path?: never;
1120
+ query?: never;
1121
+ url: '/bodhi/v1/api-models/api-formats';
1122
+ };
1123
+
1124
+ export type GetApiFormatsErrors = {
1125
+ /**
1126
+ * Internal server error during API format retrieval
1127
+ */
1128
+ 500: OpenAiApiError;
1129
+ };
1130
+
1131
+ export type GetApiFormatsError = GetApiFormatsErrors[keyof GetApiFormatsErrors];
1132
+
1133
+ export type GetApiFormatsResponses = {
1134
+ /**
1135
+ * API formats retrieved successfully
1136
+ */
1137
+ 200: ApiFormatsResponse;
1138
+ };
1139
+
1140
+ export type GetApiFormatsResponse = GetApiFormatsResponses[keyof GetApiFormatsResponses];
1141
+
1142
+ export type FetchApiModelsData = {
1143
+ body: FetchModelsRequest;
1144
+ path?: never;
1145
+ query?: never;
1146
+ url: '/bodhi/v1/api-models/fetch-models';
1147
+ };
1148
+
1149
+ export type FetchApiModelsErrors = {
1150
+ /**
1151
+ * Invalid request
1152
+ */
1153
+ 400: OpenAiApiError;
1154
+ /**
1155
+ * Internal server error
1156
+ */
1157
+ 500: OpenAiApiError;
1158
+ };
1159
+
1160
+ export type FetchApiModelsError = FetchApiModelsErrors[keyof FetchApiModelsErrors];
1161
+
1162
+ export type FetchApiModelsResponses = {
1163
+ /**
1164
+ * Available models
1165
+ */
1166
+ 200: FetchModelsResponse;
1167
+ };
1168
+
1169
+ export type FetchApiModelsResponse = FetchApiModelsResponses[keyof FetchApiModelsResponses];
1170
+
1171
+ export type TestApiModelData = {
1172
+ body: TestPromptRequest;
1173
+ path?: never;
1174
+ query?: never;
1175
+ url: '/bodhi/v1/api-models/test';
1176
+ };
1177
+
1178
+ export type TestApiModelErrors = {
1179
+ /**
1180
+ * Invalid request
1181
+ */
1182
+ 400: OpenAiApiError;
1183
+ /**
1184
+ * Internal server error
1185
+ */
1186
+ 500: OpenAiApiError;
1187
+ };
1188
+
1189
+ export type TestApiModelError = TestApiModelErrors[keyof TestApiModelErrors];
1190
+
1191
+ export type TestApiModelResponses = {
1192
+ /**
1193
+ * Test result
1194
+ */
1195
+ 200: TestPromptResponse;
1196
+ };
1197
+
1198
+ export type TestApiModelResponse = TestApiModelResponses[keyof TestApiModelResponses];
1199
+
1200
+ export type DeleteApiModelData = {
1201
+ body?: never;
1202
+ path: {
1203
+ /**
1204
+ * API model alias
1205
+ */
1206
+ alias: string;
1207
+ };
1208
+ query?: never;
1209
+ url: '/bodhi/v1/api-models/{alias}';
1210
+ };
1211
+
1212
+ export type DeleteApiModelErrors = {
1213
+ /**
1214
+ * API model not found
1215
+ */
1216
+ 404: OpenAiApiError;
1217
+ /**
1218
+ * Internal server error
1219
+ */
1220
+ 500: OpenAiApiError;
1221
+ };
1222
+
1223
+ export type DeleteApiModelError = DeleteApiModelErrors[keyof DeleteApiModelErrors];
1224
+
1225
+ export type DeleteApiModelResponses = {
1226
+ /**
1227
+ * API model deleted
1228
+ */
1229
+ 204: void;
1230
+ };
1231
+
1232
+ export type DeleteApiModelResponse = DeleteApiModelResponses[keyof DeleteApiModelResponses];
1233
+
1234
+ export type UpdateApiModelData = {
1235
+ body: UpdateApiModelRequest;
1236
+ path: {
1237
+ /**
1238
+ * API model alias
1239
+ */
1240
+ alias: string;
1241
+ };
1242
+ query?: never;
1243
+ url: '/bodhi/v1/api-models/{alias}';
1244
+ };
1245
+
1246
+ export type UpdateApiModelErrors = {
1247
+ /**
1248
+ * Invalid request
1249
+ */
1250
+ 400: OpenAiApiError;
1251
+ /**
1252
+ * API model not found
1253
+ */
1254
+ 404: OpenAiApiError;
1255
+ /**
1256
+ * Internal server error
1257
+ */
1258
+ 500: OpenAiApiError;
1259
+ };
1260
+
1261
+ export type UpdateApiModelError = UpdateApiModelErrors[keyof UpdateApiModelErrors];
1262
+
1263
+ export type UpdateApiModelResponses = {
1264
+ /**
1265
+ * API model updated
1266
+ */
1267
+ 200: ApiModelResponse;
1268
+ };
1269
+
1270
+ export type UpdateApiModelResponse = UpdateApiModelResponses[keyof UpdateApiModelResponses];
1271
+
1272
+ export type GetApiModelData = {
1273
+ body?: never;
1274
+ path: {
1275
+ /**
1276
+ * Unique identifier for the API model alias
1277
+ */
1278
+ id: string;
1279
+ };
1280
+ query?: never;
1281
+ url: '/bodhi/v1/api-models/{id}';
1282
+ };
1283
+
1284
+ export type GetApiModelErrors = {
1285
+ /**
1286
+ * API model with specified ID not found
1287
+ */
1288
+ 404: OpenAiApiError;
1289
+ /**
1290
+ * Internal server error during model retrieval
1291
+ */
1292
+ 500: OpenAiApiError;
1293
+ };
1294
+
1295
+ export type GetApiModelError = GetApiModelErrors[keyof GetApiModelErrors];
1296
+
1297
+ export type GetApiModelResponses = {
1298
+ /**
1299
+ * API model configuration retrieved successfully
1300
+ */
1301
+ 200: ApiModelResponse;
1302
+ };
1303
+
1304
+ export type GetApiModelResponse = GetApiModelResponses[keyof GetApiModelResponses];
1305
+
1306
+ export type RequestAccessData = {
1307
+ /**
1308
+ * Application client requesting access
1309
+ */
1310
+ body: AppAccessRequest;
1311
+ path?: never;
1312
+ query?: never;
1313
+ url: '/bodhi/v1/apps/request-access';
1314
+ };
1315
+
1316
+ export type RequestAccessErrors = {
1317
+ /**
1318
+ * Invalid request, application not registered, or incorrect app status
1319
+ */
1320
+ 400: OpenAiApiError;
1321
+ /**
1322
+ * Internal server error during access request
494
1323
  */
495
- 500: OllamaError;
1324
+ 500: OpenAiApiError;
496
1325
  };
497
1326
 
498
- export type ListOllamaModelsError = ListOllamaModelsErrors[keyof ListOllamaModelsErrors];
1327
+ export type RequestAccessError = RequestAccessErrors[keyof RequestAccessErrors];
499
1328
 
500
- export type ListOllamaModelsResponses = {
1329
+ export type RequestAccessResponses = {
501
1330
  /**
502
- * List of available models
1331
+ * Access granted successfully
503
1332
  */
504
- 200: ModelsResponse;
1333
+ 200: AppAccessResponse;
505
1334
  };
506
1335
 
507
- export type ListOllamaModelsResponse = ListOllamaModelsResponses[keyof ListOllamaModelsResponses];
1336
+ export type RequestAccessResponse = RequestAccessResponses[keyof RequestAccessResponses];
508
1337
 
509
1338
  export type CompleteOAuthFlowData = {
1339
+ /**
1340
+ * OAuth callback parameters from authorization server
1341
+ */
510
1342
  body: AuthCallbackRequest;
511
1343
  path?: never;
512
1344
  query?: never;
@@ -515,11 +1347,11 @@ export type CompleteOAuthFlowData = {
515
1347
 
516
1348
  export type CompleteOAuthFlowErrors = {
517
1349
  /**
518
- * OAuth error or invalid request
1350
+ * OAuth error, invalid request parameters, or state mismatch
519
1351
  */
520
1352
  422: OpenAiApiError;
521
1353
  /**
522
- * Internal server error
1354
+ * Internal server error during token exchange
523
1355
  */
524
1356
  500: OpenAiApiError;
525
1357
  };
@@ -528,7 +1360,7 @@ export type CompleteOAuthFlowError = CompleteOAuthFlowErrors[keyof CompleteOAuth
528
1360
 
529
1361
  export type CompleteOAuthFlowResponses = {
530
1362
  /**
531
- * OAuth flow completed successfully, return redirect URL
1363
+ * OAuth flow completed successfully, user authenticated
532
1364
  */
533
1365
  200: RedirectResponse;
534
1366
  };
@@ -544,7 +1376,7 @@ export type InitiateOAuthFlowData = {
544
1376
 
545
1377
  export type InitiateOAuthFlowErrors = {
546
1378
  /**
547
- * Internal server error
1379
+ * Internal server error during OAuth initialization
548
1380
  */
549
1381
  500: OpenAiApiError;
550
1382
  };
@@ -553,11 +1385,11 @@ export type InitiateOAuthFlowError = InitiateOAuthFlowErrors[keyof InitiateOAuth
553
1385
 
554
1386
  export type InitiateOAuthFlowResponses = {
555
1387
  /**
556
- * User already authenticated, return home page URL
1388
+ * User already authenticated, home page URL provided
557
1389
  */
558
1390
  200: RedirectResponse;
559
1391
  /**
560
- * User not authenticated, return OAuth authorization URL
1392
+ * User not authenticated, OAuth authorization URL provided
561
1393
  */
562
1394
  201: RedirectResponse;
563
1395
  };
@@ -582,7 +1414,7 @@ export type GetAppInfoError = GetAppInfoErrors[keyof GetAppInfoErrors];
582
1414
 
583
1415
  export type GetAppInfoResponses = {
584
1416
  /**
585
- * Returns the status information about the Application
1417
+ * Application information retrieved successfully
586
1418
  */
587
1419
  200: AppInfo;
588
1420
  };
@@ -607,7 +1439,7 @@ export type LogoutUserError = LogoutUserErrors[keyof LogoutUserErrors];
607
1439
 
608
1440
  export type LogoutUserResponses = {
609
1441
  /**
610
- * Logout successful, return redirect URL
1442
+ * User logged out successfully
611
1443
  */
612
1444
  200: RedirectResponse;
613
1445
  };
@@ -619,19 +1451,19 @@ export type ListModelFilesData = {
619
1451
  path?: never;
620
1452
  query?: {
621
1453
  /**
622
- * Page number (1-based)
1454
+ * Page number (1-based indexing)
623
1455
  */
624
1456
  page?: number;
625
1457
  /**
626
- * Number of items per page (max 100)
1458
+ * Number of items to return per page (maximum 100)
627
1459
  */
628
1460
  page_size?: number;
629
1461
  /**
630
- * Field to sort by (repo, filename, size, updated_at, snapshot)
1462
+ * Field to sort by. Common values: repo, filename, size, updated_at, snapshot, created_at
631
1463
  */
632
- sort?: string | null;
1464
+ sort?: string;
633
1465
  /**
634
- * Sort order (asc or desc)
1466
+ * Sort order: 'asc' for ascending, 'desc' for descending
635
1467
  */
636
1468
  sort_order?: string;
637
1469
  };
@@ -649,9 +1481,9 @@ export type ListModelFilesError = ListModelFilesErrors[keyof ListModelFilesError
649
1481
 
650
1482
  export type ListModelFilesResponses = {
651
1483
  /**
652
- * List of supported model files from local HuggingFace cache folder
1484
+ * Local model files retrieved successfully from cache
653
1485
  */
654
- 200: PaginatedResponseLocalModelResponse;
1486
+ 200: PaginatedLocalModelResponse;
655
1487
  };
656
1488
 
657
1489
  export type ListModelFilesResponse = ListModelFilesResponses[keyof ListModelFilesResponses];
@@ -661,19 +1493,19 @@ export type ListDownloadsData = {
661
1493
  path?: never;
662
1494
  query?: {
663
1495
  /**
664
- * Page number (1-based)
1496
+ * Page number (1-based indexing)
665
1497
  */
666
1498
  page?: number;
667
1499
  /**
668
- * Number of items per page (max 100)
1500
+ * Number of items to return per page (maximum 100)
669
1501
  */
670
1502
  page_size?: number;
671
1503
  /**
672
- * Field to sort by (repo, filename, size, updated_at, snapshot)
1504
+ * Field to sort by. Common values: repo, filename, size, updated_at, snapshot, created_at
673
1505
  */
674
- sort?: string | null;
1506
+ sort?: string;
675
1507
  /**
676
- * Sort order (asc or desc)
1508
+ * Sort order: 'asc' for ascending, 'desc' for descending
677
1509
  */
678
1510
  sort_order?: string;
679
1511
  };
@@ -682,7 +1514,7 @@ export type ListDownloadsData = {
682
1514
 
683
1515
  export type ListDownloadsErrors = {
684
1516
  /**
685
- * Internal server error
1517
+ * Internal server error during download list retrieval
686
1518
  */
687
1519
  500: OpenAiApiError;
688
1520
  };
@@ -691,16 +1523,16 @@ export type ListDownloadsError = ListDownloadsErrors[keyof ListDownloadsErrors];
691
1523
 
692
1524
  export type ListDownloadsResponses = {
693
1525
  /**
694
- * List of download requests
1526
+ * Model download requests retrieved successfully
695
1527
  */
696
- 200: PaginatedResponseDownloadRequest;
1528
+ 200: PaginatedDownloadResponse;
697
1529
  };
698
1530
 
699
1531
  export type ListDownloadsResponse = ListDownloadsResponses[keyof ListDownloadsResponses];
700
1532
 
701
1533
  export type PullModelFileData = {
702
1534
  /**
703
- * Model file download request
1535
+ * Model file download specification with repository and filename
704
1536
  */
705
1537
  body: NewDownloadRequest;
706
1538
  path?: never;
@@ -738,17 +1570,7 @@ export type PullModelByAliasData = {
738
1570
  body?: never;
739
1571
  path: {
740
1572
  /**
741
- * Available model aliases:
742
- * - llama3:instruct - Meta Llama 3 8B Instruct
743
- * - llama3:70b-instruct - Meta Llama 3 70B Instruct
744
- * - llama2:chat - Llama 2 7B Chat
745
- * - llama2:13b-chat - Llama 2 13B Chat
746
- * - llama2:70b-chat - Llama 2 70B Chat
747
- * - phi3:mini - Phi 3 Mini
748
- * - mistral:instruct - Mistral 7B Instruct
749
- * - mixtral:instruct - Mixtral 8x7B Instruct
750
- * - gemma:instruct - Gemma 7B Instruct
751
- * - gemma:7b-instruct-v1.1-q8_0 - Gemma 1.1 7B Instruct
1573
+ * Predefined model alias. Available aliases include popular models like llama2:chat, mistral:instruct, phi3:mini, etc. Use the /models endpoint to see all available aliases.
752
1574
  */
753
1575
  alias: string;
754
1576
  };
@@ -790,7 +1612,7 @@ export type GetDownloadStatusData = {
790
1612
  body?: never;
791
1613
  path: {
792
1614
  /**
793
- * Download request identifier
1615
+ * Unique identifier of the download request (UUID format)
794
1616
  */
795
1617
  id: string;
796
1618
  };
@@ -820,47 +1642,76 @@ export type GetDownloadStatusResponses = {
820
1642
 
821
1643
  export type GetDownloadStatusResponse = GetDownloadStatusResponses[keyof GetDownloadStatusResponses];
822
1644
 
823
- export type ListModelAliasesData = {
1645
+ export type ListAllModelsData = {
824
1646
  body?: never;
825
1647
  path?: never;
826
1648
  query?: {
827
1649
  /**
828
- * Page number (1-based)
1650
+ * Page number (1-based indexing)
829
1651
  */
830
1652
  page?: number;
831
1653
  /**
832
- * Number of items per page (max 100)
1654
+ * Number of items to return per page (maximum 100)
833
1655
  */
834
1656
  page_size?: number;
835
1657
  /**
836
- * Field to sort by (repo, filename, size, updated_at, snapshot)
1658
+ * Field to sort by. Common values: repo, filename, size, updated_at, snapshot, created_at
837
1659
  */
838
- sort?: string | null;
1660
+ sort?: string;
839
1661
  /**
840
- * Sort order (asc or desc)
1662
+ * Sort order: 'asc' for ascending, 'desc' for descending
841
1663
  */
842
1664
  sort_order?: string;
843
1665
  };
844
1666
  url: '/bodhi/v1/models';
845
1667
  };
846
1668
 
847
- export type ListModelAliasesErrors = {
1669
+ export type ListAllModelsErrors = {
1670
+ /**
1671
+ * Internal server error
1672
+ */
1673
+ 500: OpenAiApiError;
1674
+ };
1675
+
1676
+ export type ListAllModelsError = ListAllModelsErrors[keyof ListAllModelsErrors];
1677
+
1678
+ export type ListAllModelsResponses = {
1679
+ /**
1680
+ * Paginated list of model aliases retrieved successfully
1681
+ */
1682
+ 200: PaginatedAliasResponse;
1683
+ };
1684
+
1685
+ export type ListAllModelsResponse = ListAllModelsResponses[keyof ListAllModelsResponses];
1686
+
1687
+ export type CreateAliasData = {
1688
+ body: CreateAliasRequest;
1689
+ path?: never;
1690
+ query?: never;
1691
+ url: '/bodhi/v1/models';
1692
+ };
1693
+
1694
+ export type CreateAliasErrors = {
1695
+ /**
1696
+ * Invalid request
1697
+ */
1698
+ 400: OpenAiApiError;
848
1699
  /**
849
1700
  * Internal server error
850
1701
  */
851
1702
  500: OpenAiApiError;
852
1703
  };
853
1704
 
854
- export type ListModelAliasesError = ListModelAliasesErrors[keyof ListModelAliasesErrors];
1705
+ export type CreateAliasError = CreateAliasErrors[keyof CreateAliasErrors];
855
1706
 
856
- export type ListModelAliasesResponses = {
1707
+ export type CreateAliasResponses = {
857
1708
  /**
858
- * List of configured model aliases
1709
+ * Alias created succesfully
859
1710
  */
860
- 200: PaginatedResponseAliasResponse;
1711
+ 201: UserAliasResponse;
861
1712
  };
862
1713
 
863
- export type ListModelAliasesResponse = ListModelAliasesResponses[keyof ListModelAliasesResponses];
1714
+ export type CreateAliasResponse = CreateAliasResponses[keyof CreateAliasResponses];
864
1715
 
865
1716
  export type GetAliasData = {
866
1717
  body?: never;
@@ -891,11 +1742,45 @@ export type GetAliasResponses = {
891
1742
  /**
892
1743
  * Model alias details
893
1744
  */
894
- 200: AliasResponse;
1745
+ 200: UserAliasResponse;
895
1746
  };
896
1747
 
897
1748
  export type GetAliasResponse = GetAliasResponses[keyof GetAliasResponses];
898
1749
 
1750
+ export type UpdateAliasData = {
1751
+ body: UpdateAliasRequest;
1752
+ path: {
1753
+ /**
1754
+ * Alias identifier
1755
+ */
1756
+ id: string;
1757
+ };
1758
+ query?: never;
1759
+ url: '/bodhi/v1/models/{id}';
1760
+ };
1761
+
1762
+ export type UpdateAliasErrors = {
1763
+ /**
1764
+ * Invalid request
1765
+ */
1766
+ 400: OpenAiApiError;
1767
+ /**
1768
+ * Internal server error
1769
+ */
1770
+ 500: OpenAiApiError;
1771
+ };
1772
+
1773
+ export type UpdateAliasError = UpdateAliasErrors[keyof UpdateAliasErrors];
1774
+
1775
+ export type UpdateAliasResponses = {
1776
+ /**
1777
+ * Alias created succesfully
1778
+ */
1779
+ 201: UserAliasResponse;
1780
+ };
1781
+
1782
+ export type UpdateAliasResponse = UpdateAliasResponses[keyof UpdateAliasResponses];
1783
+
899
1784
  export type ListSettingsData = {
900
1785
  body?: never;
901
1786
  path?: never;
@@ -918,7 +1803,7 @@ export type ListSettingsError = ListSettingsErrors[keyof ListSettingsErrors];
918
1803
 
919
1804
  export type ListSettingsResponses = {
920
1805
  /**
921
- * List of application settings
1806
+ * Application settings retrieved successfully
922
1807
  */
923
1808
  200: Array<SettingInfo>;
924
1809
  };
@@ -929,7 +1814,7 @@ export type DeleteSettingData = {
929
1814
  body?: never;
930
1815
  path: {
931
1816
  /**
932
- * Setting key to reset
1817
+ * Setting key identifier to reset to default value
933
1818
  */
934
1819
  key: string;
935
1820
  };
@@ -960,11 +1845,14 @@ export type UpdateSettingData = {
960
1845
  * Request to update a setting value
961
1846
  */
962
1847
  body: {
1848
+ /**
1849
+ * New value for the setting (type depends on setting metadata)
1850
+ */
963
1851
  value: unknown;
964
1852
  };
965
1853
  path: {
966
1854
  /**
967
- * Setting key to update
1855
+ * Setting key identifier (e.g., BODHI_LOG_LEVEL, BODHI_PORT)
968
1856
  */
969
1857
  key: string;
970
1858
  };
@@ -995,6 +1883,9 @@ export type UpdateSettingResponses = {
995
1883
  export type UpdateSettingResponse = UpdateSettingResponses[keyof UpdateSettingResponses];
996
1884
 
997
1885
  export type SetupAppData = {
1886
+ /**
1887
+ * Application setup configuration
1888
+ */
998
1889
  body: SetupRequest;
999
1890
  path?: never;
1000
1891
  query?: never;
@@ -1003,11 +1894,11 @@ export type SetupAppData = {
1003
1894
 
1004
1895
  export type SetupAppErrors = {
1005
1896
  /**
1006
- * Application is already setup
1897
+ * Invalid request or application already setup
1007
1898
  */
1008
1899
  400: OpenAiApiError;
1009
1900
  /**
1010
- * Internal server error
1901
+ * Internal server error during setup
1011
1902
  */
1012
1903
  500: OpenAiApiError;
1013
1904
  };
@@ -1016,7 +1907,7 @@ export type SetupAppError = SetupAppErrors[keyof SetupAppErrors];
1016
1907
 
1017
1908
  export type SetupAppResponses = {
1018
1909
  /**
1019
- * Application setup successful
1910
+ * Application setup completed successfully
1020
1911
  */
1021
1912
  200: SetupResponse;
1022
1913
  };
@@ -1028,19 +1919,19 @@ export type ListApiTokensData = {
1028
1919
  path?: never;
1029
1920
  query?: {
1030
1921
  /**
1031
- * Page number (1-based)
1922
+ * Page number (1-based indexing)
1032
1923
  */
1033
1924
  page?: number;
1034
1925
  /**
1035
- * Number of items per page (max 100)
1926
+ * Number of items to return per page (maximum 100)
1036
1927
  */
1037
1928
  page_size?: number;
1038
1929
  /**
1039
- * Field to sort by (repo, filename, size, updated_at, snapshot)
1930
+ * Field to sort by. Common values: repo, filename, size, updated_at, snapshot, created_at
1040
1931
  */
1041
- sort?: string | null;
1932
+ sort?: string;
1042
1933
  /**
1043
- * Sort order (asc or desc)
1934
+ * Sort order: 'asc' for ascending, 'desc' for descending
1044
1935
  */
1045
1936
  sort_order?: string;
1046
1937
  };
@@ -1064,12 +1955,15 @@ export type ListApiTokensResponses = {
1064
1955
  /**
1065
1956
  * List of API tokens
1066
1957
  */
1067
- 200: PaginatedResponseApiToken;
1958
+ 200: PaginatedApiTokenResponse;
1068
1959
  };
1069
1960
 
1070
1961
  export type ListApiTokensResponse = ListApiTokensResponses[keyof ListApiTokensResponses];
1071
1962
 
1072
1963
  export type CreateApiTokenData = {
1964
+ /**
1965
+ * API token creation parameters
1966
+ */
1073
1967
  body: CreateApiTokenRequest;
1074
1968
  path?: never;
1075
1969
  query?: never;
@@ -1078,11 +1972,11 @@ export type CreateApiTokenData = {
1078
1972
 
1079
1973
  export type CreateApiTokenErrors = {
1080
1974
  /**
1081
- * Invalid request
1975
+ * Invalid request parameters or token name already exists
1082
1976
  */
1083
1977
  400: OpenAiApiError;
1084
1978
  /**
1085
- * Internal server error
1979
+ * Internal server error during token creation
1086
1980
  */
1087
1981
  500: OpenAiApiError;
1088
1982
  };
@@ -1105,7 +1999,7 @@ export type UpdateApiTokenData = {
1105
1999
  body: UpdateApiTokenRequest;
1106
2000
  path: {
1107
2001
  /**
1108
- * Token identifier
2002
+ * Unique identifier of the API token to update
1109
2003
  */
1110
2004
  id: string;
1111
2005
  };
@@ -1148,7 +2042,7 @@ export type GetCurrentUserData = {
1148
2042
 
1149
2043
  export type GetCurrentUserErrors = {
1150
2044
  /**
1151
- * Error in extracting user info from token
2045
+ * Authentication error or invalid token
1152
2046
  */
1153
2047
  500: OpenAiApiError;
1154
2048
  };
@@ -1157,13 +2051,229 @@ export type GetCurrentUserError = GetCurrentUserErrors[keyof GetCurrentUserError
1157
2051
 
1158
2052
  export type GetCurrentUserResponses = {
1159
2053
  /**
1160
- * Returns current user information
2054
+ * Current user information retrieved successfully
1161
2055
  */
1162
- 200: UserInfo;
2056
+ 200: UserResponse;
1163
2057
  };
1164
2058
 
1165
2059
  export type GetCurrentUserResponse = GetCurrentUserResponses[keyof GetCurrentUserResponses];
1166
2060
 
2061
+ export type RequestUserAccessData = {
2062
+ body?: never;
2063
+ path?: never;
2064
+ query?: never;
2065
+ url: '/bodhi/v1/user/request-access';
2066
+ };
2067
+
2068
+ export type RequestUserAccessErrors = {
2069
+ /**
2070
+ * Not authenticated
2071
+ */
2072
+ 401: OpenAiApiError;
2073
+ /**
2074
+ * Pending request already exists
2075
+ */
2076
+ 409: OpenAiApiError;
2077
+ /**
2078
+ * User already has role
2079
+ */
2080
+ 422: OpenAiApiError;
2081
+ };
2082
+
2083
+ export type RequestUserAccessError = RequestUserAccessErrors[keyof RequestUserAccessErrors];
2084
+
2085
+ export type RequestUserAccessResponses = {
2086
+ /**
2087
+ * Access request created successfully
2088
+ */
2089
+ 201: EmptyResponse;
2090
+ };
2091
+
2092
+ export type RequestUserAccessResponse = RequestUserAccessResponses[keyof RequestUserAccessResponses];
2093
+
2094
+ export type GetUserAccessStatusData = {
2095
+ body?: never;
2096
+ path?: never;
2097
+ query?: never;
2098
+ url: '/bodhi/v1/user/request-status';
2099
+ };
2100
+
2101
+ export type GetUserAccessStatusErrors = {
2102
+ /**
2103
+ * Bad Request
2104
+ */
2105
+ 400: OpenAiApiError;
2106
+ /**
2107
+ * Not authenticated
2108
+ */
2109
+ 401: OpenAiApiError;
2110
+ /**
2111
+ * Request not found
2112
+ */
2113
+ 404: OpenAiApiError;
2114
+ };
2115
+
2116
+ export type GetUserAccessStatusError = GetUserAccessStatusErrors[keyof GetUserAccessStatusErrors];
2117
+
2118
+ export type GetUserAccessStatusResponses = {
2119
+ /**
2120
+ * Request status retrieved
2121
+ */
2122
+ 200: UserAccessStatusResponse;
2123
+ };
2124
+
2125
+ export type GetUserAccessStatusResponse = GetUserAccessStatusResponses[keyof GetUserAccessStatusResponses];
2126
+
2127
+ export type ListUsersData = {
2128
+ body?: never;
2129
+ path?: never;
2130
+ query?: {
2131
+ /**
2132
+ * Page number (1-based)
2133
+ */
2134
+ page?: number;
2135
+ /**
2136
+ * Number of users per page
2137
+ */
2138
+ page_size?: number;
2139
+ };
2140
+ url: '/bodhi/v1/users';
2141
+ };
2142
+
2143
+ export type ListUsersErrors = {
2144
+ /**
2145
+ * Invalid request parameters
2146
+ */
2147
+ 400: OpenAiApiError;
2148
+ /**
2149
+ * Not authenticated
2150
+ */
2151
+ 401: OpenAiApiError;
2152
+ /**
2153
+ * Insufficient permissions
2154
+ */
2155
+ 403: OpenAiApiError;
2156
+ /**
2157
+ * Internal server error
2158
+ */
2159
+ 500: OpenAiApiError;
2160
+ };
2161
+
2162
+ export type ListUsersError = ListUsersErrors[keyof ListUsersErrors];
2163
+
2164
+ export type ListUsersResponses = {
2165
+ /**
2166
+ * Users retrieved successfully
2167
+ */
2168
+ 200: UserListResponse;
2169
+ };
2170
+
2171
+ export type ListUsersResponse = ListUsersResponses[keyof ListUsersResponses];
2172
+
2173
+ export type RemoveUserData = {
2174
+ body?: never;
2175
+ path: {
2176
+ /**
2177
+ * User ID to remove
2178
+ */
2179
+ user_id: string;
2180
+ };
2181
+ query?: never;
2182
+ url: '/bodhi/v1/users/{user_id}';
2183
+ };
2184
+
2185
+ export type RemoveUserErrors = {
2186
+ /**
2187
+ * Invalid request
2188
+ */
2189
+ 400: OpenAiApiError;
2190
+ /**
2191
+ * Not authenticated
2192
+ */
2193
+ 401: OpenAiApiError;
2194
+ /**
2195
+ * Insufficient permissions
2196
+ */
2197
+ 403: OpenAiApiError;
2198
+ /**
2199
+ * User not found
2200
+ */
2201
+ 404: OpenAiApiError;
2202
+ /**
2203
+ * Internal server error
2204
+ */
2205
+ 500: OpenAiApiError;
2206
+ };
2207
+
2208
+ export type RemoveUserError = RemoveUserErrors[keyof RemoveUserErrors];
2209
+
2210
+ export type RemoveUserResponses = {
2211
+ /**
2212
+ * User removed successfully
2213
+ */
2214
+ 200: unknown;
2215
+ };
2216
+
2217
+ export type ChangeUserRoleData = {
2218
+ body: ChangeRoleRequest;
2219
+ path: {
2220
+ /**
2221
+ * User ID to change role for
2222
+ */
2223
+ user_id: string;
2224
+ };
2225
+ query?: never;
2226
+ url: '/bodhi/v1/users/{user_id}/role';
2227
+ };
2228
+
2229
+ export type ChangeUserRoleErrors = {
2230
+ /**
2231
+ * Invalid request
2232
+ */
2233
+ 400: OpenAiApiError;
2234
+ /**
2235
+ * Not authenticated
2236
+ */
2237
+ 401: OpenAiApiError;
2238
+ /**
2239
+ * Insufficient permissions
2240
+ */
2241
+ 403: OpenAiApiError;
2242
+ /**
2243
+ * User not found
2244
+ */
2245
+ 404: OpenAiApiError;
2246
+ /**
2247
+ * Internal server error
2248
+ */
2249
+ 500: OpenAiApiError;
2250
+ };
2251
+
2252
+ export type ChangeUserRoleError = ChangeUserRoleErrors[keyof ChangeUserRoleErrors];
2253
+
2254
+ export type ChangeUserRoleResponses = {
2255
+ /**
2256
+ * Role changed successfully
2257
+ */
2258
+ 200: unknown;
2259
+ };
2260
+
2261
+ export type HealthCheckData = {
2262
+ body?: never;
2263
+ path?: never;
2264
+ query?: never;
2265
+ url: '/health';
2266
+ };
2267
+
2268
+ export type HealthCheckResponses = {
2269
+ /**
2270
+ * Application is healthy and fully operational
2271
+ */
2272
+ 200: PingResponse;
2273
+ };
2274
+
2275
+ export type HealthCheckResponse = HealthCheckResponses[keyof HealthCheckResponses];
2276
+
1167
2277
  export type PingServerData = {
1168
2278
  body?: never;
1169
2279
  path?: never;
@@ -1173,7 +2283,7 @@ export type PingServerData = {
1173
2283
 
1174
2284
  export type PingServerResponses = {
1175
2285
  /**
1176
- * Server is healthy
2286
+ * Server is responding normally
1177
2287
  */
1178
2288
  200: PingResponse;
1179
2289
  };
@@ -1239,11 +2349,49 @@ export type ListModelsResponses = {
1239
2349
  /**
1240
2350
  * List of available models
1241
2351
  */
1242
- 200: ListModelResponseWrapper;
2352
+ 200: ListModelResponse;
1243
2353
  };
1244
2354
 
1245
2355
  export type ListModelsResponse = ListModelsResponses[keyof ListModelsResponses];
1246
2356
 
2357
+ export type GetModelData = {
2358
+ body?: never;
2359
+ path: {
2360
+ /**
2361
+ * Model identifier - can be user alias (e.g., 'llama2:chat'), model alias, or API provider alias
2362
+ */
2363
+ id: string;
2364
+ };
2365
+ query?: never;
2366
+ url: '/v1/models/{id}';
2367
+ };
2368
+
2369
+ export type GetModelErrors = {
2370
+ /**
2371
+ * Invalid authentication
2372
+ */
2373
+ 401: OpenAiApiError;
2374
+ /**
2375
+ * Model not found
2376
+ */
2377
+ 404: OpenAiApiError;
2378
+ /**
2379
+ * Internal server error
2380
+ */
2381
+ 500: OpenAiApiError;
2382
+ };
2383
+
2384
+ export type GetModelError = GetModelErrors[keyof GetModelErrors];
2385
+
2386
+ export type GetModelResponses = {
2387
+ /**
2388
+ * Model details
2389
+ */
2390
+ 200: ModelResponse;
2391
+ };
2392
+
2393
+ export type GetModelResponse = GetModelResponses[keyof GetModelResponses];
2394
+
1247
2395
  export type ClientOptions = {
1248
2396
  baseUrl: 'http://localhost:1135' | (string & {});
1249
2397
  };