@bodhiapp/ts-client 0.1.4 → 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,15 +1,51 @@
1
1
  // This file is auto-generated by @hey-api/openapi-ts
2
2
 
3
- export type AliasResponse = {
4
- alias: string;
5
- chat_template: string;
6
- context_params: GptContextParams;
7
- filename: string;
8
- model_params: {};
9
- repo: string;
10
- request_params: OaiRequestParams;
11
- snapshot: string;
12
- 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;
13
49
  };
14
50
 
15
51
  export type ApiToken = {
@@ -25,31 +61,77 @@ export type ApiToken = {
25
61
 
26
62
  export type ApiTokenResponse = {
27
63
  /**
28
- * Offline token that can be used as API Token
64
+ * API token with bapp_ prefix for programmatic access
29
65
  */
30
66
  offline_token: string;
31
67
  };
32
68
 
69
+ export type AppAccessRequest = {
70
+ app_client_id: string;
71
+ };
72
+
73
+ export type AppAccessResponse = {
74
+ scope: string;
75
+ };
76
+
33
77
  /**
34
78
  * Application information and status
35
79
  */
36
80
  export type AppInfo = {
37
81
  /**
38
- * Whether authentication is enabled
39
- */
40
- authz: boolean;
41
- /**
42
- * Current application status
82
+ * Current application setup and operational status
43
83
  */
44
84
  status: AppStatus;
45
85
  /**
46
- * Application version
86
+ * Application version number (semantic versioning)
47
87
  */
48
88
  version: string;
49
89
  };
50
90
 
91
+ export type AppRole = Role | TokenScope | UserScope;
92
+
51
93
  export type AppStatus = 'setup' | 'ready' | 'resource-admin';
52
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
+
105
+ export type AuthCallbackRequest = {
106
+ /**
107
+ * OAuth authorization code from successful authentication (required for success flow)
108
+ */
109
+ code?: string | null;
110
+ /**
111
+ * OAuth error code if authentication failed (e.g., "access_denied")
112
+ */
113
+ error?: string | null;
114
+ /**
115
+ * Human-readable OAuth error description if authentication failed
116
+ */
117
+ error_description?: string | null;
118
+ /**
119
+ * OAuth state parameter for CSRF protection (must match initiated request)
120
+ */
121
+ state?: string | null;
122
+ [key: string]: string | (string | null) | (string | null) | (string | null) | (string | null) | undefined;
123
+ };
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
+
53
135
  export type ChatRequest = {
54
136
  format?: string | null;
55
137
  keep_alive?: null | Duration;
@@ -59,24 +141,39 @@ export type ChatRequest = {
59
141
  stream?: boolean | null;
60
142
  };
61
143
 
62
- /**
63
- * Chat template identifier for built-in templates
64
- */
65
- export type ChatTemplateId = 'llama3' | 'llama2' | 'llama2-legacy' | 'phi3' | 'gemma' | 'deepseek' | 'command-r' | 'openchat' | 'tinyllama';
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
+ };
66
152
 
67
153
  /**
68
- * Chat template type that can be either built-in or from a repository
154
+ * Request to create a new API model configuration
69
155
  */
70
- export type ChatTemplateType = 'Embedded' | {
156
+ export type CreateApiModelRequest = {
71
157
  /**
72
- * Built-in chat template using Id
158
+ * API format/protocol (e.g., "openai")
73
159
  */
74
- Id: ChatTemplateId;
75
- } | {
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>;
76
173
  /**
77
- * Custom chat template from a repository
174
+ * Optional prefix for model namespacing (e.g., "azure/" for "azure/gpt-4", "openai:" for "openai:gpt-4")
78
175
  */
79
- Repo: Repo;
176
+ prefix?: string | null;
80
177
  };
81
178
 
82
179
  /**
@@ -84,18 +181,21 @@ export type ChatTemplateType = 'Embedded' | {
84
181
  */
85
182
  export type CreateApiTokenRequest = {
86
183
  /**
87
- * Optional name for the API token
184
+ * Descriptive name for the API token (minimum 3 characters)
88
185
  */
89
186
  name?: string | null;
90
187
  };
91
188
 
92
189
  export type DownloadRequest = {
93
190
  created_at: string;
191
+ downloaded_bytes?: number;
94
192
  error?: string | null;
95
193
  filename: string;
96
194
  id: string;
97
195
  repo: string;
196
+ started_at: string;
98
197
  status: DownloadStatus;
198
+ total_bytes?: number | null;
99
199
  updated_at: string;
100
200
  };
101
201
 
@@ -103,23 +203,55 @@ export type DownloadStatus = 'pending' | 'completed' | 'error';
103
203
 
104
204
  export type Duration = string;
105
205
 
206
+ export type EmptyResponse = {
207
+ [key: string]: unknown;
208
+ };
209
+
106
210
  export type ErrorBody = {
211
+ /**
212
+ * Specific error code for programmatic error handling
213
+ */
107
214
  code?: string | null;
215
+ /**
216
+ * Human-readable error message describing what went wrong
217
+ */
108
218
  message: string;
219
+ /**
220
+ * Parameter name that caused the error (for validation errors)
221
+ */
109
222
  param?: string | null;
223
+ /**
224
+ * Error type categorizing the kind of error that occurred
225
+ */
110
226
  type: string;
111
227
  };
112
228
 
113
- export type GptContextParams = {
114
- n_ctx?: number | null;
115
- n_keep?: number | null;
116
- n_parallel?: number | null;
117
- n_predict?: number | null;
118
- n_seed?: number | null;
119
- 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>;
120
252
  };
121
253
 
122
- export type ListModelResponseWrapper = {
254
+ export type ListModelResponse = {
123
255
  data: Array<{
124
256
  /**
125
257
  * The Unix timestamp (in seconds) when the model was created.
@@ -141,6 +273,14 @@ export type ListModelResponseWrapper = {
141
273
  object: string;
142
274
  };
143
275
 
276
+ /**
277
+ * List users query parameters
278
+ */
279
+ export type ListUsersParams = {
280
+ page?: number | null;
281
+ page_size?: number | null;
282
+ };
283
+
144
284
  export type LocalModelResponse = {
145
285
  filename: string;
146
286
  model_params: {};
@@ -163,6 +303,13 @@ export type Model = {
163
303
  size: number;
164
304
  };
165
305
 
306
+ export type ModelAlias = {
307
+ alias: string;
308
+ filename: string;
309
+ repo: string;
310
+ snapshot: string;
311
+ };
312
+
166
313
  export type ModelDetails = {
167
314
  families?: Array<string> | null;
168
315
  family: string;
@@ -172,6 +319,28 @@ export type ModelDetails = {
172
319
  quantization_level: string;
173
320
  };
174
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
+
175
344
  export type ModelsResponse = {
176
345
  models: Array<Model>;
177
346
  };
@@ -181,11 +350,11 @@ export type ModelsResponse = {
181
350
  */
182
351
  export type NewDownloadRequest = {
183
352
  /**
184
- * Model file name to pull
353
+ * Model file name to download (typically .gguf format)
185
354
  */
186
355
  filename: string;
187
356
  /**
188
- * HuggingFace repository name
357
+ * HuggingFace repository name in format 'username/repository-name'
189
358
  */
190
359
  repo: string;
191
360
  };
@@ -206,6 +375,9 @@ export type OllamaError = {
206
375
  };
207
376
 
208
377
  export type OpenAiApiError = {
378
+ /**
379
+ * Error details following OpenAI API error format
380
+ */
209
381
  error: ErrorBody;
210
382
  };
211
383
 
@@ -241,82 +413,114 @@ export type Options = {
241
413
  vocab_only?: boolean | null;
242
414
  };
243
415
 
244
- export type PaginatedResponseAliasResponse = {
245
- data: Array<{
246
- alias: string;
247
- chat_template: string;
248
- context_params: GptContextParams;
249
- filename: string;
250
- model_params: {};
251
- repo: string;
252
- request_params: OaiRequestParams;
253
- snapshot: string;
254
- source: string;
255
- }>;
416
+ export type PaginatedAliasResponse = {
417
+ data: Array<Alias>;
256
418
  page: number;
257
419
  page_size: number;
258
420
  total: number;
259
421
  };
260
422
 
261
- export type PaginatedResponseApiToken = {
262
- data: Array<{
263
- created_at: string;
264
- id: string;
265
- name: string;
266
- status: TokenStatus;
267
- token_hash: string;
268
- token_id: string;
269
- updated_at: string;
270
- user_id: string;
271
- }>;
423
+ /**
424
+ * Paginated response for API model listings
425
+ */
426
+ export type PaginatedApiModelResponse = {
427
+ data: Array<ApiModelResponse>;
272
428
  page: number;
273
429
  page_size: number;
274
430
  total: number;
275
431
  };
276
432
 
277
- export type PaginatedResponseDownloadRequest = {
278
- data: Array<{
279
- created_at: string;
280
- error?: string | null;
281
- filename: string;
282
- id: string;
283
- repo: string;
284
- status: DownloadStatus;
285
- updated_at: string;
286
- }>;
433
+ export type PaginatedApiTokenResponse = {
434
+ data: Array<ApiToken>;
287
435
  page: number;
288
436
  page_size: number;
289
437
  total: number;
290
438
  };
291
439
 
292
- export type PaginatedResponseLocalModelResponse = {
293
- data: Array<{
294
- filename: string;
295
- model_params: {};
296
- repo: string;
297
- size?: number | null;
298
- snapshot: string;
299
- }>;
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>;
300
478
  page: number;
301
479
  page_size: number;
302
480
  total: number;
303
481
  };
304
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
+
305
505
  /**
306
506
  * Response to the ping endpoint
307
507
  */
308
508
  export type PingResponse = {
309
509
  /**
310
- * always returns "pong"
510
+ * Simple ping response message
311
511
  */
312
512
  message: string;
313
513
  };
314
514
 
315
- export type Repo = {
316
- name: string;
317
- user: string;
515
+ export type RedirectResponse = {
516
+ /**
517
+ * The URL to redirect to (OAuth authorization URL or application home page)
518
+ */
519
+ location: string;
318
520
  };
319
521
 
522
+ export type Role = 'resource_user' | 'resource_power_user' | 'resource_manager' | 'resource_admin';
523
+
320
524
  export type SettingInfo = {
321
525
  current_value: unknown;
322
526
  default_value: unknown;
@@ -341,15 +545,17 @@ export type SettingMetadata = {
341
545
  export type SettingSource = 'system' | 'command_line' | 'environment' | 'settings_file' | 'default';
342
546
 
343
547
  /**
344
- * Request to setup the application in authenticated or non-authenticated mode
548
+ * Request to setup the application in authenticated mode
345
549
  */
346
550
  export type SetupRequest = {
347
551
  /**
348
- * Whether to enable authentication
349
- * - true: Setup app in authenticated mode with role-based access
350
- * - false: Setup app in non-authenticated mode for open access
552
+ * Optional description of the server's purpose
553
+ */
554
+ description?: string | null;
555
+ /**
556
+ * Server name for identification (minimum 10 characters)
351
557
  */
352
- authz: boolean;
558
+ name: string;
353
559
  };
354
560
 
355
561
  /**
@@ -357,9 +563,7 @@ export type SetupRequest = {
357
563
  */
358
564
  export type SetupResponse = {
359
565
  /**
360
- * New application status after setup
361
- * - resource-admin: When setup in authenticated mode
362
- * - ready: When setup in non-authenticated mode
566
+ * New application status after successful setup
363
567
  */
364
568
  status: AppStatus;
365
569
  };
@@ -378,14 +582,85 @@ export type ShowResponse = {
378
582
  template: string;
379
583
  };
380
584
 
585
+ /**
586
+ * Request to test API connectivity with a prompt
587
+ */
588
+ export type TestPromptRequest = {
589
+ /**
590
+ * API key for authentication (provide either api_key OR id, api_key takes preference if both provided)
591
+ */
592
+ api_key?: string;
593
+ /**
594
+ * API base URL (optional when using id)
595
+ */
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;
609
+ };
610
+
611
+ /**
612
+ * Response from testing API connectivity
613
+ */
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
+
381
622
  export type TokenStatus = 'active' | 'inactive';
382
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;
630
+ };
631
+
632
+ /**
633
+ * Request to update an existing API model configuration
634
+ */
635
+ export type UpdateApiModelRequest = {
636
+ /**
637
+ * API format/protocol (required)
638
+ */
639
+ api_format: ApiFormat;
640
+ /**
641
+ * API key for authentication (optional, only update if provided for security)
642
+ */
643
+ api_key?: string | null;
644
+ /**
645
+ * API base URL (required)
646
+ */
647
+ base_url: string;
648
+ /**
649
+ * List of available models (required)
650
+ */
651
+ models: Array<string>;
652
+ /**
653
+ * Optional prefix for model namespacing
654
+ */
655
+ prefix?: string | null;
656
+ };
657
+
383
658
  /**
384
659
  * Request to update an existing API token
385
660
  */
386
661
  export type UpdateApiTokenRequest = {
387
662
  /**
388
- * New name for the token
663
+ * New descriptive name for the token (minimum 3 characters)
389
664
  */
390
665
  name: string;
391
666
  /**
@@ -398,59 +673,146 @@ export type UpdateApiTokenRequest = {
398
673
  * Request to update a setting value
399
674
  */
400
675
  export type UpdateSettingRequest = {
676
+ /**
677
+ * New value for the setting (type depends on setting metadata)
678
+ */
401
679
  value: unknown;
402
680
  };
403
681
 
404
- /**
405
- * Information about the currently logged in user
406
- */
407
- export type UserInfo = {
682
+ export type UserAccessRequest = {
408
683
  /**
409
- * User's email address
684
+ * Creation timestamp
410
685
  */
411
- email?: string | null;
686
+ created_at: string;
412
687
  /**
413
- * If user is logged in
688
+ * Unique identifier for the request
414
689
  */
415
- logged_in: boolean;
690
+ id: number;
691
+ reviewer?: string | null;
416
692
  /**
417
- * List of roles assigned to the user
693
+ * Current status of the request
418
694
  */
419
- roles: Array<string>;
420
- };
421
-
422
- export type ChatOllamaModelData = {
695
+ status: UserAccessRequestStatus;
423
696
  /**
424
- * Chat request in Ollama format
697
+ * Last update timestamp
425
698
  */
426
- body: ChatRequest;
427
- path?: never;
428
- query?: never;
429
- url: '/api/chat';
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;
430
708
  };
431
709
 
432
- export type ChatOllamaModelErrors = {
710
+ export type UserAccessRequestStatus = 'pending' | 'approved' | 'rejected';
711
+
712
+ /**
713
+ * Response for checking access request status
714
+ */
715
+ export type UserAccessStatusResponse = {
433
716
  /**
434
- * Invalid request
717
+ * Creation timestamp
435
718
  */
436
- 400: OllamaError;
719
+ created_at: string;
437
720
  /**
438
- * Model not found
721
+ * Current status of the request (pending, approved, rejected)
439
722
  */
440
- 404: OllamaError;
723
+ status: UserAccessRequestStatus;
441
724
  /**
442
- * Internal server error
725
+ * Last update timestamp
443
726
  */
444
- 500: OllamaError;
445
- };
446
-
447
- export type ChatOllamaModelError = ChatOllamaModelErrors[keyof ChatOllamaModelErrors];
448
-
449
- export type ChatOllamaModelResponses = {
727
+ updated_at: string;
450
728
  /**
451
- * Chat response
729
+ * Username of the requesting user
452
730
  */
453
- 200: unknown;
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;
454
816
  };
455
817
 
456
818
  export type ShowOllamaModelData = {
@@ -494,46 +856,545 @@ export type ListOllamaModelsData = {
494
856
 
495
857
  export type ListOllamaModelsErrors = {
496
858
  /**
497
- * 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
1323
+ */
1324
+ 500: OpenAiApiError;
1325
+ };
1326
+
1327
+ export type RequestAccessError = RequestAccessErrors[keyof RequestAccessErrors];
1328
+
1329
+ export type RequestAccessResponses = {
1330
+ /**
1331
+ * Access granted successfully
1332
+ */
1333
+ 200: AppAccessResponse;
1334
+ };
1335
+
1336
+ export type RequestAccessResponse = RequestAccessResponses[keyof RequestAccessResponses];
1337
+
1338
+ export type CompleteOAuthFlowData = {
1339
+ /**
1340
+ * OAuth callback parameters from authorization server
1341
+ */
1342
+ body: AuthCallbackRequest;
1343
+ path?: never;
1344
+ query?: never;
1345
+ url: '/bodhi/v1/auth/callback';
1346
+ };
1347
+
1348
+ export type CompleteOAuthFlowErrors = {
1349
+ /**
1350
+ * OAuth error, invalid request parameters, or state mismatch
1351
+ */
1352
+ 422: OpenAiApiError;
1353
+ /**
1354
+ * Internal server error during token exchange
498
1355
  */
499
- 500: OllamaError;
1356
+ 500: OpenAiApiError;
500
1357
  };
501
1358
 
502
- export type ListOllamaModelsError = ListOllamaModelsErrors[keyof ListOllamaModelsErrors];
1359
+ export type CompleteOAuthFlowError = CompleteOAuthFlowErrors[keyof CompleteOAuthFlowErrors];
503
1360
 
504
- export type ListOllamaModelsResponses = {
1361
+ export type CompleteOAuthFlowResponses = {
505
1362
  /**
506
- * List of available models
1363
+ * OAuth flow completed successfully, user authenticated
507
1364
  */
508
- 200: ModelsResponse;
1365
+ 200: RedirectResponse;
509
1366
  };
510
1367
 
511
- export type ListOllamaModelsResponse = ListOllamaModelsResponses[keyof ListOllamaModelsResponses];
1368
+ export type CompleteOAuthFlowResponse = CompleteOAuthFlowResponses[keyof CompleteOAuthFlowResponses];
512
1369
 
513
- export type ListChatTemplatesData = {
514
- body?: never;
1370
+ export type InitiateOAuthFlowData = {
1371
+ body: unknown;
515
1372
  path?: never;
516
1373
  query?: never;
517
- url: '/bodhi/v1/chat_templates';
1374
+ url: '/bodhi/v1/auth/initiate';
518
1375
  };
519
1376
 
520
- export type ListChatTemplatesErrors = {
1377
+ export type InitiateOAuthFlowErrors = {
521
1378
  /**
522
- * Internal server error
1379
+ * Internal server error during OAuth initialization
523
1380
  */
524
1381
  500: OpenAiApiError;
525
1382
  };
526
1383
 
527
- export type ListChatTemplatesError = ListChatTemplatesErrors[keyof ListChatTemplatesErrors];
1384
+ export type InitiateOAuthFlowError = InitiateOAuthFlowErrors[keyof InitiateOAuthFlowErrors];
528
1385
 
529
- export type ListChatTemplatesResponses = {
1386
+ export type InitiateOAuthFlowResponses = {
1387
+ /**
1388
+ * User already authenticated, home page URL provided
1389
+ */
1390
+ 200: RedirectResponse;
530
1391
  /**
531
- * List of available chat templates
1392
+ * User not authenticated, OAuth authorization URL provided
532
1393
  */
533
- 200: Array<ChatTemplateType>;
1394
+ 201: RedirectResponse;
534
1395
  };
535
1396
 
536
- export type ListChatTemplatesResponse = ListChatTemplatesResponses[keyof ListChatTemplatesResponses];
1397
+ export type InitiateOAuthFlowResponse = InitiateOAuthFlowResponses[keyof InitiateOAuthFlowResponses];
537
1398
 
538
1399
  export type GetAppInfoData = {
539
1400
  body?: never;
@@ -553,7 +1414,7 @@ export type GetAppInfoError = GetAppInfoErrors[keyof GetAppInfoErrors];
553
1414
 
554
1415
  export type GetAppInfoResponses = {
555
1416
  /**
556
- * Returns the status information about the Application
1417
+ * Application information retrieved successfully
557
1418
  */
558
1419
  200: AppInfo;
559
1420
  };
@@ -578,29 +1439,31 @@ export type LogoutUserError = LogoutUserErrors[keyof LogoutUserErrors];
578
1439
 
579
1440
  export type LogoutUserResponses = {
580
1441
  /**
581
- * Logout successful, redirects to login page
1442
+ * User logged out successfully
582
1443
  */
583
- 200: unknown;
1444
+ 200: RedirectResponse;
584
1445
  };
585
1446
 
1447
+ export type LogoutUserResponse = LogoutUserResponses[keyof LogoutUserResponses];
1448
+
586
1449
  export type ListModelFilesData = {
587
1450
  body?: never;
588
1451
  path?: never;
589
1452
  query?: {
590
1453
  /**
591
- * Page number (1-based)
1454
+ * Page number (1-based indexing)
592
1455
  */
593
1456
  page?: number;
594
1457
  /**
595
- * Number of items per page (max 100)
1458
+ * Number of items to return per page (maximum 100)
596
1459
  */
597
1460
  page_size?: number;
598
1461
  /**
599
- * 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
600
1463
  */
601
- sort?: string | null;
1464
+ sort?: string;
602
1465
  /**
603
- * Sort order (asc or desc)
1466
+ * Sort order: 'asc' for ascending, 'desc' for descending
604
1467
  */
605
1468
  sort_order?: string;
606
1469
  };
@@ -618,9 +1481,9 @@ export type ListModelFilesError = ListModelFilesErrors[keyof ListModelFilesError
618
1481
 
619
1482
  export type ListModelFilesResponses = {
620
1483
  /**
621
- * List of supported model files from local HuggingFace cache folder
1484
+ * Local model files retrieved successfully from cache
622
1485
  */
623
- 200: PaginatedResponseLocalModelResponse;
1486
+ 200: PaginatedLocalModelResponse;
624
1487
  };
625
1488
 
626
1489
  export type ListModelFilesResponse = ListModelFilesResponses[keyof ListModelFilesResponses];
@@ -630,19 +1493,19 @@ export type ListDownloadsData = {
630
1493
  path?: never;
631
1494
  query?: {
632
1495
  /**
633
- * Page number (1-based)
1496
+ * Page number (1-based indexing)
634
1497
  */
635
1498
  page?: number;
636
1499
  /**
637
- * Number of items per page (max 100)
1500
+ * Number of items to return per page (maximum 100)
638
1501
  */
639
1502
  page_size?: number;
640
1503
  /**
641
- * 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
642
1505
  */
643
- sort?: string | null;
1506
+ sort?: string;
644
1507
  /**
645
- * Sort order (asc or desc)
1508
+ * Sort order: 'asc' for ascending, 'desc' for descending
646
1509
  */
647
1510
  sort_order?: string;
648
1511
  };
@@ -651,7 +1514,7 @@ export type ListDownloadsData = {
651
1514
 
652
1515
  export type ListDownloadsErrors = {
653
1516
  /**
654
- * Internal server error
1517
+ * Internal server error during download list retrieval
655
1518
  */
656
1519
  500: OpenAiApiError;
657
1520
  };
@@ -660,16 +1523,16 @@ export type ListDownloadsError = ListDownloadsErrors[keyof ListDownloadsErrors];
660
1523
 
661
1524
  export type ListDownloadsResponses = {
662
1525
  /**
663
- * List of download requests
1526
+ * Model download requests retrieved successfully
664
1527
  */
665
- 200: PaginatedResponseDownloadRequest;
1528
+ 200: PaginatedDownloadResponse;
666
1529
  };
667
1530
 
668
1531
  export type ListDownloadsResponse = ListDownloadsResponses[keyof ListDownloadsResponses];
669
1532
 
670
1533
  export type PullModelFileData = {
671
1534
  /**
672
- * Model file download request
1535
+ * Model file download specification with repository and filename
673
1536
  */
674
1537
  body: NewDownloadRequest;
675
1538
  path?: never;
@@ -707,17 +1570,7 @@ export type PullModelByAliasData = {
707
1570
  body?: never;
708
1571
  path: {
709
1572
  /**
710
- * Available model aliases:
711
- * - llama3:instruct - Meta Llama 3 8B Instruct
712
- * - llama3:70b-instruct - Meta Llama 3 70B Instruct
713
- * - llama2:chat - Llama 2 7B Chat
714
- * - llama2:13b-chat - Llama 2 13B Chat
715
- * - llama2:70b-chat - Llama 2 70B Chat
716
- * - phi3:mini - Phi 3 Mini
717
- * - mistral:instruct - Mistral 7B Instruct
718
- * - mixtral:instruct - Mixtral 8x7B Instruct
719
- * - gemma:instruct - Gemma 7B Instruct
720
- * - 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.
721
1574
  */
722
1575
  alias: string;
723
1576
  };
@@ -759,7 +1612,7 @@ export type GetDownloadStatusData = {
759
1612
  body?: never;
760
1613
  path: {
761
1614
  /**
762
- * Download request identifier
1615
+ * Unique identifier of the download request (UUID format)
763
1616
  */
764
1617
  id: string;
765
1618
  };
@@ -789,47 +1642,76 @@ export type GetDownloadStatusResponses = {
789
1642
 
790
1643
  export type GetDownloadStatusResponse = GetDownloadStatusResponses[keyof GetDownloadStatusResponses];
791
1644
 
792
- export type ListModelAliasesData = {
1645
+ export type ListAllModelsData = {
793
1646
  body?: never;
794
1647
  path?: never;
795
1648
  query?: {
796
1649
  /**
797
- * Page number (1-based)
1650
+ * Page number (1-based indexing)
798
1651
  */
799
1652
  page?: number;
800
1653
  /**
801
- * Number of items per page (max 100)
1654
+ * Number of items to return per page (maximum 100)
802
1655
  */
803
1656
  page_size?: number;
804
1657
  /**
805
- * 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
806
1659
  */
807
- sort?: string | null;
1660
+ sort?: string;
808
1661
  /**
809
- * Sort order (asc or desc)
1662
+ * Sort order: 'asc' for ascending, 'desc' for descending
810
1663
  */
811
1664
  sort_order?: string;
812
1665
  };
813
1666
  url: '/bodhi/v1/models';
814
1667
  };
815
1668
 
816
- 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;
817
1699
  /**
818
1700
  * Internal server error
819
1701
  */
820
1702
  500: OpenAiApiError;
821
1703
  };
822
1704
 
823
- export type ListModelAliasesError = ListModelAliasesErrors[keyof ListModelAliasesErrors];
1705
+ export type CreateAliasError = CreateAliasErrors[keyof CreateAliasErrors];
824
1706
 
825
- export type ListModelAliasesResponses = {
1707
+ export type CreateAliasResponses = {
826
1708
  /**
827
- * List of configured model aliases
1709
+ * Alias created succesfully
828
1710
  */
829
- 200: PaginatedResponseAliasResponse;
1711
+ 201: UserAliasResponse;
830
1712
  };
831
1713
 
832
- export type ListModelAliasesResponse = ListModelAliasesResponses[keyof ListModelAliasesResponses];
1714
+ export type CreateAliasResponse = CreateAliasResponses[keyof CreateAliasResponses];
833
1715
 
834
1716
  export type GetAliasData = {
835
1717
  body?: never;
@@ -860,11 +1742,45 @@ export type GetAliasResponses = {
860
1742
  /**
861
1743
  * Model alias details
862
1744
  */
863
- 200: AliasResponse;
1745
+ 200: UserAliasResponse;
864
1746
  };
865
1747
 
866
1748
  export type GetAliasResponse = GetAliasResponses[keyof GetAliasResponses];
867
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
+
868
1784
  export type ListSettingsData = {
869
1785
  body?: never;
870
1786
  path?: never;
@@ -887,7 +1803,7 @@ export type ListSettingsError = ListSettingsErrors[keyof ListSettingsErrors];
887
1803
 
888
1804
  export type ListSettingsResponses = {
889
1805
  /**
890
- * List of application settings
1806
+ * Application settings retrieved successfully
891
1807
  */
892
1808
  200: Array<SettingInfo>;
893
1809
  };
@@ -898,7 +1814,7 @@ export type DeleteSettingData = {
898
1814
  body?: never;
899
1815
  path: {
900
1816
  /**
901
- * Setting key to reset
1817
+ * Setting key identifier to reset to default value
902
1818
  */
903
1819
  key: string;
904
1820
  };
@@ -929,11 +1845,14 @@ export type UpdateSettingData = {
929
1845
  * Request to update a setting value
930
1846
  */
931
1847
  body: {
1848
+ /**
1849
+ * New value for the setting (type depends on setting metadata)
1850
+ */
932
1851
  value: unknown;
933
1852
  };
934
1853
  path: {
935
1854
  /**
936
- * Setting key to update
1855
+ * Setting key identifier (e.g., BODHI_LOG_LEVEL, BODHI_PORT)
937
1856
  */
938
1857
  key: string;
939
1858
  };
@@ -964,6 +1883,9 @@ export type UpdateSettingResponses = {
964
1883
  export type UpdateSettingResponse = UpdateSettingResponses[keyof UpdateSettingResponses];
965
1884
 
966
1885
  export type SetupAppData = {
1886
+ /**
1887
+ * Application setup configuration
1888
+ */
967
1889
  body: SetupRequest;
968
1890
  path?: never;
969
1891
  query?: never;
@@ -972,11 +1894,11 @@ export type SetupAppData = {
972
1894
 
973
1895
  export type SetupAppErrors = {
974
1896
  /**
975
- * Application is already setup
1897
+ * Invalid request or application already setup
976
1898
  */
977
1899
  400: OpenAiApiError;
978
1900
  /**
979
- * Internal server error
1901
+ * Internal server error during setup
980
1902
  */
981
1903
  500: OpenAiApiError;
982
1904
  };
@@ -985,7 +1907,7 @@ export type SetupAppError = SetupAppErrors[keyof SetupAppErrors];
985
1907
 
986
1908
  export type SetupAppResponses = {
987
1909
  /**
988
- * Application setup successful
1910
+ * Application setup completed successfully
989
1911
  */
990
1912
  200: SetupResponse;
991
1913
  };
@@ -997,19 +1919,19 @@ export type ListApiTokensData = {
997
1919
  path?: never;
998
1920
  query?: {
999
1921
  /**
1000
- * Page number (1-based)
1922
+ * Page number (1-based indexing)
1001
1923
  */
1002
1924
  page?: number;
1003
1925
  /**
1004
- * Number of items per page (max 100)
1926
+ * Number of items to return per page (maximum 100)
1005
1927
  */
1006
1928
  page_size?: number;
1007
1929
  /**
1008
- * 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
1009
1931
  */
1010
- sort?: string | null;
1932
+ sort?: string;
1011
1933
  /**
1012
- * Sort order (asc or desc)
1934
+ * Sort order: 'asc' for ascending, 'desc' for descending
1013
1935
  */
1014
1936
  sort_order?: string;
1015
1937
  };
@@ -1033,12 +1955,15 @@ export type ListApiTokensResponses = {
1033
1955
  /**
1034
1956
  * List of API tokens
1035
1957
  */
1036
- 200: PaginatedResponseApiToken;
1958
+ 200: PaginatedApiTokenResponse;
1037
1959
  };
1038
1960
 
1039
1961
  export type ListApiTokensResponse = ListApiTokensResponses[keyof ListApiTokensResponses];
1040
1962
 
1041
1963
  export type CreateApiTokenData = {
1964
+ /**
1965
+ * API token creation parameters
1966
+ */
1042
1967
  body: CreateApiTokenRequest;
1043
1968
  path?: never;
1044
1969
  query?: never;
@@ -1047,11 +1972,11 @@ export type CreateApiTokenData = {
1047
1972
 
1048
1973
  export type CreateApiTokenErrors = {
1049
1974
  /**
1050
- * Invalid request
1975
+ * Invalid request parameters or token name already exists
1051
1976
  */
1052
1977
  400: OpenAiApiError;
1053
1978
  /**
1054
- * Internal server error
1979
+ * Internal server error during token creation
1055
1980
  */
1056
1981
  500: OpenAiApiError;
1057
1982
  };
@@ -1074,7 +1999,7 @@ export type UpdateApiTokenData = {
1074
1999
  body: UpdateApiTokenRequest;
1075
2000
  path: {
1076
2001
  /**
1077
- * Token identifier
2002
+ * Unique identifier of the API token to update
1078
2003
  */
1079
2004
  id: string;
1080
2005
  };
@@ -1117,7 +2042,7 @@ export type GetCurrentUserData = {
1117
2042
 
1118
2043
  export type GetCurrentUserErrors = {
1119
2044
  /**
1120
- * Error in extracting user info from token
2045
+ * Authentication error or invalid token
1121
2046
  */
1122
2047
  500: OpenAiApiError;
1123
2048
  };
@@ -1126,13 +2051,229 @@ export type GetCurrentUserError = GetCurrentUserErrors[keyof GetCurrentUserError
1126
2051
 
1127
2052
  export type GetCurrentUserResponses = {
1128
2053
  /**
1129
- * Returns current user information
2054
+ * Current user information retrieved successfully
1130
2055
  */
1131
- 200: UserInfo;
2056
+ 200: UserResponse;
1132
2057
  };
1133
2058
 
1134
2059
  export type GetCurrentUserResponse = GetCurrentUserResponses[keyof GetCurrentUserResponses];
1135
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
+
1136
2277
  export type PingServerData = {
1137
2278
  body?: never;
1138
2279
  path?: never;
@@ -1142,7 +2283,7 @@ export type PingServerData = {
1142
2283
 
1143
2284
  export type PingServerResponses = {
1144
2285
  /**
1145
- * Server is healthy
2286
+ * Server is responding normally
1146
2287
  */
1147
2288
  200: PingResponse;
1148
2289
  };
@@ -1208,11 +2349,49 @@ export type ListModelsResponses = {
1208
2349
  /**
1209
2350
  * List of available models
1210
2351
  */
1211
- 200: ListModelResponseWrapper;
2352
+ 200: ListModelResponse;
1212
2353
  };
1213
2354
 
1214
2355
  export type ListModelsResponse = ListModelsResponses[keyof ListModelsResponses];
1215
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
+
1216
2395
  export type ClientOptions = {
1217
2396
  baseUrl: 'http://localhost:1135' | (string & {});
1218
2397
  };