@bodhiapp/ts-client 0.1.5 → 0.1.7

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,454 +1,2163 @@
1
- export type AliasResponse = {
2
- alias: string;
3
- context_params: GptContextParams;
4
- filename: string;
5
- model_params: {};
6
- repo: string;
7
- request_params: OaiRequestParams;
8
- snapshot: string;
9
- source: string;
1
+ /**
2
+ * Flat enum representing all types of model aliases
3
+ * Each variant is identified by the source field
4
+ */
5
+ export type Alias = (UserAlias & {
6
+ source: 'user';
7
+ }) | (ModelAlias & {
8
+ source: 'model';
9
+ }) | (ApiAlias & {
10
+ source: 'api';
11
+ });
12
+ export type ApiAlias = {
13
+ id: string;
14
+ api_format: ApiFormat;
15
+ base_url: string;
16
+ models: Array<string>;
17
+ prefix?: string | null;
18
+ created_at: string;
19
+ updated_at: string;
10
20
  };
11
- export type ApiToken = {
21
+ /**
22
+ * API format/protocol specification
23
+ */
24
+ export type ApiFormat = 'openai' | 'placeholder';
25
+ /**
26
+ * Response containing available API formats
27
+ */
28
+ export type ApiFormatsResponse = {
29
+ data: Array<ApiFormat>;
30
+ };
31
+ /**
32
+ * Response containing API model configuration
33
+ */
34
+ export type ApiModelResponse = {
35
+ id: string;
36
+ api_format: ApiFormat;
37
+ base_url: string;
38
+ api_key_masked: string;
39
+ models: Array<string>;
40
+ prefix?: string | null;
12
41
  created_at: string;
42
+ updated_at: string;
43
+ };
44
+ export type ApiToken = {
13
45
  id: string;
46
+ user_id: string;
14
47
  name: string;
15
- status: TokenStatus;
48
+ token_prefix: string;
16
49
  token_hash: string;
17
- token_id: string;
50
+ scopes: string;
51
+ status: TokenStatus;
52
+ created_at: string;
18
53
  updated_at: string;
19
- user_id: string;
20
54
  };
21
55
  export type ApiTokenResponse = {
22
56
  /**
23
- * Offline token that can be used as API Token
57
+ * API token with bodhiapp_ prefix for programmatic access
24
58
  */
25
- offline_token: string;
59
+ token: string;
60
+ };
61
+ export type AppAccessRequest = {
62
+ app_client_id: string;
63
+ };
64
+ export type AppAccessResponse = {
65
+ scope: string;
26
66
  };
27
67
  /**
28
68
  * Application information and status
29
69
  */
30
70
  export type AppInfo = {
31
71
  /**
32
- * Current application status
72
+ * Application version number (semantic versioning)
33
73
  */
34
- status: AppStatus;
74
+ version: string;
35
75
  /**
36
- * Application version
76
+ * Current application setup and operational status
37
77
  */
38
- version: string;
78
+ status: AppStatus;
39
79
  };
80
+ export type AppRole = ResourceRole | TokenScope | UserScope;
40
81
  export type AppStatus = 'setup' | 'ready' | 'resource-admin';
82
+ /**
83
+ * Request body for approving access with role assignment
84
+ */
85
+ export type ApproveUserAccessRequest = {
86
+ /**
87
+ * Role to assign to the user
88
+ */
89
+ role: ResourceRole;
90
+ };
41
91
  export type AuthCallbackRequest = {
42
92
  /**
43
- * OAuth authorization code from successful authentication
93
+ * OAuth authorization code from successful authentication (required for success flow)
44
94
  */
45
95
  code?: string | null;
46
96
  /**
47
- * OAuth error code if authentication failed
97
+ * OAuth state parameter for CSRF protection (must match initiated request)
48
98
  */
49
- error?: string | null;
99
+ state?: string | null;
50
100
  /**
51
- * OAuth error description if authentication failed
101
+ * OAuth error code if authentication failed (e.g., "access_denied")
52
102
  */
53
- error_description?: string | null;
103
+ error?: string | null;
54
104
  /**
55
- * OAuth state parameter for CSRF protection
105
+ * Human-readable OAuth error description if authentication failed
56
106
  */
57
- state?: string | null;
107
+ error_description?: string | null;
58
108
  [key: string]: string | (string | null) | (string | null) | (string | null) | (string | null) | undefined;
59
109
  };
60
- export type ChatRequest = {
61
- format?: string | null;
62
- keep_alive?: null | Duration;
63
- messages: Array<Message>;
64
- model: string;
65
- options?: null | Options;
66
- stream?: boolean | null;
67
- };
68
110
  /**
69
- * Request to create a new API token
111
+ * Change user role request
70
112
  */
71
- export type CreateApiTokenRequest = {
113
+ export type ChangeRoleRequest = {
72
114
  /**
73
- * Optional name for the API token
115
+ * Role to assign to the user
74
116
  */
75
- name?: string | null;
76
- };
77
- export type DownloadRequest = {
78
- created_at: string;
79
- error?: string | null;
80
- filename: string;
81
- id: string;
82
- repo: string;
83
- status: DownloadStatus;
84
- updated_at: string;
117
+ role: string;
85
118
  };
86
- export type DownloadStatus = 'pending' | 'completed' | 'error';
87
- export type Duration = string;
88
- export type ErrorBody = {
89
- code?: string | null;
90
- message: string;
91
- param?: string | null;
92
- type: string;
119
+ export type ChatChoice = {
120
+ /**
121
+ * The index of the choice in the list of choices.
122
+ */
123
+ index: number;
124
+ message: ChatCompletionResponseMessage;
125
+ finish_reason?: null | FinishReason;
126
+ logprobs?: null | ChatChoiceLogprobs;
93
127
  };
94
- export type GptContextParams = {
95
- n_ctx?: number | null;
96
- n_keep?: number | null;
97
- n_parallel?: number | null;
98
- n_predict?: number | null;
99
- n_seed?: number | null;
100
- n_threads?: number | null;
128
+ export type ChatChoiceLogprobs = {
129
+ /**
130
+ * A list of message content tokens with log probability information.
131
+ */
132
+ content?: Array<ChatCompletionTokenLogprob> | null;
133
+ refusal?: Array<ChatCompletionTokenLogprob> | null;
101
134
  };
102
- export type ListModelResponseWrapper = {
103
- data: Array<{
104
- /**
105
- * The Unix timestamp (in seconds) when the model was created.
106
- */
107
- created: number;
108
- /**
109
- * The model identifier, which can be referenced in the API endpoints.
110
- */
111
- id: string;
112
- /**
113
- * The object type, which is always "model".
114
- */
115
- object: string;
116
- /**
117
- * The organization that owns the model.
118
- */
119
- owned_by: string;
120
- }>;
121
- object: string;
135
+ export type ChatChoiceStream = {
136
+ /**
137
+ * The index of the choice in the list of choices.
138
+ */
139
+ index: number;
140
+ delta: ChatCompletionStreamResponseDelta;
141
+ finish_reason?: null | FinishReason;
142
+ logprobs?: null | ChatChoiceLogprobs;
122
143
  };
123
- export type LocalModelResponse = {
124
- filename: string;
125
- model_params: {};
126
- repo: string;
127
- size?: number | null;
128
- snapshot: string;
144
+ export type ChatCompletionAudio = {
145
+ /**
146
+ * The voice the model uses to respond. Supported voices are `ash`, `ballad`, `coral`, `sage`, and `verse` (also supported but not recommended are `alloy`, `echo`, and `shimmer`; these voices are less expressive).
147
+ */
148
+ voice: ChatCompletionAudioVoice;
149
+ /**
150
+ * Specifies the output audio format. Must be one of `wav`, `mp3`, `flac`, `opus`, or `pcm16`.
151
+ */
152
+ format: ChatCompletionAudioFormat;
129
153
  };
130
- export type Message = {
131
- content: string;
132
- images?: Array<string> | null;
133
- role: string;
154
+ export type ChatCompletionAudioFormat = 'wav' | 'mp3' | 'flac' | 'opus' | 'pcm16';
155
+ export type ChatCompletionAudioVoice = 'alloy' | 'ash' | 'ballad' | 'coral' | 'echo' | 'sage' | 'shimmer' | 'verse';
156
+ export type ChatCompletionFunctionCall = 'none' | 'auto' | {
157
+ /**
158
+ * Forces the model to call the specified function.
159
+ */
160
+ Function: {
161
+ name: string;
162
+ };
134
163
  };
135
- export type Model = {
136
- details: ModelDetails;
137
- digest: string;
138
- model: string;
139
- modified_at: number;
140
- size: number;
164
+ /**
165
+ * @deprecated
166
+ */
167
+ export type ChatCompletionFunctions = {
168
+ /**
169
+ * The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.
170
+ */
171
+ name: string;
172
+ /**
173
+ * A description of what the function does, used by the model to choose when and how to call the function.
174
+ */
175
+ description?: string | null;
176
+ /**
177
+ * The parameters the functions accepts, described as a JSON Schema object. See the [guide](https://platform.openai.com/docs/guides/text-generation/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format.
178
+ *
179
+ * Omitting `parameters` defines a function with an empty parameter list.
180
+ */
181
+ parameters: unknown;
141
182
  };
142
- export type ModelDetails = {
143
- families?: Array<string> | null;
144
- family: string;
145
- format: string;
146
- parameter_size: string;
147
- parent_model?: string | null;
148
- quantization_level: string;
183
+ export type ChatCompletionMessageToolCall = {
184
+ /**
185
+ * The ID of the tool call.
186
+ */
187
+ id: string;
188
+ /**
189
+ * The type of the tool. Currently, only `function` is supported.
190
+ */
191
+ type: ChatCompletionToolType;
192
+ /**
193
+ * The function that the model called.
194
+ */
195
+ function: FunctionCall;
149
196
  };
150
- export type ModelsResponse = {
151
- models: Array<Model>;
197
+ export type ChatCompletionMessageToolCallChunk = {
198
+ index: number;
199
+ /**
200
+ * The ID of the tool call.
201
+ */
202
+ id?: string | null;
203
+ type?: null | ChatCompletionToolType;
204
+ function?: null | FunctionCallStream;
152
205
  };
153
206
  /**
154
- * Request to pull a model file from HuggingFace
207
+ * Output types that you would like the model to generate for this request.
208
+ *
209
+ * Most models are capable of generating text, which is the default: `["text"]`
210
+ *
211
+ * The `gpt-4o-audio-preview` model can also be used to [generate
212
+ * audio](https://platform.openai.com/docs/guides/audio). To request that this model generate both text and audio responses, you can use: `["text", "audio"]`
155
213
  */
156
- export type NewDownloadRequest = {
214
+ export type ChatCompletionModalities = 'text' | 'audio';
215
+ /**
216
+ * Specifies a tool the model should use. Use to force the model to call a specific function.
217
+ */
218
+ export type ChatCompletionNamedToolChoice = {
157
219
  /**
158
- * Model file name to pull
220
+ * The type of the tool. Currently, only `function` is supported.
159
221
  */
160
- filename: string;
222
+ type: ChatCompletionToolType;
223
+ function: FunctionName;
224
+ };
225
+ export type ChatCompletionRequestAssistantMessage = {
226
+ content?: null | ChatCompletionRequestAssistantMessageContent;
161
227
  /**
162
- * HuggingFace repository name
228
+ * The refusal message by the assistant.
163
229
  */
164
- repo: string;
230
+ refusal?: string | null;
231
+ /**
232
+ * An optional name for the participant. Provides the model information to differentiate between participants of the same role.
233
+ */
234
+ name?: string | null;
235
+ audio?: null | ChatCompletionRequestAssistantMessageAudio;
236
+ tool_calls?: Array<ChatCompletionMessageToolCall> | null;
237
+ function_call?: null | FunctionCall;
165
238
  };
166
- export type OaiRequestParams = {
167
- frequency_penalty?: number | null;
168
- max_tokens?: number | null;
169
- presence_penalty?: number | null;
170
- seed?: number | null;
171
- stop?: Array<string>;
172
- temperature?: number | null;
173
- top_p?: number | null;
174
- user?: string | null;
239
+ export type ChatCompletionRequestAssistantMessageAudio = {
240
+ /**
241
+ * Unique identifier for a previous audio response from the model.
242
+ */
243
+ id: string;
175
244
  };
176
- export type OllamaError = {
177
- error: string;
245
+ export type ChatCompletionRequestAssistantMessageContent = string | Array<ChatCompletionRequestAssistantMessageContentPart>;
246
+ export type ChatCompletionRequestAssistantMessageContentPart = (ChatCompletionRequestMessageContentPartText & {
247
+ type: 'text';
248
+ }) | (ChatCompletionRequestMessageContentPartRefusal & {
249
+ type: 'refusal';
250
+ });
251
+ export type ChatCompletionRequestDeveloperMessage = {
252
+ /**
253
+ * The contents of the developer message.
254
+ */
255
+ content: ChatCompletionRequestDeveloperMessageContent;
256
+ /**
257
+ * An optional name for the participant. Provides the model information to differentiate between participants of the same role.
258
+ */
259
+ name?: string | null;
178
260
  };
179
- export type OpenAiApiError = {
180
- error: ErrorBody;
261
+ export type ChatCompletionRequestDeveloperMessageContent = string | Array<ChatCompletionRequestMessageContentPartText>;
262
+ export type ChatCompletionRequestFunctionMessage = {
263
+ /**
264
+ * The return value from the function call, to return to the model.
265
+ */
266
+ content?: string | null;
267
+ /**
268
+ * The name of the function to call.
269
+ */
270
+ name: string;
181
271
  };
182
- export type Options = {
183
- f16_kv?: boolean | null;
184
- frequency_penalty?: number | null;
185
- logits_all?: boolean | null;
186
- low_vram?: boolean | null;
187
- main_gpu?: number | null;
188
- mirostat?: number | null;
189
- mirostat_eta?: number | null;
190
- mirostat_tau?: number | null;
191
- num_batch?: number | null;
192
- num_ctx?: number | null;
193
- num_gpu?: number | null;
194
- num_keep?: number | null;
195
- num_predict?: number | null;
196
- num_thread?: number | null;
197
- numa?: boolean | null;
198
- penalize_newline?: boolean | null;
199
- presence_penalty?: number | null;
200
- repeat_last_n?: number | null;
201
- repeat_penalty?: number | null;
202
- seed?: number | null;
203
- stop?: Array<string> | null;
204
- temperature?: number | null;
205
- tfs_z?: number | null;
206
- top_k?: number | null;
207
- top_p?: number | null;
208
- typical_p?: number | null;
209
- use_mlock?: boolean | null;
210
- use_mmap?: boolean | null;
211
- vocab_only?: boolean | null;
272
+ export type ChatCompletionRequestMessage = (ChatCompletionRequestDeveloperMessage & {
273
+ role: 'developer';
274
+ }) | (ChatCompletionRequestSystemMessage & {
275
+ role: 'system';
276
+ }) | (ChatCompletionRequestUserMessage & {
277
+ role: 'user';
278
+ }) | (ChatCompletionRequestAssistantMessage & {
279
+ role: 'assistant';
280
+ }) | (ChatCompletionRequestToolMessage & {
281
+ role: 'tool';
282
+ }) | (ChatCompletionRequestFunctionMessage & {
283
+ role: 'function';
284
+ });
285
+ /**
286
+ * Learn about [audio inputs](https://platform.openai.com/docs/guides/audio).
287
+ */
288
+ export type ChatCompletionRequestMessageContentPartAudio = {
289
+ input_audio: InputAudio;
212
290
  };
213
- export type PaginatedResponseAliasResponse = {
214
- data: Array<{
215
- alias: string;
216
- context_params: GptContextParams;
217
- filename: string;
218
- model_params: {};
219
- repo: string;
220
- request_params: OaiRequestParams;
221
- snapshot: string;
222
- source: string;
223
- }>;
224
- page: number;
225
- page_size: number;
226
- total: number;
291
+ export type ChatCompletionRequestMessageContentPartImage = {
292
+ image_url: ImageUrl;
227
293
  };
228
- export type PaginatedResponseApiToken = {
229
- data: Array<{
230
- created_at: string;
231
- id: string;
232
- name: string;
233
- status: TokenStatus;
234
- token_hash: string;
235
- token_id: string;
236
- updated_at: string;
237
- user_id: string;
238
- }>;
239
- page: number;
240
- page_size: number;
241
- total: number;
294
+ export type ChatCompletionRequestMessageContentPartRefusal = {
295
+ /**
296
+ * The refusal message generated by the model.
297
+ */
298
+ refusal: string;
242
299
  };
243
- export type PaginatedResponseDownloadRequest = {
244
- data: Array<{
245
- created_at: string;
246
- error?: string | null;
247
- filename: string;
248
- id: string;
249
- repo: string;
250
- status: DownloadStatus;
251
- updated_at: string;
252
- }>;
253
- page: number;
254
- page_size: number;
255
- total: number;
300
+ export type ChatCompletionRequestMessageContentPartText = {
301
+ text: string;
256
302
  };
257
- export type PaginatedResponseLocalModelResponse = {
258
- data: Array<{
259
- filename: string;
260
- model_params: {};
261
- repo: string;
262
- size?: number | null;
263
- snapshot: string;
264
- }>;
265
- page: number;
266
- page_size: number;
267
- total: number;
303
+ export type ChatCompletionRequestSystemMessage = {
304
+ /**
305
+ * The contents of the system message.
306
+ */
307
+ content: ChatCompletionRequestSystemMessageContent;
308
+ /**
309
+ * An optional name for the participant. Provides the model information to differentiate between participants of the same role.
310
+ */
311
+ name?: string | null;
312
+ };
313
+ export type ChatCompletionRequestSystemMessageContent = string | Array<ChatCompletionRequestSystemMessageContentPart>;
314
+ export type ChatCompletionRequestSystemMessageContentPart = ChatCompletionRequestMessageContentPartText & {
315
+ type: 'text';
268
316
  };
269
317
  /**
270
- * Response to the ping endpoint
318
+ * Tool message
271
319
  */
272
- export type PingResponse = {
320
+ export type ChatCompletionRequestToolMessage = {
273
321
  /**
274
- * always returns "pong"
322
+ * The contents of the tool message.
275
323
  */
276
- message: string;
324
+ content: ChatCompletionRequestToolMessageContent;
325
+ tool_call_id: string;
277
326
  };
278
- export type RedirectResponse = {
327
+ export type ChatCompletionRequestToolMessageContent = string | Array<ChatCompletionRequestToolMessageContentPart>;
328
+ export type ChatCompletionRequestToolMessageContentPart = ChatCompletionRequestMessageContentPartText & {
329
+ type: 'text';
330
+ };
331
+ export type ChatCompletionRequestUserMessage = {
279
332
  /**
280
- * The URL to redirect to for OAuth authentication
333
+ * The contents of the user message.
281
334
  */
282
- location: string;
335
+ content: ChatCompletionRequestUserMessageContent;
336
+ /**
337
+ * An optional name for the participant. Provides the model information to differentiate between participants of the same role.
338
+ */
339
+ name?: string | null;
283
340
  };
284
- export type Repo = {
285
- name: string;
286
- user: string;
341
+ export type ChatCompletionRequestUserMessageContent = string | Array<ChatCompletionRequestUserMessageContentPart>;
342
+ export type ChatCompletionRequestUserMessageContentPart = (ChatCompletionRequestMessageContentPartText & {
343
+ type: 'text';
344
+ }) | (ChatCompletionRequestMessageContentPartImage & {
345
+ type: 'image_url';
346
+ }) | (ChatCompletionRequestMessageContentPartAudio & {
347
+ type: 'input_audio';
348
+ });
349
+ /**
350
+ * A chat completion message generated by the model.
351
+ */
352
+ export type ChatCompletionResponseMessage = {
353
+ /**
354
+ * The contents of the message.
355
+ */
356
+ content?: string | null;
357
+ /**
358
+ * The refusal message generated by the model.
359
+ */
360
+ refusal?: string | null;
361
+ /**
362
+ * The tool calls generated by the model, such as function calls.
363
+ */
364
+ tool_calls?: Array<ChatCompletionMessageToolCall> | null;
365
+ /**
366
+ * The role of the author of this message.
367
+ */
368
+ role: Role;
369
+ function_call?: null | FunctionCall;
370
+ audio?: null | ChatCompletionResponseMessageAudio;
287
371
  };
288
- export type SettingInfo = {
289
- current_value: unknown;
290
- default_value: unknown;
291
- key: string;
292
- metadata: SettingMetadata;
293
- source: SettingSource;
372
+ export type ChatCompletionResponseMessageAudio = {
373
+ /**
374
+ * Unique identifier for this audio response.
375
+ */
376
+ id: string;
377
+ /**
378
+ * The Unix timestamp (in seconds) for when this audio response will no longer be accessible on the server for use in multi-turn conversations.
379
+ */
380
+ expires_at: number;
381
+ /**
382
+ * Base64 encoded audio bytes generated by the model, in the format specified in the request.
383
+ */
384
+ data: string;
385
+ /**
386
+ * Transcript of the audio generated by the model.
387
+ */
388
+ transcript: string;
294
389
  };
295
- export type SettingMetadata = {
296
- type: 'string';
297
- } | {
298
- max: number;
299
- min: number;
300
- type: 'number';
301
- } | {
302
- type: 'boolean';
303
- } | {
304
- options: Array<string>;
305
- type: 'option';
390
+ /**
391
+ * Options for streaming response. Only set this when you set `stream: true`.
392
+ */
393
+ export type ChatCompletionStreamOptions = {
394
+ /**
395
+ * If set, an additional chunk will be streamed before the `data: [DONE]` message. The `usage` field on this chunk shows the token usage statistics for the entire request, and the `choices` field will always be an empty array. All other chunks will also include a `usage` field, but with a null value.
396
+ */
397
+ include_usage: boolean;
306
398
  };
307
- export type SettingSource = 'system' | 'command_line' | 'environment' | 'settings_file' | 'default';
308
399
  /**
309
- * Request to setup the application in authenticated mode
400
+ * A chat completion delta generated by streamed model responses.
310
401
  */
311
- export type SetupRequest = {
312
- [key: string]: unknown;
402
+ export type ChatCompletionStreamResponseDelta = {
403
+ /**
404
+ * The contents of the chunk message.
405
+ */
406
+ content?: string | null;
407
+ function_call?: null | FunctionCallStream;
408
+ tool_calls?: Array<ChatCompletionMessageToolCallChunk> | null;
409
+ role?: null | Role;
410
+ /**
411
+ * The refusal message generated by the model.
412
+ */
413
+ refusal?: string | null;
414
+ };
415
+ export type ChatCompletionTokenLogprob = {
416
+ /**
417
+ * The token.
418
+ */
419
+ token: string;
420
+ /**
421
+ * The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value `-9999.0` is used to signify that the token is very unlikely.
422
+ */
423
+ logprob: number;
424
+ /**
425
+ * A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.
426
+ */
427
+ bytes?: Array<number> | null;
428
+ /**
429
+ * List of the most likely tokens and their log probability, at this token position. In rare cases, there may be fewer than the number of requested `top_logprobs` returned.
430
+ */
431
+ top_logprobs: Array<TopLogprobs>;
432
+ };
433
+ export type ChatCompletionTool = {
434
+ type: ChatCompletionToolType;
435
+ function: FunctionObject;
313
436
  };
314
437
  /**
315
- * Response containing the updated application status after setup
438
+ * Controls which (if any) tool is called by the model.
439
+ * `none` means the model will not call any tool and instead generates a message.
440
+ * `auto` means the model can pick between generating a message or calling one or more tools.
441
+ * `required` means the model must call one or more tools.
442
+ * Specifying a particular tool via `{"type": "function", "function": {"name": "my_function"}}` forces the model to call that tool.
443
+ *
444
+ * `none` is the default when no tools are present. `auto` is the default if tools are present.
316
445
  */
317
- export type SetupResponse = {
446
+ export type ChatCompletionToolChoiceOption = 'none' | 'auto' | 'required' | {
447
+ named: ChatCompletionNamedToolChoice;
448
+ };
449
+ export type ChatCompletionToolType = 'function';
450
+ export type ChatRequest = {
451
+ model: string;
452
+ messages: Array<Message>;
453
+ stream?: boolean | null;
454
+ format?: string | null;
455
+ keep_alive?: null | Duration;
456
+ options?: null | Options;
457
+ };
458
+ /**
459
+ * Breakdown of tokens used in a completion.
460
+ */
461
+ export type CompletionTokensDetails = {
462
+ accepted_prediction_tokens?: number | null;
318
463
  /**
319
- * New application status after setup
320
- * - resource-admin: When setup in authenticated mode
321
- * - ready: When setup in non-authenticated mode
464
+ * Audio input tokens generated by the model.
322
465
  */
323
- status: AppStatus;
466
+ audio_tokens?: number | null;
467
+ /**
468
+ * Tokens generated by the model for reasoning.
469
+ */
470
+ reasoning_tokens?: number | null;
471
+ /**
472
+ * When using Predicted Outputs, the number of tokens in the
473
+ * prediction that did not appear in the completion. However, like
474
+ * reasoning tokens, these tokens are still counted in the total
475
+ * completion tokens for purposes of billing, output, and context
476
+ * window limits.
477
+ */
478
+ rejected_prediction_tokens?: number | null;
324
479
  };
325
- export type ShowRequest = {
326
- name: string;
480
+ /**
481
+ * Usage statistics for the completion request.
482
+ */
483
+ export type CompletionUsage = {
484
+ /**
485
+ * Number of tokens in the prompt.
486
+ */
487
+ prompt_tokens: number;
488
+ /**
489
+ * Number of tokens in the generated completion.
490
+ */
491
+ completion_tokens: number;
492
+ /**
493
+ * Total number of tokens used in the request (prompt + completion).
494
+ */
495
+ total_tokens: number;
496
+ prompt_tokens_details?: null | PromptTokensDetails;
497
+ completion_tokens_details?: null | CompletionTokensDetails;
327
498
  };
328
- export type ShowResponse = {
329
- details: ModelDetails;
330
- license: string;
331
- model_info: {};
332
- modelfile: string;
333
- modified_at: number;
334
- parameters: string;
335
- template: string;
499
+ export type CreateAliasRequest = {
500
+ alias: string;
501
+ repo: string;
502
+ filename: string;
503
+ snapshot?: string | null;
504
+ request_params?: null | OaiRequestParams;
505
+ context_params?: Array<string> | null;
506
+ };
507
+ /**
508
+ * Request to create a new API model configuration
509
+ */
510
+ export type CreateApiModelRequest = {
511
+ /**
512
+ * API format/protocol (e.g., "openai")
513
+ */
514
+ api_format: ApiFormat;
515
+ /**
516
+ * API base URL
517
+ */
518
+ base_url: string;
519
+ /**
520
+ * API key for authentication
521
+ */
522
+ api_key: string;
523
+ /**
524
+ * List of available models
525
+ */
526
+ models: Array<string>;
527
+ /**
528
+ * Optional prefix for model namespacing (e.g., "azure/" for "azure/gpt-4", "openai:" for "openai:gpt-4")
529
+ */
530
+ prefix?: string | null;
531
+ };
532
+ /**
533
+ * Request to create a new API token
534
+ */
535
+ export type CreateApiTokenRequest = {
536
+ /**
537
+ * Descriptive name for the API token (minimum 3 characters)
538
+ */
539
+ name?: string | null;
540
+ /**
541
+ * Token scope defining access level
542
+ */
543
+ scope: TokenScope;
544
+ };
545
+ export type CreateChatCompletionRequest = {
546
+ /**
547
+ * A list of messages comprising the conversation so far. Depending on the [model](https://platform.openai.com/docs/models) you use, different message types (modalities) are supported, like [text](https://platform.openai.com/docs/guides/text-generation), [images](https://platform.openai.com/docs/guides/vision), and [audio](https://platform.openai.com/docs/guides/audio).
548
+ */
549
+ messages: Array<ChatCompletionRequestMessage>;
550
+ /**
551
+ * ID of the model to use.
552
+ * See the [model endpoint compatibility](https://platform.openai.com/docs/models#model-endpoint-compatibility) table for details on which models work with the Chat API.
553
+ */
554
+ model: string;
555
+ /**
556
+ * Whether or not to store the output of this chat completion request
557
+ *
558
+ * for use in our [model distillation](https://platform.openai.com/docs/guides/distillation) or [evals](https://platform.openai.com/docs/guides/evals) products.
559
+ */
560
+ store?: boolean | null;
561
+ reasoning_effort?: null | ReasoningEffort;
562
+ /**
563
+ * Developer-defined tags and values used for filtering completions in the [dashboard](https://platform.openai.com/chat-completions).
564
+ */
565
+ metadata?: unknown;
566
+ /**
567
+ * Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.
568
+ */
569
+ frequency_penalty?: number | null;
570
+ /**
571
+ * Modify the likelihood of specified tokens appearing in the completion.
572
+ *
573
+ * Accepts a json object that maps tokens (specified by their token ID in the tokenizer) to an associated bias value from -100 to 100.
574
+ * Mathematically, the bias is added to the logits generated by the model prior to sampling.
575
+ * The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection;
576
+ * values like -100 or 100 should result in a ban or exclusive selection of the relevant token.
577
+ */
578
+ logit_bias?: {} | null;
579
+ /**
580
+ * Whether to return log probabilities of the output tokens or not. If true, returns the log probabilities of each output token returned in the `content` of `message`.
581
+ */
582
+ logprobs?: boolean | null;
583
+ /**
584
+ * An integer between 0 and 20 specifying the number of most likely tokens to return at each token position, each with an associated log probability. `logprobs` must be set to `true` if this parameter is used.
585
+ */
586
+ top_logprobs?: number | null;
587
+ /**
588
+ * The maximum number of [tokens](https://platform.openai.com/tokenizer) that can be generated in the chat completion.
589
+ *
590
+ * This value can be used to control [costs](https://openai.com/api/pricing/) for text generated via API.
591
+ * This value is now deprecated in favor of `max_completion_tokens`, and is
592
+ * not compatible with [o1 series models](https://platform.openai.com/docs/guides/reasoning).
593
+ * @deprecated
594
+ */
595
+ max_tokens?: number | null;
596
+ /**
597
+ * An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and [reasoning tokens](https://platform.openai.com/docs/guides/reasoning).
598
+ */
599
+ max_completion_tokens?: number | null;
600
+ /**
601
+ * How many chat completion choices to generate for each input message. Note that you will be charged based on the number of generated tokens across all of the choices. Keep `n` as `1` to minimize costs.
602
+ */
603
+ n?: number | null;
604
+ modalities?: Array<ChatCompletionModalities> | null;
605
+ prediction?: null | PredictionContent;
606
+ audio?: null | ChatCompletionAudio;
607
+ /**
608
+ * Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics.
609
+ */
610
+ presence_penalty?: number | null;
611
+ response_format?: null | ResponseFormat;
612
+ /**
613
+ * This feature is in Beta.
614
+ * If specified, our system will make a best effort to sample deterministically, such that repeated requests
615
+ * with the same `seed` and parameters should return the same result.
616
+ * Determinism is not guaranteed, and you should refer to the `system_fingerprint` response parameter to monitor changes in the backend.
617
+ */
618
+ seed?: number | null;
619
+ service_tier?: null | ServiceTier;
620
+ stop?: null | Stop;
621
+ /**
622
+ * If set, partial message deltas will be sent, like in ChatGPT.
623
+ * Tokens will be sent as data-only [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format)
624
+ * as they become available, with the stream terminated by a `data: [DONE]` message. [Example Python code](https://cookbook.openai.com/examples/how_to_stream_completions).
625
+ */
626
+ stream?: boolean | null;
627
+ stream_options?: null | ChatCompletionStreamOptions;
628
+ /**
629
+ * What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random,
630
+ * while lower values like 0.2 will make it more focused and deterministic.
631
+ *
632
+ * We generally recommend altering this or `top_p` but not both.
633
+ */
634
+ temperature?: number | null;
635
+ /**
636
+ * An alternative to sampling with temperature, called nucleus sampling,
637
+ * where the model considers the results of the tokens with top_p probability mass.
638
+ * So 0.1 means only the tokens comprising the top 10% probability mass are considered.
639
+ *
640
+ * We generally recommend altering this or `temperature` but not both.
641
+ */
642
+ top_p?: number | null;
643
+ /**
644
+ * A list of tools the model may call. Currently, only functions are supported as a tool.
645
+ * Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported.
646
+ */
647
+ tools?: Array<ChatCompletionTool> | null;
648
+ tool_choice?: null | ChatCompletionToolChoiceOption;
649
+ /**
650
+ * Whether to enable [parallel function calling](https://platform.openai.com/docs/guides/function-calling/parallel-function-calling) during tool use.
651
+ */
652
+ parallel_tool_calls?: boolean | null;
653
+ /**
654
+ * A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids).
655
+ */
656
+ user?: string | null;
657
+ web_search_options?: null | WebSearchOptions;
658
+ function_call?: null | ChatCompletionFunctionCall;
659
+ /**
660
+ * Deprecated in favor of `tools`.
661
+ *
662
+ * A list of functions the model may generate JSON inputs for.
663
+ * @deprecated
664
+ */
665
+ functions?: Array<ChatCompletionFunctions> | null;
666
+ };
667
+ /**
668
+ * Represents a chat completion response returned by model, based on the provided input.
669
+ */
670
+ export type CreateChatCompletionResponse = {
671
+ /**
672
+ * A unique identifier for the chat completion.
673
+ */
674
+ id: string;
675
+ /**
676
+ * A list of chat completion choices. Can be more than one if `n` is greater than 1.
677
+ */
678
+ choices: Array<ChatChoice>;
679
+ /**
680
+ * The Unix timestamp (in seconds) of when the chat completion was created.
681
+ */
682
+ created: number;
683
+ /**
684
+ * The model used for the chat completion.
685
+ */
686
+ model: string;
687
+ service_tier?: null | ServiceTierResponse;
688
+ /**
689
+ * This fingerprint represents the backend configuration that the model runs with.
690
+ *
691
+ * Can be used in conjunction with the `seed` request parameter to understand when backend changes have been made that might impact determinism.
692
+ */
693
+ system_fingerprint?: string | null;
694
+ /**
695
+ * The object type, which is always `chat.completion`.
696
+ */
697
+ object: string;
698
+ usage?: null | CompletionUsage;
699
+ };
700
+ /**
701
+ * Represents a streamed chunk of a chat completion response returned by model, based on the provided input.
702
+ */
703
+ export type CreateChatCompletionStreamResponse = {
704
+ /**
705
+ * A unique identifier for the chat completion. Each chunk has the same ID.
706
+ */
707
+ id: string;
708
+ /**
709
+ * A list of chat completion choices. Can contain more than one elements if `n` is greater than 1. Can also be empty for the last chunk if you set `stream_options: {"include_usage": true}`.
710
+ */
711
+ choices: Array<ChatChoiceStream>;
712
+ /**
713
+ * The Unix timestamp (in seconds) of when the chat completion was created. Each chunk has the same timestamp.
714
+ */
715
+ created: number;
716
+ /**
717
+ * The model to generate the completion.
718
+ */
719
+ model: string;
720
+ service_tier?: null | ServiceTierResponse;
721
+ /**
722
+ * This fingerprint represents the backend configuration that the model runs with.
723
+ * Can be used in conjunction with the `seed` request parameter to understand when backend changes have been made that might impact determinism.
724
+ */
725
+ system_fingerprint?: string | null;
726
+ /**
727
+ * The object type, which is always `chat.completion.chunk`.
728
+ */
729
+ object: string;
730
+ usage?: null | CompletionUsage;
731
+ };
732
+ export type CreateEmbeddingRequest = {
733
+ /**
734
+ * ID of the model to use. You can use the
735
+ * [List models](https://platform.openai.com/docs/api-reference/models/list)
736
+ * API to see all of your available models, or see our
737
+ * [Model overview](https://platform.openai.com/docs/models/overview)
738
+ * for descriptions of them.
739
+ */
740
+ model: string;
741
+ /**
742
+ * Input text to embed, encoded as a string or array of tokens. To embed multiple inputs in a single request, pass an array of strings or array of token arrays. The input must not exceed the max input tokens for the model (8192 tokens for `text-embedding-ada-002`), cannot be an empty string, and any array must be 2048 dimensions or less. [Example Python code](https://cookbook.openai.com/examples/how_to_count_tokens_with_tiktoken) for counting tokens.
743
+ */
744
+ input: EmbeddingInput;
745
+ encoding_format?: null | EncodingFormat;
746
+ /**
747
+ * A unique identifier representing your end-user, which will help OpenAI
748
+ * to monitor and detect abuse. [Learn more](https://platform.openai.com/docs/usage-policies/end-user-ids).
749
+ */
750
+ user?: string | null;
751
+ /**
752
+ * The number of dimensions the resulting output embeddings should have. Only supported in `text-embedding-3` and later models.
753
+ */
754
+ dimensions?: number | null;
755
+ };
756
+ export type CreateEmbeddingResponse = {
757
+ object: string;
758
+ /**
759
+ * The name of the model used to generate the embedding.
760
+ */
761
+ model: string;
762
+ /**
763
+ * The list of embeddings generated by the model.
764
+ */
765
+ data: Array<Embedding>;
766
+ /**
767
+ * The usage information for the request.
768
+ */
769
+ usage: EmbeddingUsage;
770
+ };
771
+ export type DownloadRequest = {
772
+ id: string;
773
+ repo: string;
774
+ filename: string;
775
+ status: DownloadStatus;
776
+ error?: string | null;
777
+ created_at: string;
778
+ updated_at: string;
779
+ total_bytes?: number | null;
780
+ downloaded_bytes?: number;
781
+ started_at: string;
782
+ };
783
+ export type DownloadStatus = 'pending' | 'completed' | 'error';
784
+ export type Duration = string;
785
+ /**
786
+ * Represents an embedding vector returned by embedding endpoint.
787
+ */
788
+ export type Embedding = {
789
+ /**
790
+ * The index of the embedding in the list of embeddings.
791
+ */
792
+ index: number;
793
+ /**
794
+ * The object type, which is always "embedding".
795
+ */
796
+ object: string;
797
+ /**
798
+ * The embedding vector, which is a list of floats. The length of vector
799
+ * depends on the model as listed in the [embedding guide](https://platform.openai.com/docs/guides/embeddings).
800
+ */
801
+ embedding: Array<number>;
802
+ };
803
+ export type EmbeddingInput = string | Array<string> | Array<number> | Array<Array<number>>;
804
+ export type EmbeddingUsage = {
805
+ /**
806
+ * The number of tokens used by the prompt.
807
+ */
808
+ prompt_tokens: number;
809
+ /**
810
+ * The total number of tokens used by the request.
811
+ */
812
+ total_tokens: number;
813
+ };
814
+ export type EncodingFormat = 'float' | 'base64';
815
+ export type ErrorBody = {
816
+ /**
817
+ * Human-readable error message describing what went wrong
818
+ */
819
+ message: string;
820
+ /**
821
+ * Error type categorizing the kind of error that occurred
822
+ */
823
+ type: string;
824
+ /**
825
+ * Specific error code for programmatic error handling
826
+ */
827
+ code?: string | null;
828
+ /**
829
+ * Parameter name that caused the error (for validation errors)
830
+ */
831
+ param?: string | null;
832
+ };
833
+ /**
834
+ * Request to fetch available models from provider
835
+ */
836
+ export type FetchModelsRequest = {
837
+ /**
838
+ * API key for authentication (provide either api_key OR id, api_key takes preference if both provided)
839
+ */
840
+ api_key?: string;
841
+ /**
842
+ * API model ID to look up stored credentials (provide either api_key OR id, api_key takes preference if both provided)
843
+ */
844
+ id?: string;
845
+ /**
846
+ * API base URL (optional when using id)
847
+ */
848
+ base_url: string;
849
+ };
850
+ /**
851
+ * Response containing available models from provider
852
+ */
853
+ export type FetchModelsResponse = {
854
+ models: Array<string>;
855
+ };
856
+ export type FinishReason = 'stop' | 'length' | 'tool_calls' | 'content_filter' | 'function_call';
857
+ /**
858
+ * The name and arguments of a function that should be called, as generated by the model.
859
+ */
860
+ export type FunctionCall = {
861
+ /**
862
+ * The name of the function to call.
863
+ */
864
+ name: string;
865
+ /**
866
+ * The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function.
867
+ */
868
+ arguments: string;
869
+ };
870
+ export type FunctionCallStream = {
871
+ /**
872
+ * The name of the function to call.
873
+ */
874
+ name?: string | null;
875
+ /**
876
+ * The arguments to call the function with, as generated by the model in JSON format.
877
+ * Note that the model does not always generate valid JSON, and may hallucinate
878
+ * parameters not defined by your function schema. Validate the arguments in your
879
+ * code before calling your function.
880
+ */
881
+ arguments?: string | null;
882
+ };
883
+ export type FunctionName = {
884
+ /**
885
+ * The name of the function to call.
886
+ */
887
+ name: string;
888
+ };
889
+ export type FunctionObject = {
890
+ /**
891
+ * The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.
892
+ */
893
+ name: string;
894
+ /**
895
+ * A description of what the function does, used by the model to choose when and how to call the function.
896
+ */
897
+ description?: string | null;
898
+ /**
899
+ * The parameters the functions accepts, described as a JSON Schema object. See the [guide](https://platform.openai.com/docs/guides/text-generation/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format.
900
+ *
901
+ * Omitting `parameters` defines a function with an empty parameter list.
902
+ */
903
+ parameters?: unknown;
904
+ /**
905
+ * Whether to enable strict schema adherence when generating the function call. If set to true, the model will follow the exact schema defined in the `parameters` field. Only a subset of JSON Schema is supported when `strict` is `true`. Learn more about Structured Outputs in the [function calling guide](https://platform.openai.com/docs/guides/function-calling).
906
+ */
907
+ strict?: boolean | null;
908
+ };
909
+ export type ImageDetail = 'auto' | 'low' | 'high';
910
+ export type ImageUrl = {
911
+ /**
912
+ * Either a URL of the image or the base64 encoded image data.
913
+ */
914
+ url: string;
915
+ detail?: null | ImageDetail;
916
+ };
917
+ export type InputAudio = {
918
+ /**
919
+ * Base64 encoded audio data.
920
+ */
921
+ data: string;
922
+ /**
923
+ * The format of the encoded audio data. Currently supports "wav" and "mp3".
924
+ */
925
+ format: InputAudioFormat;
926
+ };
927
+ export type InputAudioFormat = 'wav' | 'mp3';
928
+ export type ListModelResponse = {
929
+ object: string;
930
+ data: Array<{
931
+ /**
932
+ * The model identifier, which can be referenced in the API endpoints.
933
+ */
934
+ id: string;
935
+ /**
936
+ * The object type, which is always "model".
937
+ */
938
+ object: string;
939
+ /**
940
+ * The Unix timestamp (in seconds) when the model was created.
941
+ */
942
+ created: number;
943
+ /**
944
+ * The organization that owns the model.
945
+ */
946
+ owned_by: string;
947
+ }>;
948
+ };
949
+ /**
950
+ * List users query parameters
951
+ */
952
+ export type ListUsersParams = {
953
+ page?: number | null;
954
+ page_size?: number | null;
955
+ };
956
+ export type LocalModelResponse = {
957
+ repo: string;
958
+ filename: string;
959
+ snapshot: string;
960
+ size?: number | null;
961
+ model_params: {};
962
+ };
963
+ export type Message = {
964
+ role: string;
965
+ content: string;
966
+ images?: Array<string> | null;
967
+ };
968
+ export type Model = {
969
+ model: string;
970
+ modified_at: number;
971
+ size: number;
972
+ digest: string;
973
+ details: ModelDetails;
974
+ };
975
+ export type ModelAlias = {
976
+ alias: string;
977
+ repo: string;
978
+ filename: string;
979
+ snapshot: string;
980
+ };
981
+ export type ModelDetails = {
982
+ parent_model?: string | null;
983
+ format: string;
984
+ family: string;
985
+ families?: Array<string> | null;
986
+ parameter_size: string;
987
+ quantization_level: string;
988
+ };
989
+ /**
990
+ * Describes an OpenAI model offering that can be used with the API.
991
+ */
992
+ export type ModelResponse = {
993
+ /**
994
+ * The model identifier, which can be referenced in the API endpoints.
995
+ */
996
+ id: string;
997
+ /**
998
+ * The object type, which is always "model".
999
+ */
1000
+ object: string;
1001
+ /**
1002
+ * The Unix timestamp (in seconds) when the model was created.
1003
+ */
1004
+ created: number;
1005
+ /**
1006
+ * The organization that owns the model.
1007
+ */
1008
+ owned_by: string;
1009
+ };
1010
+ export type ModelsResponse = {
1011
+ models: Array<Model>;
1012
+ };
1013
+ /**
1014
+ * Request to pull a model file from HuggingFace
1015
+ */
1016
+ export type NewDownloadRequest = {
1017
+ /**
1018
+ * HuggingFace repository name in format 'username/repository-name'
1019
+ */
1020
+ repo: string;
1021
+ /**
1022
+ * Model file name to download (typically .gguf format)
1023
+ */
1024
+ filename: string;
1025
+ };
1026
+ export type OaiRequestParams = {
1027
+ frequency_penalty?: number | null;
1028
+ max_tokens?: number | null;
1029
+ presence_penalty?: number | null;
1030
+ seed?: number | null;
1031
+ stop?: Array<string>;
1032
+ temperature?: number | null;
1033
+ top_p?: number | null;
1034
+ user?: string | null;
1035
+ };
1036
+ export type OllamaError = {
1037
+ error: string;
1038
+ };
1039
+ export type OpenAiApiError = {
1040
+ /**
1041
+ * Error details following OpenAI API error format
1042
+ */
1043
+ error: ErrorBody;
1044
+ };
1045
+ export type Options = {
1046
+ num_keep?: number | null;
1047
+ seed?: number | null;
1048
+ num_predict?: number | null;
1049
+ top_k?: number | null;
1050
+ top_p?: number | null;
1051
+ tfs_z?: number | null;
1052
+ typical_p?: number | null;
1053
+ repeat_last_n?: number | null;
1054
+ temperature?: number | null;
1055
+ repeat_penalty?: number | null;
1056
+ presence_penalty?: number | null;
1057
+ frequency_penalty?: number | null;
1058
+ mirostat?: number | null;
1059
+ mirostat_tau?: number | null;
1060
+ mirostat_eta?: number | null;
1061
+ penalize_newline?: boolean | null;
1062
+ stop?: Array<string> | null;
1063
+ numa?: boolean | null;
1064
+ num_ctx?: number | null;
1065
+ num_batch?: number | null;
1066
+ num_gpu?: number | null;
1067
+ main_gpu?: number | null;
1068
+ low_vram?: boolean | null;
1069
+ f16_kv?: boolean | null;
1070
+ logits_all?: boolean | null;
1071
+ vocab_only?: boolean | null;
1072
+ use_mmap?: boolean | null;
1073
+ use_mlock?: boolean | null;
1074
+ num_thread?: number | null;
1075
+ };
1076
+ export type PaginatedAliasResponse = {
1077
+ data: Array<Alias>;
1078
+ total: number;
1079
+ page: number;
1080
+ page_size: number;
1081
+ };
1082
+ /**
1083
+ * Paginated response for API model listings
1084
+ */
1085
+ export type PaginatedApiModelResponse = {
1086
+ data: Array<ApiModelResponse>;
1087
+ total: number;
1088
+ page: number;
1089
+ page_size: number;
1090
+ };
1091
+ export type PaginatedApiTokenResponse = {
1092
+ data: Array<ApiToken>;
1093
+ total: number;
1094
+ page: number;
1095
+ page_size: number;
1096
+ };
1097
+ export type PaginatedDownloadResponse = {
1098
+ data: Array<DownloadRequest>;
1099
+ total: number;
1100
+ page: number;
1101
+ page_size: number;
1102
+ };
1103
+ export type PaginatedLocalModelResponse = {
1104
+ data: Array<LocalModelResponse>;
1105
+ total: number;
1106
+ page: number;
1107
+ page_size: number;
1108
+ };
1109
+ /**
1110
+ * Paginated response for access requests
1111
+ */
1112
+ export type PaginatedUserAccessResponse = {
1113
+ /**
1114
+ * List of access requests
1115
+ */
1116
+ requests: Array<UserAccessRequest>;
1117
+ /**
1118
+ * Total number of requests
1119
+ */
1120
+ total: number;
1121
+ /**
1122
+ * Current page number
1123
+ */
1124
+ page: number;
1125
+ /**
1126
+ * Number of items per page
1127
+ */
1128
+ page_size: number;
1129
+ };
1130
+ export type PaginatedUserAliasResponse = {
1131
+ data: Array<UserAliasResponse>;
1132
+ total: number;
1133
+ page: number;
1134
+ page_size: number;
1135
+ };
1136
+ /**
1137
+ * Query parameters for pagination and sorting
1138
+ */
1139
+ export type PaginationSortParams = {
1140
+ /**
1141
+ * Page number (1-based indexing)
1142
+ */
1143
+ page?: number;
1144
+ /**
1145
+ * Number of items to return per page (maximum 100)
1146
+ */
1147
+ page_size?: number;
1148
+ /**
1149
+ * Field to sort by. Common values: repo, filename, size, updated_at, snapshot, created_at
1150
+ */
1151
+ sort?: string | null;
1152
+ /**
1153
+ * Sort order: 'asc' for ascending, 'desc' for descending
1154
+ */
1155
+ sort_order?: string;
1156
+ };
1157
+ /**
1158
+ * Response to the ping endpoint
1159
+ */
1160
+ export type PingResponse = {
1161
+ /**
1162
+ * Simple ping response message
1163
+ */
1164
+ message: string;
1165
+ };
1166
+ /**
1167
+ * The type of the predicted content you want to provide. This type is
1168
+ * currently always `content`.
1169
+ */
1170
+ export type PredictionContent = {
1171
+ /**
1172
+ * The type of the predicted content you want to provide. This type is
1173
+ * currently always `content`.
1174
+ */
1175
+ content: PredictionContentContent;
1176
+ type: 'content';
1177
+ };
1178
+ /**
1179
+ * The content that should be matched when generating a model response. If generated tokens would match this content, the entire model response can be returned much more quickly.
1180
+ */
1181
+ export type PredictionContentContent = string | Array<ChatCompletionRequestMessageContentPartText>;
1182
+ /**
1183
+ * Breakdown of tokens used in a completion.
1184
+ */
1185
+ export type PromptTokensDetails = {
1186
+ /**
1187
+ * Audio input tokens present in the prompt.
1188
+ */
1189
+ audio_tokens?: number | null;
1190
+ /**
1191
+ * Cached tokens present in the prompt.
1192
+ */
1193
+ cached_tokens?: number | null;
1194
+ };
1195
+ export type ReasoningEffort = 'minimal' | 'low' | 'medium' | 'high';
1196
+ export type RedirectResponse = {
1197
+ /**
1198
+ * The URL to redirect to (OAuth authorization URL or application home page)
1199
+ */
1200
+ location: string;
1201
+ };
1202
+ export type ResourceRole = 'resource_user' | 'resource_power_user' | 'resource_manager' | 'resource_admin';
1203
+ export type ResponseFormat = {
1204
+ type: 'text';
1205
+ } | {
1206
+ type: 'json_object';
1207
+ } | {
1208
+ json_schema: ResponseFormatJsonSchema;
1209
+ type: 'json_schema';
1210
+ };
1211
+ export type ResponseFormatJsonSchema = {
1212
+ /**
1213
+ * A description of what the response format is for, used by the model to determine how to respond in the format.
1214
+ */
1215
+ description?: string | null;
1216
+ /**
1217
+ * The name of the response format. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.
1218
+ */
1219
+ name: string;
1220
+ /**
1221
+ * The schema for the response format, described as a JSON Schema object.
1222
+ */
1223
+ schema?: unknown;
1224
+ /**
1225
+ * Whether to enable strict schema adherence when generating the output. If set to true, the model will always follow the exact schema defined in the `schema` field. Only a subset of JSON Schema is supported when `strict` is `true`. To learn more, read the [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs).
1226
+ */
1227
+ strict?: boolean | null;
1228
+ };
1229
+ export type Role = 'system' | 'user' | 'assistant' | 'tool' | 'function';
1230
+ export type ServiceTier = 'auto' | 'default' | 'flex' | 'scale' | 'priority';
1231
+ export type ServiceTierResponse = 'scale' | 'default' | 'flex' | 'priority';
1232
+ export type SettingInfo = {
1233
+ key: string;
1234
+ current_value: unknown;
1235
+ default_value: unknown;
1236
+ source: SettingSource;
1237
+ metadata: SettingMetadata;
1238
+ };
1239
+ export type SettingMetadata = {
1240
+ type: 'string';
1241
+ } | {
1242
+ min: number;
1243
+ max: number;
1244
+ type: 'number';
1245
+ } | {
1246
+ type: 'boolean';
1247
+ } | {
1248
+ options: Array<string>;
1249
+ type: 'option';
1250
+ };
1251
+ export type SettingSource = 'system' | 'command_line' | 'environment' | 'settings_file' | 'default';
1252
+ /**
1253
+ * Request to setup the application in authenticated mode
1254
+ */
1255
+ export type SetupRequest = {
1256
+ /**
1257
+ * Server name for identification (minimum 10 characters)
1258
+ */
1259
+ name: string;
1260
+ /**
1261
+ * Optional description of the server's purpose
1262
+ */
1263
+ description?: string | null;
1264
+ };
1265
+ /**
1266
+ * Response containing the updated application status after setup
1267
+ */
1268
+ export type SetupResponse = {
1269
+ /**
1270
+ * New application status after successful setup
1271
+ */
1272
+ status: AppStatus;
1273
+ };
1274
+ export type ShowRequest = {
1275
+ name: string;
1276
+ };
1277
+ export type ShowResponse = {
1278
+ details: ModelDetails;
1279
+ license: string;
1280
+ model_info: {};
1281
+ modelfile: string;
1282
+ modified_at: number;
1283
+ parameters: string;
1284
+ template: string;
1285
+ };
1286
+ export type Stop = string | Array<string>;
1287
+ /**
1288
+ * Request to test API connectivity with a prompt
1289
+ */
1290
+ export type TestPromptRequest = {
1291
+ /**
1292
+ * API key for authentication (provide either api_key OR id, api_key takes preference if both provided)
1293
+ */
1294
+ api_key?: string;
1295
+ /**
1296
+ * API model ID to look up stored credentials (provide either api_key OR id, api_key takes preference if both provided)
1297
+ */
1298
+ id?: string;
1299
+ /**
1300
+ * API base URL (optional when using id)
1301
+ */
1302
+ base_url: string;
1303
+ /**
1304
+ * Model to use for testing
1305
+ */
1306
+ model: string;
1307
+ /**
1308
+ * Test prompt (max 30 characters for cost control)
1309
+ */
1310
+ prompt: string;
1311
+ };
1312
+ /**
1313
+ * Response from testing API connectivity
1314
+ */
1315
+ export type TestPromptResponse = {
1316
+ success: boolean;
1317
+ response?: string | null;
1318
+ error?: string | null;
1319
+ };
1320
+ /**
1321
+ * API Token information response
1322
+ */
1323
+ export type TokenInfo = {
1324
+ role: TokenScope;
1325
+ };
1326
+ export type TokenScope = 'scope_token_user' | 'scope_token_power_user' | 'scope_token_manager' | 'scope_token_admin';
1327
+ export type TokenStatus = 'active' | 'inactive';
1328
+ export type TopLogprobs = {
1329
+ /**
1330
+ * The token.
1331
+ */
1332
+ token: string;
1333
+ /**
1334
+ * The log probability of this token.
1335
+ */
1336
+ logprob: number;
1337
+ /**
1338
+ * A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.
1339
+ */
1340
+ bytes?: Array<number> | null;
1341
+ };
1342
+ export type UpdateAliasRequest = {
1343
+ repo: string;
1344
+ filename: string;
1345
+ snapshot?: string | null;
1346
+ request_params?: null | OaiRequestParams;
1347
+ context_params?: Array<string> | null;
1348
+ };
1349
+ /**
1350
+ * Request to update an existing API model configuration
1351
+ */
1352
+ export type UpdateApiModelRequest = {
1353
+ /**
1354
+ * API format/protocol (required)
1355
+ */
1356
+ api_format: ApiFormat;
1357
+ /**
1358
+ * API base URL (required)
1359
+ */
1360
+ base_url: string;
1361
+ /**
1362
+ * API key for authentication (optional, only update if provided for security)
1363
+ */
1364
+ api_key?: string | null;
1365
+ /**
1366
+ * List of available models (required)
1367
+ */
1368
+ models: Array<string>;
1369
+ /**
1370
+ * Optional prefix for model namespacing
1371
+ */
1372
+ prefix?: string | null;
1373
+ };
1374
+ /**
1375
+ * Request to update an existing API token
1376
+ */
1377
+ export type UpdateApiTokenRequest = {
1378
+ /**
1379
+ * New descriptive name for the token (minimum 3 characters)
1380
+ */
1381
+ name: string;
1382
+ /**
1383
+ * New status for the token (active/inactive)
1384
+ */
1385
+ status: TokenStatus;
1386
+ };
1387
+ /**
1388
+ * Request to update a setting value
1389
+ */
1390
+ export type UpdateSettingRequest = {
1391
+ /**
1392
+ * New value for the setting (type depends on setting metadata)
1393
+ */
1394
+ value: unknown;
1395
+ };
1396
+ export type UserAccessRequest = {
1397
+ /**
1398
+ * Unique identifier for the request
1399
+ */
1400
+ id: number;
1401
+ /**
1402
+ * Username of the requesting user
1403
+ */
1404
+ username: string;
1405
+ /**
1406
+ * User ID (UUID) of the requesting user
1407
+ */
1408
+ user_id: string;
1409
+ reviewer?: string | null;
1410
+ /**
1411
+ * Current status of the request
1412
+ */
1413
+ status: UserAccessRequestStatus;
1414
+ /**
1415
+ * Creation timestamp
1416
+ */
1417
+ created_at: string;
1418
+ /**
1419
+ * Last update timestamp
1420
+ */
1421
+ updated_at: string;
1422
+ };
1423
+ export type UserAccessRequestStatus = 'pending' | 'approved' | 'rejected';
1424
+ /**
1425
+ * Response for checking access request status
1426
+ */
1427
+ export type UserAccessStatusResponse = {
1428
+ /**
1429
+ * Username of the requesting user
1430
+ */
1431
+ username: string;
1432
+ /**
1433
+ * Current status of the request (pending, approved, rejected)
1434
+ */
1435
+ status: UserAccessRequestStatus;
1436
+ /**
1437
+ * Creation timestamp
1438
+ */
1439
+ created_at: string;
1440
+ /**
1441
+ * Last update timestamp
1442
+ */
1443
+ updated_at: string;
1444
+ };
1445
+ export type UserAlias = {
1446
+ alias: string;
1447
+ repo: string;
1448
+ filename: string;
1449
+ snapshot: string;
1450
+ request_params?: OaiRequestParams;
1451
+ context_params?: Array<string>;
1452
+ };
1453
+ export type UserAliasResponse = {
1454
+ alias: string;
1455
+ repo: string;
1456
+ filename: string;
1457
+ snapshot: string;
1458
+ source: string;
1459
+ model_params: {};
1460
+ request_params: OaiRequestParams;
1461
+ context_params: Array<string>;
1462
+ };
1463
+ export type UserInfo = {
1464
+ user_id: string;
1465
+ username: string;
1466
+ first_name?: string | null;
1467
+ last_name?: string | null;
1468
+ role?: null | AppRole;
1469
+ };
1470
+ export type UserListResponse = {
1471
+ client_id: string;
1472
+ users: Array<UserInfo>;
1473
+ page: number;
1474
+ page_size: number;
1475
+ total_pages: number;
1476
+ total_users: number;
1477
+ has_next: boolean;
1478
+ has_previous: boolean;
1479
+ };
1480
+ /**
1481
+ * User authentication response with discriminated union
1482
+ */
1483
+ export type UserResponse = {
1484
+ auth_status: 'logged_out';
1485
+ } | (UserInfo & {
1486
+ auth_status: 'logged_in';
1487
+ }) | (TokenInfo & {
1488
+ auth_status: 'api_token';
1489
+ });
1490
+ export type UserScope = 'scope_user_user' | 'scope_user_power_user' | 'scope_user_manager' | 'scope_user_admin';
1491
+ /**
1492
+ * The amount of context window space to use for the search.
1493
+ */
1494
+ export type WebSearchContextSize = 'low' | 'medium' | 'high';
1495
+ /**
1496
+ * Approximate location parameters for the search.
1497
+ */
1498
+ export type WebSearchLocation = {
1499
+ /**
1500
+ * The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.
1501
+ */
1502
+ country?: string | null;
1503
+ /**
1504
+ * Free text input for the region of the user, e.g. `California`.
1505
+ */
1506
+ region?: string | null;
1507
+ /**
1508
+ * Free text input for the city of the user, e.g. `San Francisco`.
1509
+ */
1510
+ city?: string | null;
1511
+ /**
1512
+ * The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.
1513
+ */
1514
+ timezone?: string | null;
1515
+ };
1516
+ /**
1517
+ * Options for the web search tool.
1518
+ */
1519
+ export type WebSearchOptions = {
1520
+ search_context_size?: null | WebSearchContextSize;
1521
+ user_location?: null | WebSearchUserLocation;
1522
+ };
1523
+ export type WebSearchUserLocation = {
1524
+ type: WebSearchUserLocationType;
1525
+ approximate: WebSearchLocation;
1526
+ };
1527
+ export type WebSearchUserLocationType = 'approximate';
1528
+ export type ChatOllamaModelData = {
1529
+ /**
1530
+ * Chat request in Ollama format
1531
+ */
1532
+ body: ChatRequest;
1533
+ path?: never;
1534
+ query?: never;
1535
+ url: '/api/chat';
1536
+ };
1537
+ export type ChatOllamaModelErrors = {
1538
+ /**
1539
+ * Invalid request parameters
1540
+ */
1541
+ 400: OpenAiApiError;
1542
+ /**
1543
+ * Not authenticated
1544
+ */
1545
+ 401: OpenAiApiError;
1546
+ /**
1547
+ * Insufficient permissions
1548
+ */
1549
+ 403: OpenAiApiError;
1550
+ /**
1551
+ * Model not found
1552
+ */
1553
+ 404: OllamaError;
1554
+ /**
1555
+ * Internal server error
1556
+ */
1557
+ 500: OpenAiApiError;
1558
+ };
1559
+ export type ChatOllamaModelError = ChatOllamaModelErrors[keyof ChatOllamaModelErrors];
1560
+ export type ChatOllamaModelResponses = {
1561
+ /**
1562
+ * Chat response
1563
+ */
1564
+ 200: unknown;
1565
+ };
1566
+ export type ShowOllamaModelData = {
1567
+ /**
1568
+ * Model name to get details for
1569
+ */
1570
+ body: ShowRequest;
1571
+ path?: never;
1572
+ query?: never;
1573
+ url: '/api/show';
1574
+ };
1575
+ export type ShowOllamaModelErrors = {
1576
+ /**
1577
+ * Invalid request parameters
1578
+ */
1579
+ 400: OpenAiApiError;
1580
+ /**
1581
+ * Not authenticated
1582
+ */
1583
+ 401: OpenAiApiError;
1584
+ /**
1585
+ * Insufficient permissions
1586
+ */
1587
+ 403: OpenAiApiError;
1588
+ /**
1589
+ * Model not found
1590
+ */
1591
+ 404: OllamaError;
1592
+ /**
1593
+ * Internal server error
1594
+ */
1595
+ 500: OpenAiApiError;
1596
+ };
1597
+ export type ShowOllamaModelError = ShowOllamaModelErrors[keyof ShowOllamaModelErrors];
1598
+ export type ShowOllamaModelResponses = {
1599
+ /**
1600
+ * Model details
1601
+ */
1602
+ 200: ShowResponse;
1603
+ };
1604
+ export type ShowOllamaModelResponse = ShowOllamaModelResponses[keyof ShowOllamaModelResponses];
1605
+ export type ListOllamaModelsData = {
1606
+ body?: never;
1607
+ path?: never;
1608
+ query?: never;
1609
+ url: '/api/tags';
1610
+ };
1611
+ export type ListOllamaModelsErrors = {
1612
+ /**
1613
+ * Invalid request parameters
1614
+ */
1615
+ 400: OpenAiApiError;
1616
+ /**
1617
+ * Not authenticated
1618
+ */
1619
+ 401: OpenAiApiError;
1620
+ /**
1621
+ * Insufficient permissions
1622
+ */
1623
+ 403: OpenAiApiError;
1624
+ /**
1625
+ * Internal server error
1626
+ */
1627
+ 500: OpenAiApiError;
1628
+ };
1629
+ export type ListOllamaModelsError = ListOllamaModelsErrors[keyof ListOllamaModelsErrors];
1630
+ export type ListOllamaModelsResponses = {
1631
+ /**
1632
+ * List of available models
1633
+ */
1634
+ 200: ModelsResponse;
1635
+ };
1636
+ export type ListOllamaModelsResponse = ListOllamaModelsResponses[keyof ListOllamaModelsResponses];
1637
+ export type ListAllAccessRequestsData = {
1638
+ body?: never;
1639
+ path?: never;
1640
+ query?: {
1641
+ /**
1642
+ * Page number (1-based indexing)
1643
+ */
1644
+ page?: number;
1645
+ /**
1646
+ * Number of items to return per page (maximum 100)
1647
+ */
1648
+ page_size?: number;
1649
+ /**
1650
+ * Field to sort by. Common values: repo, filename, size, updated_at, snapshot, created_at
1651
+ */
1652
+ sort?: string;
1653
+ /**
1654
+ * Sort order: 'asc' for ascending, 'desc' for descending
1655
+ */
1656
+ sort_order?: string;
1657
+ };
1658
+ url: '/bodhi/v1/access-requests';
1659
+ };
1660
+ export type ListAllAccessRequestsErrors = {
1661
+ /**
1662
+ * Invalid request parameters
1663
+ */
1664
+ 400: OpenAiApiError;
1665
+ /**
1666
+ * Not authenticated
1667
+ */
1668
+ 401: OpenAiApiError;
1669
+ /**
1670
+ * Insufficient permissions
1671
+ */
1672
+ 403: OpenAiApiError;
1673
+ /**
1674
+ * Internal server error
1675
+ */
1676
+ 500: OpenAiApiError;
1677
+ };
1678
+ export type ListAllAccessRequestsError = ListAllAccessRequestsErrors[keyof ListAllAccessRequestsErrors];
1679
+ export type ListAllAccessRequestsResponses = {
1680
+ /**
1681
+ * All requests retrieved
1682
+ */
1683
+ 200: PaginatedUserAccessResponse;
1684
+ };
1685
+ export type ListAllAccessRequestsResponse = ListAllAccessRequestsResponses[keyof ListAllAccessRequestsResponses];
1686
+ export type ListPendingAccessRequestsData = {
1687
+ body?: never;
1688
+ path?: never;
1689
+ query?: {
1690
+ /**
1691
+ * Page number (1-based indexing)
1692
+ */
1693
+ page?: number;
1694
+ /**
1695
+ * Number of items to return per page (maximum 100)
1696
+ */
1697
+ page_size?: number;
1698
+ /**
1699
+ * Field to sort by. Common values: repo, filename, size, updated_at, snapshot, created_at
1700
+ */
1701
+ sort?: string;
1702
+ /**
1703
+ * Sort order: 'asc' for ascending, 'desc' for descending
1704
+ */
1705
+ sort_order?: string;
1706
+ };
1707
+ url: '/bodhi/v1/access-requests/pending';
1708
+ };
1709
+ export type ListPendingAccessRequestsErrors = {
1710
+ /**
1711
+ * Invalid request parameters
1712
+ */
1713
+ 400: OpenAiApiError;
1714
+ /**
1715
+ * Not authenticated
1716
+ */
1717
+ 401: OpenAiApiError;
1718
+ /**
1719
+ * Insufficient permissions
1720
+ */
1721
+ 403: OpenAiApiError;
1722
+ /**
1723
+ * Internal server error
1724
+ */
1725
+ 500: OpenAiApiError;
1726
+ };
1727
+ export type ListPendingAccessRequestsError = ListPendingAccessRequestsErrors[keyof ListPendingAccessRequestsErrors];
1728
+ export type ListPendingAccessRequestsResponses = {
1729
+ /**
1730
+ * Pending requests retrieved
1731
+ */
1732
+ 200: PaginatedUserAccessResponse;
1733
+ };
1734
+ export type ListPendingAccessRequestsResponse = ListPendingAccessRequestsResponses[keyof ListPendingAccessRequestsResponses];
1735
+ export type ApproveAccessRequestData = {
1736
+ /**
1737
+ * Role to assign to the user
1738
+ */
1739
+ body: ApproveUserAccessRequest;
1740
+ path: {
1741
+ /**
1742
+ * Access request ID
1743
+ */
1744
+ id: number;
1745
+ };
1746
+ query?: never;
1747
+ url: '/bodhi/v1/access-requests/{id}/approve';
1748
+ };
1749
+ export type ApproveAccessRequestErrors = {
1750
+ /**
1751
+ * Invalid request parameters
1752
+ */
1753
+ 400: OpenAiApiError;
1754
+ /**
1755
+ * Not authenticated
1756
+ */
1757
+ 401: OpenAiApiError;
1758
+ /**
1759
+ * Insufficient permissions
1760
+ */
1761
+ 403: OpenAiApiError;
1762
+ /**
1763
+ * Request not found
1764
+ */
1765
+ 404: OpenAiApiError;
1766
+ /**
1767
+ * Internal server error
1768
+ */
1769
+ 500: OpenAiApiError;
1770
+ };
1771
+ export type ApproveAccessRequestError = ApproveAccessRequestErrors[keyof ApproveAccessRequestErrors];
1772
+ export type ApproveAccessRequestResponses = {
1773
+ /**
1774
+ * Request approved successfully
1775
+ */
1776
+ 200: unknown;
1777
+ };
1778
+ export type RejectAccessRequestData = {
1779
+ body?: never;
1780
+ path: {
1781
+ /**
1782
+ * Access request ID
1783
+ */
1784
+ id: number;
1785
+ };
1786
+ query?: never;
1787
+ url: '/bodhi/v1/access-requests/{id}/reject';
1788
+ };
1789
+ export type RejectAccessRequestErrors = {
1790
+ /**
1791
+ * Invalid request parameters
1792
+ */
1793
+ 400: OpenAiApiError;
1794
+ /**
1795
+ * Not authenticated
1796
+ */
1797
+ 401: OpenAiApiError;
1798
+ /**
1799
+ * Insufficient permissions
1800
+ */
1801
+ 403: OpenAiApiError;
1802
+ /**
1803
+ * Request not found
1804
+ */
1805
+ 404: OpenAiApiError;
1806
+ /**
1807
+ * Internal server error
1808
+ */
1809
+ 500: OpenAiApiError;
1810
+ };
1811
+ export type RejectAccessRequestError = RejectAccessRequestErrors[keyof RejectAccessRequestErrors];
1812
+ export type RejectAccessRequestResponses = {
1813
+ /**
1814
+ * Request rejected successfully
1815
+ */
1816
+ 200: unknown;
1817
+ };
1818
+ export type ListApiModelsData = {
1819
+ body?: never;
1820
+ path?: never;
1821
+ query?: {
1822
+ /**
1823
+ * Page number (1-based indexing)
1824
+ */
1825
+ page?: number;
1826
+ /**
1827
+ * Number of items to return per page (maximum 100)
1828
+ */
1829
+ page_size?: number;
1830
+ /**
1831
+ * Field to sort by. Common values: repo, filename, size, updated_at, snapshot, created_at
1832
+ */
1833
+ sort?: string;
1834
+ /**
1835
+ * Sort order: 'asc' for ascending, 'desc' for descending
1836
+ */
1837
+ sort_order?: string;
1838
+ };
1839
+ url: '/bodhi/v1/api-models';
1840
+ };
1841
+ export type ListApiModelsErrors = {
1842
+ /**
1843
+ * Invalid request parameters
1844
+ */
1845
+ 400: OpenAiApiError;
1846
+ /**
1847
+ * Not authenticated
1848
+ */
1849
+ 401: OpenAiApiError;
1850
+ /**
1851
+ * Insufficient permissions
1852
+ */
1853
+ 403: OpenAiApiError;
1854
+ /**
1855
+ * Internal server error
1856
+ */
1857
+ 500: OpenAiApiError;
1858
+ };
1859
+ export type ListApiModelsError = ListApiModelsErrors[keyof ListApiModelsErrors];
1860
+ export type ListApiModelsResponses = {
1861
+ /**
1862
+ * API model configurations retrieved successfully
1863
+ */
1864
+ 200: PaginatedApiModelResponse;
1865
+ };
1866
+ export type ListApiModelsResponse = ListApiModelsResponses[keyof ListApiModelsResponses];
1867
+ export type CreateApiModelData = {
1868
+ body: CreateApiModelRequest;
1869
+ path?: never;
1870
+ query?: never;
1871
+ url: '/bodhi/v1/api-models';
1872
+ };
1873
+ export type CreateApiModelErrors = {
1874
+ /**
1875
+ * Invalid request parameters
1876
+ */
1877
+ 400: OpenAiApiError;
1878
+ /**
1879
+ * Not authenticated
1880
+ */
1881
+ 401: OpenAiApiError;
1882
+ /**
1883
+ * Insufficient permissions
1884
+ */
1885
+ 403: OpenAiApiError;
1886
+ /**
1887
+ * Alias already exists
1888
+ */
1889
+ 409: OpenAiApiError;
1890
+ /**
1891
+ * Internal server error
1892
+ */
1893
+ 500: OpenAiApiError;
1894
+ };
1895
+ export type CreateApiModelError = CreateApiModelErrors[keyof CreateApiModelErrors];
1896
+ export type CreateApiModelResponses = {
1897
+ /**
1898
+ * API model created
1899
+ */
1900
+ 201: ApiModelResponse;
1901
+ };
1902
+ export type CreateApiModelResponse = CreateApiModelResponses[keyof CreateApiModelResponses];
1903
+ export type GetApiFormatsData = {
1904
+ body?: never;
1905
+ path?: never;
1906
+ query?: never;
1907
+ url: '/bodhi/v1/api-models/api-formats';
1908
+ };
1909
+ export type GetApiFormatsErrors = {
1910
+ /**
1911
+ * Invalid request parameters
1912
+ */
1913
+ 400: OpenAiApiError;
1914
+ /**
1915
+ * Not authenticated
1916
+ */
1917
+ 401: OpenAiApiError;
1918
+ /**
1919
+ * Insufficient permissions
1920
+ */
1921
+ 403: OpenAiApiError;
1922
+ /**
1923
+ * Internal server error
1924
+ */
1925
+ 500: OpenAiApiError;
1926
+ };
1927
+ export type GetApiFormatsError = GetApiFormatsErrors[keyof GetApiFormatsErrors];
1928
+ export type GetApiFormatsResponses = {
1929
+ /**
1930
+ * API formats retrieved successfully
1931
+ */
1932
+ 200: ApiFormatsResponse;
1933
+ };
1934
+ export type GetApiFormatsResponse = GetApiFormatsResponses[keyof GetApiFormatsResponses];
1935
+ export type FetchApiModelsData = {
1936
+ body: FetchModelsRequest;
1937
+ path?: never;
1938
+ query?: never;
1939
+ url: '/bodhi/v1/api-models/fetch-models';
1940
+ };
1941
+ export type FetchApiModelsErrors = {
1942
+ /**
1943
+ * Invalid request parameters
1944
+ */
1945
+ 400: OpenAiApiError;
1946
+ /**
1947
+ * Not authenticated
1948
+ */
1949
+ 401: OpenAiApiError;
1950
+ /**
1951
+ * Insufficient permissions
1952
+ */
1953
+ 403: OpenAiApiError;
1954
+ /**
1955
+ * Internal server error
1956
+ */
1957
+ 500: OpenAiApiError;
1958
+ };
1959
+ export type FetchApiModelsError = FetchApiModelsErrors[keyof FetchApiModelsErrors];
1960
+ export type FetchApiModelsResponses = {
1961
+ /**
1962
+ * Available models
1963
+ */
1964
+ 200: FetchModelsResponse;
1965
+ };
1966
+ export type FetchApiModelsResponse = FetchApiModelsResponses[keyof FetchApiModelsResponses];
1967
+ export type TestApiModelData = {
1968
+ body: TestPromptRequest;
1969
+ path?: never;
1970
+ query?: never;
1971
+ url: '/bodhi/v1/api-models/test';
1972
+ };
1973
+ export type TestApiModelErrors = {
1974
+ /**
1975
+ * Invalid request parameters
1976
+ */
1977
+ 400: OpenAiApiError;
1978
+ /**
1979
+ * Not authenticated
1980
+ */
1981
+ 401: OpenAiApiError;
1982
+ /**
1983
+ * Insufficient permissions
1984
+ */
1985
+ 403: OpenAiApiError;
1986
+ /**
1987
+ * Internal server error
1988
+ */
1989
+ 500: OpenAiApiError;
1990
+ };
1991
+ export type TestApiModelError = TestApiModelErrors[keyof TestApiModelErrors];
1992
+ export type TestApiModelResponses = {
1993
+ /**
1994
+ * Test result
1995
+ */
1996
+ 200: TestPromptResponse;
1997
+ };
1998
+ export type TestApiModelResponse = TestApiModelResponses[keyof TestApiModelResponses];
1999
+ export type DeleteApiModelData = {
2000
+ body?: never;
2001
+ path: {
2002
+ /**
2003
+ * API model ID
2004
+ */
2005
+ id: string;
2006
+ };
2007
+ query?: never;
2008
+ url: '/bodhi/v1/api-models/{id}';
2009
+ };
2010
+ export type DeleteApiModelErrors = {
2011
+ /**
2012
+ * Invalid request parameters
2013
+ */
2014
+ 400: OpenAiApiError;
2015
+ /**
2016
+ * Not authenticated
2017
+ */
2018
+ 401: OpenAiApiError;
2019
+ /**
2020
+ * Insufficient permissions
2021
+ */
2022
+ 403: OpenAiApiError;
2023
+ /**
2024
+ * API model not found
2025
+ */
2026
+ 404: OpenAiApiError;
2027
+ /**
2028
+ * Internal server error
2029
+ */
2030
+ 500: OpenAiApiError;
2031
+ };
2032
+ export type DeleteApiModelError = DeleteApiModelErrors[keyof DeleteApiModelErrors];
2033
+ export type DeleteApiModelResponses = {
2034
+ /**
2035
+ * API model deleted
2036
+ */
2037
+ 204: void;
2038
+ };
2039
+ export type DeleteApiModelResponse = DeleteApiModelResponses[keyof DeleteApiModelResponses];
2040
+ export type GetApiModelData = {
2041
+ body?: never;
2042
+ path: {
2043
+ /**
2044
+ * Unique identifier for the API model alias
2045
+ */
2046
+ id: string;
2047
+ };
2048
+ query?: never;
2049
+ url: '/bodhi/v1/api-models/{id}';
336
2050
  };
337
- export type TokenStatus = 'active' | 'inactive';
338
- /**
339
- * Request to update an existing API token
340
- */
341
- export type UpdateApiTokenRequest = {
2051
+ export type GetApiModelErrors = {
342
2052
  /**
343
- * New name for the token
2053
+ * Invalid request parameters
344
2054
  */
345
- name: string;
2055
+ 400: OpenAiApiError;
346
2056
  /**
347
- * New status for the token (active/inactive)
2057
+ * Not authenticated
348
2058
  */
349
- status: TokenStatus;
350
- };
351
- /**
352
- * Request to update a setting value
353
- */
354
- export type UpdateSettingRequest = {
355
- value: unknown;
356
- };
357
- /**
358
- * Information about the currently logged in user
359
- */
360
- export type UserInfo = {
2059
+ 401: OpenAiApiError;
361
2060
  /**
362
- * User's email address
2061
+ * Insufficient permissions
363
2062
  */
364
- email?: string | null;
2063
+ 403: OpenAiApiError;
365
2064
  /**
366
- * If user is logged in
2065
+ * API model with specified ID not found
367
2066
  */
368
- logged_in: boolean;
2067
+ 404: OpenAiApiError;
369
2068
  /**
370
- * List of roles assigned to the user
2069
+ * Internal server error
371
2070
  */
372
- roles: Array<string>;
2071
+ 500: OpenAiApiError;
373
2072
  };
374
- export type ChatOllamaModelData = {
2073
+ export type GetApiModelError = GetApiModelErrors[keyof GetApiModelErrors];
2074
+ export type GetApiModelResponses = {
375
2075
  /**
376
- * Chat request in Ollama format
2076
+ * API model configuration retrieved successfully
377
2077
  */
378
- body: ChatRequest;
379
- path?: never;
2078
+ 200: ApiModelResponse;
2079
+ };
2080
+ export type GetApiModelResponse = GetApiModelResponses[keyof GetApiModelResponses];
2081
+ export type UpdateApiModelData = {
2082
+ body: UpdateApiModelRequest;
2083
+ path: {
2084
+ /**
2085
+ * API model ID
2086
+ */
2087
+ id: string;
2088
+ };
380
2089
  query?: never;
381
- url: '/api/chat';
2090
+ url: '/bodhi/v1/api-models/{id}';
382
2091
  };
383
- export type ChatOllamaModelErrors = {
2092
+ export type UpdateApiModelErrors = {
2093
+ /**
2094
+ * Invalid request parameters
2095
+ */
2096
+ 400: OpenAiApiError;
384
2097
  /**
385
- * Invalid request
2098
+ * Not authenticated
386
2099
  */
387
- 400: OllamaError;
2100
+ 401: OpenAiApiError;
388
2101
  /**
389
- * Model not found
2102
+ * Insufficient permissions
390
2103
  */
391
- 404: OllamaError;
2104
+ 403: OpenAiApiError;
2105
+ /**
2106
+ * API model not found
2107
+ */
2108
+ 404: OpenAiApiError;
392
2109
  /**
393
2110
  * Internal server error
394
2111
  */
395
- 500: OllamaError;
2112
+ 500: OpenAiApiError;
396
2113
  };
397
- export type ChatOllamaModelError = ChatOllamaModelErrors[keyof ChatOllamaModelErrors];
398
- export type ChatOllamaModelResponses = {
2114
+ export type UpdateApiModelError = UpdateApiModelErrors[keyof UpdateApiModelErrors];
2115
+ export type UpdateApiModelResponses = {
399
2116
  /**
400
- * Chat response
2117
+ * API model updated
401
2118
  */
402
- 200: unknown;
2119
+ 200: ApiModelResponse;
403
2120
  };
404
- export type ShowOllamaModelData = {
2121
+ export type UpdateApiModelResponse = UpdateApiModelResponses[keyof UpdateApiModelResponses];
2122
+ export type RequestAccessData = {
405
2123
  /**
406
- * Model name to get details for
2124
+ * Application client requesting access
407
2125
  */
408
- body: ShowRequest;
2126
+ body: AppAccessRequest;
409
2127
  path?: never;
410
2128
  query?: never;
411
- url: '/api/show';
2129
+ url: '/bodhi/v1/apps/request-access';
412
2130
  };
413
- export type ShowOllamaModelErrors = {
2131
+ export type RequestAccessErrors = {
414
2132
  /**
415
- * Model not found
2133
+ * Invalid request parameters
416
2134
  */
417
- 404: OllamaError;
2135
+ 400: OpenAiApiError;
418
2136
  /**
419
- * Internal server error
2137
+ * Not authenticated
420
2138
  */
421
- 500: OllamaError;
422
- };
423
- export type ShowOllamaModelError = ShowOllamaModelErrors[keyof ShowOllamaModelErrors];
424
- export type ShowOllamaModelResponses = {
2139
+ 401: OpenAiApiError;
425
2140
  /**
426
- * Model details
2141
+ * Insufficient permissions
427
2142
  */
428
- 200: ShowResponse;
429
- };
430
- export type ShowOllamaModelResponse = ShowOllamaModelResponses[keyof ShowOllamaModelResponses];
431
- export type ListOllamaModelsData = {
432
- body?: never;
433
- path?: never;
434
- query?: never;
435
- url: '/api/tags';
436
- };
437
- export type ListOllamaModelsErrors = {
2143
+ 403: OpenAiApiError;
438
2144
  /**
439
2145
  * Internal server error
440
2146
  */
441
- 500: OllamaError;
2147
+ 500: OpenAiApiError;
442
2148
  };
443
- export type ListOllamaModelsError = ListOllamaModelsErrors[keyof ListOllamaModelsErrors];
444
- export type ListOllamaModelsResponses = {
2149
+ export type RequestAccessError = RequestAccessErrors[keyof RequestAccessErrors];
2150
+ export type RequestAccessResponses = {
445
2151
  /**
446
- * List of available models
2152
+ * Access granted successfully
447
2153
  */
448
- 200: ModelsResponse;
2154
+ 200: AppAccessResponse;
449
2155
  };
450
- export type ListOllamaModelsResponse = ListOllamaModelsResponses[keyof ListOllamaModelsResponses];
2156
+ export type RequestAccessResponse = RequestAccessResponses[keyof RequestAccessResponses];
451
2157
  export type CompleteOAuthFlowData = {
2158
+ /**
2159
+ * OAuth callback parameters from authorization server
2160
+ */
452
2161
  body: AuthCallbackRequest;
453
2162
  path?: never;
454
2163
  query?: never;
@@ -456,7 +2165,19 @@ export type CompleteOAuthFlowData = {
456
2165
  };
457
2166
  export type CompleteOAuthFlowErrors = {
458
2167
  /**
459
- * OAuth error or invalid request
2168
+ * Invalid request parameters
2169
+ */
2170
+ 400: OpenAiApiError;
2171
+ /**
2172
+ * Not authenticated
2173
+ */
2174
+ 401: OpenAiApiError;
2175
+ /**
2176
+ * Insufficient permissions
2177
+ */
2178
+ 403: OpenAiApiError;
2179
+ /**
2180
+ * OAuth error, invalid request parameters, or state mismatch
460
2181
  */
461
2182
  422: OpenAiApiError;
462
2183
  /**
@@ -467,7 +2188,7 @@ export type CompleteOAuthFlowErrors = {
467
2188
  export type CompleteOAuthFlowError = CompleteOAuthFlowErrors[keyof CompleteOAuthFlowErrors];
468
2189
  export type CompleteOAuthFlowResponses = {
469
2190
  /**
470
- * OAuth flow completed successfully, return redirect URL
2191
+ * OAuth flow completed successfully, user authenticated
471
2192
  */
472
2193
  200: RedirectResponse;
473
2194
  };
@@ -479,6 +2200,18 @@ export type InitiateOAuthFlowData = {
479
2200
  url: '/bodhi/v1/auth/initiate';
480
2201
  };
481
2202
  export type InitiateOAuthFlowErrors = {
2203
+ /**
2204
+ * Invalid request parameters
2205
+ */
2206
+ 400: OpenAiApiError;
2207
+ /**
2208
+ * Not authenticated
2209
+ */
2210
+ 401: OpenAiApiError;
2211
+ /**
2212
+ * Insufficient permissions
2213
+ */
2214
+ 403: OpenAiApiError;
482
2215
  /**
483
2216
  * Internal server error
484
2217
  */
@@ -487,11 +2220,11 @@ export type InitiateOAuthFlowErrors = {
487
2220
  export type InitiateOAuthFlowError = InitiateOAuthFlowErrors[keyof InitiateOAuthFlowErrors];
488
2221
  export type InitiateOAuthFlowResponses = {
489
2222
  /**
490
- * User already authenticated, return home page URL
2223
+ * User already authenticated, home page URL provided
491
2224
  */
492
2225
  200: RedirectResponse;
493
2226
  /**
494
- * User not authenticated, return OAuth authorization URL
2227
+ * User not authenticated, OAuth authorization URL provided
495
2228
  */
496
2229
  201: RedirectResponse;
497
2230
  };
@@ -503,6 +2236,10 @@ export type GetAppInfoData = {
503
2236
  url: '/bodhi/v1/info';
504
2237
  };
505
2238
  export type GetAppInfoErrors = {
2239
+ /**
2240
+ * Invalid request parameters
2241
+ */
2242
+ 400: OpenAiApiError;
506
2243
  /**
507
2244
  * Internal server error
508
2245
  */
@@ -511,7 +2248,7 @@ export type GetAppInfoErrors = {
511
2248
  export type GetAppInfoError = GetAppInfoErrors[keyof GetAppInfoErrors];
512
2249
  export type GetAppInfoResponses = {
513
2250
  /**
514
- * Returns the status information about the Application
2251
+ * Application information retrieved successfully
515
2252
  */
516
2253
  200: AppInfo;
517
2254
  };
@@ -524,14 +2261,26 @@ export type LogoutUserData = {
524
2261
  };
525
2262
  export type LogoutUserErrors = {
526
2263
  /**
527
- * Session deletion failed
2264
+ * Invalid request parameters
2265
+ */
2266
+ 400: OpenAiApiError;
2267
+ /**
2268
+ * Not authenticated
2269
+ */
2270
+ 401: OpenAiApiError;
2271
+ /**
2272
+ * Insufficient permissions
2273
+ */
2274
+ 403: OpenAiApiError;
2275
+ /**
2276
+ * Internal server error
528
2277
  */
529
2278
  500: OpenAiApiError;
530
2279
  };
531
2280
  export type LogoutUserError = LogoutUserErrors[keyof LogoutUserErrors];
532
2281
  export type LogoutUserResponses = {
533
2282
  /**
534
- * Logout successful, return redirect URL
2283
+ * User logged out successfully
535
2284
  */
536
2285
  200: RedirectResponse;
537
2286
  };
@@ -541,25 +2290,37 @@ export type ListModelFilesData = {
541
2290
  path?: never;
542
2291
  query?: {
543
2292
  /**
544
- * Page number (1-based)
2293
+ * Page number (1-based indexing)
545
2294
  */
546
2295
  page?: number;
547
2296
  /**
548
- * Number of items per page (max 100)
2297
+ * Number of items to return per page (maximum 100)
549
2298
  */
550
2299
  page_size?: number;
551
2300
  /**
552
- * Field to sort by (repo, filename, size, updated_at, snapshot)
2301
+ * Field to sort by. Common values: repo, filename, size, updated_at, snapshot, created_at
553
2302
  */
554
- sort?: string | null;
2303
+ sort?: string;
555
2304
  /**
556
- * Sort order (asc or desc)
2305
+ * Sort order: 'asc' for ascending, 'desc' for descending
557
2306
  */
558
2307
  sort_order?: string;
559
2308
  };
560
2309
  url: '/bodhi/v1/modelfiles';
561
2310
  };
562
2311
  export type ListModelFilesErrors = {
2312
+ /**
2313
+ * Invalid request parameters
2314
+ */
2315
+ 400: OpenAiApiError;
2316
+ /**
2317
+ * Not authenticated
2318
+ */
2319
+ 401: OpenAiApiError;
2320
+ /**
2321
+ * Insufficient permissions
2322
+ */
2323
+ 403: OpenAiApiError;
563
2324
  /**
564
2325
  * Internal server error
565
2326
  */
@@ -568,9 +2329,9 @@ export type ListModelFilesErrors = {
568
2329
  export type ListModelFilesError = ListModelFilesErrors[keyof ListModelFilesErrors];
569
2330
  export type ListModelFilesResponses = {
570
2331
  /**
571
- * List of supported model files from local HuggingFace cache folder
2332
+ * Local model files retrieved successfully from cache
572
2333
  */
573
- 200: PaginatedResponseLocalModelResponse;
2334
+ 200: PaginatedLocalModelResponse;
574
2335
  };
575
2336
  export type ListModelFilesResponse = ListModelFilesResponses[keyof ListModelFilesResponses];
576
2337
  export type ListDownloadsData = {
@@ -578,25 +2339,37 @@ export type ListDownloadsData = {
578
2339
  path?: never;
579
2340
  query?: {
580
2341
  /**
581
- * Page number (1-based)
2342
+ * Page number (1-based indexing)
582
2343
  */
583
2344
  page?: number;
584
2345
  /**
585
- * Number of items per page (max 100)
2346
+ * Number of items to return per page (maximum 100)
586
2347
  */
587
2348
  page_size?: number;
588
2349
  /**
589
- * Field to sort by (repo, filename, size, updated_at, snapshot)
2350
+ * Field to sort by. Common values: repo, filename, size, updated_at, snapshot, created_at
590
2351
  */
591
- sort?: string | null;
2352
+ sort?: string;
592
2353
  /**
593
- * Sort order (asc or desc)
2354
+ * Sort order: 'asc' for ascending, 'desc' for descending
594
2355
  */
595
2356
  sort_order?: string;
596
2357
  };
597
2358
  url: '/bodhi/v1/modelfiles/pull';
598
2359
  };
599
2360
  export type ListDownloadsErrors = {
2361
+ /**
2362
+ * Invalid request parameters
2363
+ */
2364
+ 400: OpenAiApiError;
2365
+ /**
2366
+ * Not authenticated
2367
+ */
2368
+ 401: OpenAiApiError;
2369
+ /**
2370
+ * Insufficient permissions
2371
+ */
2372
+ 403: OpenAiApiError;
600
2373
  /**
601
2374
  * Internal server error
602
2375
  */
@@ -605,14 +2378,14 @@ export type ListDownloadsErrors = {
605
2378
  export type ListDownloadsError = ListDownloadsErrors[keyof ListDownloadsErrors];
606
2379
  export type ListDownloadsResponses = {
607
2380
  /**
608
- * List of download requests
2381
+ * Model download requests retrieved successfully
609
2382
  */
610
- 200: PaginatedResponseDownloadRequest;
2383
+ 200: PaginatedDownloadResponse;
611
2384
  };
612
2385
  export type ListDownloadsResponse = ListDownloadsResponses[keyof ListDownloadsResponses];
613
2386
  export type PullModelFileData = {
614
2387
  /**
615
- * Model file download request
2388
+ * Model file download specification with repository and filename
616
2389
  */
617
2390
  body: NewDownloadRequest;
618
2391
  path?: never;
@@ -621,9 +2394,17 @@ export type PullModelFileData = {
621
2394
  };
622
2395
  export type PullModelFileErrors = {
623
2396
  /**
624
- * File already exists or invalid input
2397
+ * Invalid request parameters
625
2398
  */
626
2399
  400: OpenAiApiError;
2400
+ /**
2401
+ * Not authenticated
2402
+ */
2403
+ 401: OpenAiApiError;
2404
+ /**
2405
+ * Insufficient permissions
2406
+ */
2407
+ 403: OpenAiApiError;
627
2408
  /**
628
2409
  * Internal server error
629
2410
  */
@@ -645,17 +2426,7 @@ export type PullModelByAliasData = {
645
2426
  body?: never;
646
2427
  path: {
647
2428
  /**
648
- * Available model aliases:
649
- * - llama3:instruct - Meta Llama 3 8B Instruct
650
- * - llama3:70b-instruct - Meta Llama 3 70B Instruct
651
- * - llama2:chat - Llama 2 7B Chat
652
- * - llama2:13b-chat - Llama 2 13B Chat
653
- * - llama2:70b-chat - Llama 2 70B Chat
654
- * - phi3:mini - Phi 3 Mini
655
- * - mistral:instruct - Mistral 7B Instruct
656
- * - mixtral:instruct - Mixtral 8x7B Instruct
657
- * - gemma:instruct - Gemma 7B Instruct
658
- * - gemma:7b-instruct-v1.1-q8_0 - Gemma 1.1 7B Instruct
2429
+ * 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.
659
2430
  */
660
2431
  alias: string;
661
2432
  };
@@ -664,9 +2435,17 @@ export type PullModelByAliasData = {
664
2435
  };
665
2436
  export type PullModelByAliasErrors = {
666
2437
  /**
667
- * File already exists
2438
+ * Invalid request parameters
668
2439
  */
669
2440
  400: OpenAiApiError;
2441
+ /**
2442
+ * Not authenticated
2443
+ */
2444
+ 401: OpenAiApiError;
2445
+ /**
2446
+ * Insufficient permissions
2447
+ */
2448
+ 403: OpenAiApiError;
670
2449
  /**
671
2450
  * Alias not found
672
2451
  */
@@ -692,7 +2471,7 @@ export type GetDownloadStatusData = {
692
2471
  body?: never;
693
2472
  path: {
694
2473
  /**
695
- * Download request identifier
2474
+ * Unique identifier of the download request (UUID format)
696
2475
  */
697
2476
  id: string;
698
2477
  };
@@ -700,6 +2479,18 @@ export type GetDownloadStatusData = {
700
2479
  url: '/bodhi/v1/modelfiles/pull/{id}';
701
2480
  };
702
2481
  export type GetDownloadStatusErrors = {
2482
+ /**
2483
+ * Invalid request parameters
2484
+ */
2485
+ 400: OpenAiApiError;
2486
+ /**
2487
+ * Not authenticated
2488
+ */
2489
+ 401: OpenAiApiError;
2490
+ /**
2491
+ * Insufficient permissions
2492
+ */
2493
+ 403: OpenAiApiError;
703
2494
  /**
704
2495
  * Download request not found
705
2496
  */
@@ -717,43 +2508,87 @@ export type GetDownloadStatusResponses = {
717
2508
  200: DownloadRequest;
718
2509
  };
719
2510
  export type GetDownloadStatusResponse = GetDownloadStatusResponses[keyof GetDownloadStatusResponses];
720
- export type ListModelAliasesData = {
2511
+ export type ListAllModelsData = {
721
2512
  body?: never;
722
2513
  path?: never;
723
2514
  query?: {
724
2515
  /**
725
- * Page number (1-based)
2516
+ * Page number (1-based indexing)
726
2517
  */
727
2518
  page?: number;
728
2519
  /**
729
- * Number of items per page (max 100)
2520
+ * Number of items to return per page (maximum 100)
730
2521
  */
731
2522
  page_size?: number;
732
2523
  /**
733
- * Field to sort by (repo, filename, size, updated_at, snapshot)
2524
+ * Field to sort by. Common values: repo, filename, size, updated_at, snapshot, created_at
734
2525
  */
735
- sort?: string | null;
2526
+ sort?: string;
736
2527
  /**
737
- * Sort order (asc or desc)
2528
+ * Sort order: 'asc' for ascending, 'desc' for descending
738
2529
  */
739
2530
  sort_order?: string;
740
2531
  };
741
2532
  url: '/bodhi/v1/models';
742
2533
  };
743
- export type ListModelAliasesErrors = {
2534
+ export type ListAllModelsErrors = {
2535
+ /**
2536
+ * Invalid request parameters
2537
+ */
2538
+ 400: OpenAiApiError;
2539
+ /**
2540
+ * Not authenticated
2541
+ */
2542
+ 401: OpenAiApiError;
2543
+ /**
2544
+ * Insufficient permissions
2545
+ */
2546
+ 403: OpenAiApiError;
2547
+ /**
2548
+ * Internal server error
2549
+ */
2550
+ 500: OpenAiApiError;
2551
+ };
2552
+ export type ListAllModelsError = ListAllModelsErrors[keyof ListAllModelsErrors];
2553
+ export type ListAllModelsResponses = {
2554
+ /**
2555
+ * Paginated list of model aliases retrieved successfully
2556
+ */
2557
+ 200: PaginatedAliasResponse;
2558
+ };
2559
+ export type ListAllModelsResponse = ListAllModelsResponses[keyof ListAllModelsResponses];
2560
+ export type CreateAliasData = {
2561
+ body: CreateAliasRequest;
2562
+ path?: never;
2563
+ query?: never;
2564
+ url: '/bodhi/v1/models';
2565
+ };
2566
+ export type CreateAliasErrors = {
2567
+ /**
2568
+ * Invalid request parameters
2569
+ */
2570
+ 400: OpenAiApiError;
2571
+ /**
2572
+ * Not authenticated
2573
+ */
2574
+ 401: OpenAiApiError;
2575
+ /**
2576
+ * Insufficient permissions
2577
+ */
2578
+ 403: OpenAiApiError;
744
2579
  /**
745
2580
  * Internal server error
746
2581
  */
747
2582
  500: OpenAiApiError;
748
2583
  };
749
- export type ListModelAliasesError = ListModelAliasesErrors[keyof ListModelAliasesErrors];
750
- export type ListModelAliasesResponses = {
2584
+ export type CreateAliasError = CreateAliasErrors[keyof CreateAliasErrors];
2585
+ export type CreateAliasResponses = {
751
2586
  /**
752
- * List of configured model aliases
2587
+ * Alias created succesfully
753
2588
  */
754
- 200: PaginatedResponseAliasResponse;
2589
+ 201: UserAliasResponse;
755
2590
  };
756
- export type ListModelAliasesResponse = ListModelAliasesResponses[keyof ListModelAliasesResponses];
2591
+ export type CreateAliasResponse = CreateAliasResponses[keyof CreateAliasResponses];
757
2592
  export type GetAliasData = {
758
2593
  body?: never;
759
2594
  path: {
@@ -766,6 +2601,18 @@ export type GetAliasData = {
766
2601
  url: '/bodhi/v1/models/{alias}';
767
2602
  };
768
2603
  export type GetAliasErrors = {
2604
+ /**
2605
+ * Invalid request parameters
2606
+ */
2607
+ 400: OpenAiApiError;
2608
+ /**
2609
+ * Not authenticated
2610
+ */
2611
+ 401: OpenAiApiError;
2612
+ /**
2613
+ * Insufficient permissions
2614
+ */
2615
+ 403: OpenAiApiError;
769
2616
  /**
770
2617
  * Alias not found
771
2618
  */
@@ -780,9 +2627,46 @@ export type GetAliasResponses = {
780
2627
  /**
781
2628
  * Model alias details
782
2629
  */
783
- 200: AliasResponse;
2630
+ 200: UserAliasResponse;
784
2631
  };
785
2632
  export type GetAliasResponse = GetAliasResponses[keyof GetAliasResponses];
2633
+ export type UpdateAliasData = {
2634
+ body: UpdateAliasRequest;
2635
+ path: {
2636
+ /**
2637
+ * Alias identifier
2638
+ */
2639
+ id: string;
2640
+ };
2641
+ query?: never;
2642
+ url: '/bodhi/v1/models/{id}';
2643
+ };
2644
+ export type UpdateAliasErrors = {
2645
+ /**
2646
+ * Invalid request parameters
2647
+ */
2648
+ 400: OpenAiApiError;
2649
+ /**
2650
+ * Not authenticated
2651
+ */
2652
+ 401: OpenAiApiError;
2653
+ /**
2654
+ * Insufficient permissions
2655
+ */
2656
+ 403: OpenAiApiError;
2657
+ /**
2658
+ * Internal server error
2659
+ */
2660
+ 500: OpenAiApiError;
2661
+ };
2662
+ export type UpdateAliasError = UpdateAliasErrors[keyof UpdateAliasErrors];
2663
+ export type UpdateAliasResponses = {
2664
+ /**
2665
+ * Alias updated succesfully
2666
+ */
2667
+ 200: UserAliasResponse;
2668
+ };
2669
+ export type UpdateAliasResponse = UpdateAliasResponses[keyof UpdateAliasResponses];
786
2670
  export type ListSettingsData = {
787
2671
  body?: never;
788
2672
  path?: never;
@@ -791,9 +2675,17 @@ export type ListSettingsData = {
791
2675
  };
792
2676
  export type ListSettingsErrors = {
793
2677
  /**
794
- * Unauthorized - User is not an admin
2678
+ * Invalid request parameters
2679
+ */
2680
+ 400: OpenAiApiError;
2681
+ /**
2682
+ * Not authenticated
795
2683
  */
796
2684
  401: OpenAiApiError;
2685
+ /**
2686
+ * Insufficient permissions
2687
+ */
2688
+ 403: OpenAiApiError;
797
2689
  /**
798
2690
  * Internal server error
799
2691
  */
@@ -802,7 +2694,7 @@ export type ListSettingsErrors = {
802
2694
  export type ListSettingsError = ListSettingsErrors[keyof ListSettingsErrors];
803
2695
  export type ListSettingsResponses = {
804
2696
  /**
805
- * List of application settings
2697
+ * Application settings retrieved successfully
806
2698
  */
807
2699
  200: Array<SettingInfo>;
808
2700
  };
@@ -811,7 +2703,7 @@ export type DeleteSettingData = {
811
2703
  body?: never;
812
2704
  path: {
813
2705
  /**
814
- * Setting key to reset
2706
+ * Setting key identifier to reset to default value
815
2707
  */
816
2708
  key: string;
817
2709
  };
@@ -819,10 +2711,26 @@ export type DeleteSettingData = {
819
2711
  url: '/bodhi/v1/settings/{key}';
820
2712
  };
821
2713
  export type DeleteSettingErrors = {
2714
+ /**
2715
+ * Invalid request parameters
2716
+ */
2717
+ 400: OpenAiApiError;
2718
+ /**
2719
+ * Not authenticated
2720
+ */
2721
+ 401: OpenAiApiError;
2722
+ /**
2723
+ * Insufficient permissions
2724
+ */
2725
+ 403: OpenAiApiError;
822
2726
  /**
823
2727
  * Setting not found
824
2728
  */
825
2729
  404: OpenAiApiError;
2730
+ /**
2731
+ * Internal server error
2732
+ */
2733
+ 500: OpenAiApiError;
826
2734
  };
827
2735
  export type DeleteSettingError = DeleteSettingErrors[keyof DeleteSettingErrors];
828
2736
  export type DeleteSettingResponses = {
@@ -837,11 +2745,14 @@ export type UpdateSettingData = {
837
2745
  * Request to update a setting value
838
2746
  */
839
2747
  body: {
2748
+ /**
2749
+ * New value for the setting (type depends on setting metadata)
2750
+ */
840
2751
  value: unknown;
841
2752
  };
842
2753
  path: {
843
2754
  /**
844
- * Setting key to update
2755
+ * Setting key identifier (e.g., BODHI_LOG_LEVEL, BODHI_PORT)
845
2756
  */
846
2757
  key: string;
847
2758
  };
@@ -850,13 +2761,25 @@ export type UpdateSettingData = {
850
2761
  };
851
2762
  export type UpdateSettingErrors = {
852
2763
  /**
853
- * Invalid setting or value
2764
+ * Invalid request parameters
854
2765
  */
855
2766
  400: OpenAiApiError;
2767
+ /**
2768
+ * Not authenticated
2769
+ */
2770
+ 401: OpenAiApiError;
2771
+ /**
2772
+ * Insufficient permissions
2773
+ */
2774
+ 403: OpenAiApiError;
856
2775
  /**
857
2776
  * Setting not found
858
2777
  */
859
2778
  404: OpenAiApiError;
2779
+ /**
2780
+ * Internal server error
2781
+ */
2782
+ 500: OpenAiApiError;
860
2783
  };
861
2784
  export type UpdateSettingError = UpdateSettingErrors[keyof UpdateSettingErrors];
862
2785
  export type UpdateSettingResponses = {
@@ -867,6 +2790,9 @@ export type UpdateSettingResponses = {
867
2790
  };
868
2791
  export type UpdateSettingResponse = UpdateSettingResponses[keyof UpdateSettingResponses];
869
2792
  export type SetupAppData = {
2793
+ /**
2794
+ * Application setup configuration
2795
+ */
870
2796
  body: SetupRequest;
871
2797
  path?: never;
872
2798
  query?: never;
@@ -874,7 +2800,7 @@ export type SetupAppData = {
874
2800
  };
875
2801
  export type SetupAppErrors = {
876
2802
  /**
877
- * Application is already setup
2803
+ * Invalid request parameters
878
2804
  */
879
2805
  400: OpenAiApiError;
880
2806
  /**
@@ -885,7 +2811,7 @@ export type SetupAppErrors = {
885
2811
  export type SetupAppError = SetupAppErrors[keyof SetupAppErrors];
886
2812
  export type SetupAppResponses = {
887
2813
  /**
888
- * Application setup successful
2814
+ * Application setup completed successfully
889
2815
  */
890
2816
  200: SetupResponse;
891
2817
  };
@@ -895,19 +2821,19 @@ export type ListApiTokensData = {
895
2821
  path?: never;
896
2822
  query?: {
897
2823
  /**
898
- * Page number (1-based)
2824
+ * Page number (1-based indexing)
899
2825
  */
900
2826
  page?: number;
901
2827
  /**
902
- * Number of items per page (max 100)
2828
+ * Number of items to return per page (maximum 100)
903
2829
  */
904
2830
  page_size?: number;
905
2831
  /**
906
- * Field to sort by (repo, filename, size, updated_at, snapshot)
2832
+ * Field to sort by. Common values: repo, filename, size, updated_at, snapshot, created_at
907
2833
  */
908
- sort?: string | null;
2834
+ sort?: string;
909
2835
  /**
910
- * Sort order (asc or desc)
2836
+ * Sort order: 'asc' for ascending, 'desc' for descending
911
2837
  */
912
2838
  sort_order?: string;
913
2839
  };
@@ -915,9 +2841,17 @@ export type ListApiTokensData = {
915
2841
  };
916
2842
  export type ListApiTokensErrors = {
917
2843
  /**
918
- * Unauthorized - Token missing or invalid
2844
+ * Invalid request parameters
2845
+ */
2846
+ 400: OpenAiApiError;
2847
+ /**
2848
+ * Not authenticated
919
2849
  */
920
2850
  401: OpenAiApiError;
2851
+ /**
2852
+ * Insufficient permissions
2853
+ */
2854
+ 403: OpenAiApiError;
921
2855
  /**
922
2856
  * Internal server error
923
2857
  */
@@ -928,10 +2862,13 @@ export type ListApiTokensResponses = {
928
2862
  /**
929
2863
  * List of API tokens
930
2864
  */
931
- 200: PaginatedResponseApiToken;
2865
+ 200: PaginatedApiTokenResponse;
932
2866
  };
933
2867
  export type ListApiTokensResponse = ListApiTokensResponses[keyof ListApiTokensResponses];
934
2868
  export type CreateApiTokenData = {
2869
+ /**
2870
+ * API token creation parameters
2871
+ */
935
2872
  body: CreateApiTokenRequest;
936
2873
  path?: never;
937
2874
  query?: never;
@@ -939,9 +2876,17 @@ export type CreateApiTokenData = {
939
2876
  };
940
2877
  export type CreateApiTokenErrors = {
941
2878
  /**
942
- * Invalid request
2879
+ * Invalid request parameters
943
2880
  */
944
2881
  400: OpenAiApiError;
2882
+ /**
2883
+ * Not authenticated
2884
+ */
2885
+ 401: OpenAiApiError;
2886
+ /**
2887
+ * Insufficient permissions
2888
+ */
2889
+ 403: OpenAiApiError;
945
2890
  /**
946
2891
  * Internal server error
947
2892
  */
@@ -962,7 +2907,7 @@ export type UpdateApiTokenData = {
962
2907
  body: UpdateApiTokenRequest;
963
2908
  path: {
964
2909
  /**
965
- * Token identifier
2910
+ * Unique identifier of the API token to update
966
2911
  */
967
2912
  id: string;
968
2913
  };
@@ -971,9 +2916,17 @@ export type UpdateApiTokenData = {
971
2916
  };
972
2917
  export type UpdateApiTokenErrors = {
973
2918
  /**
974
- * Unauthorized - Token missing or invalid
2919
+ * Invalid request parameters
2920
+ */
2921
+ 400: OpenAiApiError;
2922
+ /**
2923
+ * Not authenticated
975
2924
  */
976
2925
  401: OpenAiApiError;
2926
+ /**
2927
+ * Insufficient permissions
2928
+ */
2929
+ 403: OpenAiApiError;
977
2930
  /**
978
2931
  * Token not found
979
2932
  */
@@ -999,33 +2952,276 @@ export type GetCurrentUserData = {
999
2952
  };
1000
2953
  export type GetCurrentUserErrors = {
1001
2954
  /**
1002
- * Error in extracting user info from token
2955
+ * Invalid request parameters
2956
+ */
2957
+ 400: OpenAiApiError;
2958
+ /**
2959
+ * Not authenticated
2960
+ */
2961
+ 401: OpenAiApiError;
2962
+ /**
2963
+ * Insufficient permissions
2964
+ */
2965
+ 403: OpenAiApiError;
2966
+ /**
2967
+ * Internal server error
1003
2968
  */
1004
2969
  500: OpenAiApiError;
1005
2970
  };
1006
2971
  export type GetCurrentUserError = GetCurrentUserErrors[keyof GetCurrentUserErrors];
1007
2972
  export type GetCurrentUserResponses = {
1008
2973
  /**
1009
- * Returns current user information
2974
+ * User information (authenticated or not)
1010
2975
  */
1011
- 200: UserInfo;
2976
+ 200: UserResponse;
1012
2977
  };
1013
2978
  export type GetCurrentUserResponse = GetCurrentUserResponses[keyof GetCurrentUserResponses];
2979
+ export type RequestUserAccessData = {
2980
+ body?: never;
2981
+ path?: never;
2982
+ query?: never;
2983
+ url: '/bodhi/v1/user/request-access';
2984
+ };
2985
+ export type RequestUserAccessErrors = {
2986
+ /**
2987
+ * Invalid request parameters
2988
+ */
2989
+ 400: OpenAiApiError;
2990
+ /**
2991
+ * Not authenticated
2992
+ */
2993
+ 401: OpenAiApiError;
2994
+ /**
2995
+ * Insufficient permissions
2996
+ */
2997
+ 403: OpenAiApiError;
2998
+ /**
2999
+ * Pending request already exists
3000
+ */
3001
+ 409: OpenAiApiError;
3002
+ /**
3003
+ * User already has role
3004
+ */
3005
+ 422: OpenAiApiError;
3006
+ /**
3007
+ * Internal server error
3008
+ */
3009
+ 500: OpenAiApiError;
3010
+ };
3011
+ export type RequestUserAccessError = RequestUserAccessErrors[keyof RequestUserAccessErrors];
3012
+ export type RequestUserAccessResponses = {
3013
+ /**
3014
+ * Access request created successfully
3015
+ */
3016
+ 201: unknown;
3017
+ };
3018
+ export type GetUserAccessStatusData = {
3019
+ body?: never;
3020
+ path?: never;
3021
+ query?: never;
3022
+ url: '/bodhi/v1/user/request-status';
3023
+ };
3024
+ export type GetUserAccessStatusErrors = {
3025
+ /**
3026
+ * Invalid request parameters
3027
+ */
3028
+ 400: OpenAiApiError;
3029
+ /**
3030
+ * Not authenticated
3031
+ */
3032
+ 401: OpenAiApiError;
3033
+ /**
3034
+ * Insufficient permissions
3035
+ */
3036
+ 403: OpenAiApiError;
3037
+ /**
3038
+ * Request not found
3039
+ */
3040
+ 404: OpenAiApiError;
3041
+ /**
3042
+ * Internal server error
3043
+ */
3044
+ 500: OpenAiApiError;
3045
+ };
3046
+ export type GetUserAccessStatusError = GetUserAccessStatusErrors[keyof GetUserAccessStatusErrors];
3047
+ export type GetUserAccessStatusResponses = {
3048
+ /**
3049
+ * Request status retrieved
3050
+ */
3051
+ 200: UserAccessStatusResponse;
3052
+ };
3053
+ export type GetUserAccessStatusResponse = GetUserAccessStatusResponses[keyof GetUserAccessStatusResponses];
3054
+ export type ListUsersData = {
3055
+ body?: never;
3056
+ path?: never;
3057
+ query?: {
3058
+ /**
3059
+ * Page number (1-based)
3060
+ */
3061
+ page?: number;
3062
+ /**
3063
+ * Number of users per page
3064
+ */
3065
+ page_size?: number;
3066
+ };
3067
+ url: '/bodhi/v1/users';
3068
+ };
3069
+ export type ListUsersErrors = {
3070
+ /**
3071
+ * Invalid request parameters
3072
+ */
3073
+ 400: OpenAiApiError;
3074
+ /**
3075
+ * Not authenticated
3076
+ */
3077
+ 401: OpenAiApiError;
3078
+ /**
3079
+ * Insufficient permissions
3080
+ */
3081
+ 403: OpenAiApiError;
3082
+ /**
3083
+ * Internal server error
3084
+ */
3085
+ 500: OpenAiApiError;
3086
+ };
3087
+ export type ListUsersError = ListUsersErrors[keyof ListUsersErrors];
3088
+ export type ListUsersResponses = {
3089
+ /**
3090
+ * Users retrieved successfully
3091
+ */
3092
+ 200: UserListResponse;
3093
+ };
3094
+ export type ListUsersResponse = ListUsersResponses[keyof ListUsersResponses];
3095
+ export type RemoveUserData = {
3096
+ body?: never;
3097
+ path: {
3098
+ /**
3099
+ * User ID to remove
3100
+ */
3101
+ user_id: string;
3102
+ };
3103
+ query?: never;
3104
+ url: '/bodhi/v1/users/{user_id}';
3105
+ };
3106
+ export type RemoveUserErrors = {
3107
+ /**
3108
+ * Invalid request parameters
3109
+ */
3110
+ 400: OpenAiApiError;
3111
+ /**
3112
+ * Not authenticated
3113
+ */
3114
+ 401: OpenAiApiError;
3115
+ /**
3116
+ * Insufficient permissions
3117
+ */
3118
+ 403: OpenAiApiError;
3119
+ /**
3120
+ * User not found
3121
+ */
3122
+ 404: OpenAiApiError;
3123
+ /**
3124
+ * Internal server error
3125
+ */
3126
+ 500: OpenAiApiError;
3127
+ };
3128
+ export type RemoveUserError = RemoveUserErrors[keyof RemoveUserErrors];
3129
+ export type RemoveUserResponses = {
3130
+ /**
3131
+ * User removed successfully
3132
+ */
3133
+ 200: unknown;
3134
+ };
3135
+ export type ChangeUserRoleData = {
3136
+ body: ChangeRoleRequest;
3137
+ path: {
3138
+ /**
3139
+ * User ID to change role for
3140
+ */
3141
+ user_id: string;
3142
+ };
3143
+ query?: never;
3144
+ url: '/bodhi/v1/users/{user_id}/role';
3145
+ };
3146
+ export type ChangeUserRoleErrors = {
3147
+ /**
3148
+ * Invalid request parameters
3149
+ */
3150
+ 400: OpenAiApiError;
3151
+ /**
3152
+ * Not authenticated
3153
+ */
3154
+ 401: OpenAiApiError;
3155
+ /**
3156
+ * Insufficient permissions
3157
+ */
3158
+ 403: OpenAiApiError;
3159
+ /**
3160
+ * User not found
3161
+ */
3162
+ 404: OpenAiApiError;
3163
+ /**
3164
+ * Internal server error
3165
+ */
3166
+ 500: OpenAiApiError;
3167
+ };
3168
+ export type ChangeUserRoleError = ChangeUserRoleErrors[keyof ChangeUserRoleErrors];
3169
+ export type ChangeUserRoleResponses = {
3170
+ /**
3171
+ * Role changed successfully
3172
+ */
3173
+ 200: unknown;
3174
+ };
3175
+ export type HealthCheckData = {
3176
+ body?: never;
3177
+ path?: never;
3178
+ query?: never;
3179
+ url: '/health';
3180
+ };
3181
+ export type HealthCheckErrors = {
3182
+ /**
3183
+ * Invalid request parameters
3184
+ */
3185
+ 400: OpenAiApiError;
3186
+ /**
3187
+ * Internal server error
3188
+ */
3189
+ 500: OpenAiApiError;
3190
+ };
3191
+ export type HealthCheckError = HealthCheckErrors[keyof HealthCheckErrors];
3192
+ export type HealthCheckResponses = {
3193
+ /**
3194
+ * Application is healthy and fully operational
3195
+ */
3196
+ 200: PingResponse;
3197
+ };
3198
+ export type HealthCheckResponse = HealthCheckResponses[keyof HealthCheckResponses];
1014
3199
  export type PingServerData = {
1015
3200
  body?: never;
1016
3201
  path?: never;
1017
3202
  query?: never;
1018
3203
  url: '/ping';
1019
3204
  };
3205
+ export type PingServerErrors = {
3206
+ /**
3207
+ * Invalid request parameters
3208
+ */
3209
+ 400: OpenAiApiError;
3210
+ /**
3211
+ * Internal server error
3212
+ */
3213
+ 500: OpenAiApiError;
3214
+ };
3215
+ export type PingServerError = PingServerErrors[keyof PingServerErrors];
1020
3216
  export type PingServerResponses = {
1021
3217
  /**
1022
- * Server is healthy
3218
+ * Server is responding normally
1023
3219
  */
1024
3220
  200: PingResponse;
1025
3221
  };
1026
3222
  export type PingServerResponse = PingServerResponses[keyof PingServerResponses];
1027
3223
  export type CreateChatCompletionData = {
1028
- body: unknown;
3224
+ body: CreateChatCompletionRequest;
1029
3225
  path?: never;
1030
3226
  query?: never;
1031
3227
  url: '/v1/chat/completions';
@@ -1036,9 +3232,13 @@ export type CreateChatCompletionErrors = {
1036
3232
  */
1037
3233
  400: OpenAiApiError;
1038
3234
  /**
1039
- * Invalid authentication
3235
+ * Not authenticated
1040
3236
  */
1041
3237
  401: OpenAiApiError;
3238
+ /**
3239
+ * Insufficient permissions
3240
+ */
3241
+ 403: OpenAiApiError;
1042
3242
  /**
1043
3243
  * Internal server error
1044
3244
  */
@@ -1049,12 +3249,45 @@ export type CreateChatCompletionResponses = {
1049
3249
  /**
1050
3250
  * Chat completion response
1051
3251
  */
1052
- 200: unknown;
3252
+ 200: CreateChatCompletionResponse;
1053
3253
  /**
1054
3254
  * Chat completion stream, the status is 200, using 201 to avoid OpenAPI format limitation.
1055
3255
  */
1056
- 201: unknown;
3256
+ 201: CreateChatCompletionStreamResponse;
3257
+ };
3258
+ export type CreateChatCompletionResponse2 = CreateChatCompletionResponses[keyof CreateChatCompletionResponses];
3259
+ export type CreateEmbeddingData = {
3260
+ body: CreateEmbeddingRequest;
3261
+ path?: never;
3262
+ query?: never;
3263
+ url: '/v1/embeddings';
3264
+ };
3265
+ export type CreateEmbeddingErrors = {
3266
+ /**
3267
+ * Invalid request parameters
3268
+ */
3269
+ 400: OpenAiApiError;
3270
+ /**
3271
+ * Not authenticated
3272
+ */
3273
+ 401: OpenAiApiError;
3274
+ /**
3275
+ * Insufficient permissions
3276
+ */
3277
+ 403: OpenAiApiError;
3278
+ /**
3279
+ * Internal server error
3280
+ */
3281
+ 500: OpenAiApiError;
3282
+ };
3283
+ export type CreateEmbeddingError = CreateEmbeddingErrors[keyof CreateEmbeddingErrors];
3284
+ export type CreateEmbeddingResponses = {
3285
+ /**
3286
+ * Embedding response
3287
+ */
3288
+ 200: CreateEmbeddingResponse;
1057
3289
  };
3290
+ export type CreateEmbeddingResponse2 = CreateEmbeddingResponses[keyof CreateEmbeddingResponses];
1058
3291
  export type ListModelsData = {
1059
3292
  body?: never;
1060
3293
  path?: never;
@@ -1063,9 +3296,17 @@ export type ListModelsData = {
1063
3296
  };
1064
3297
  export type ListModelsErrors = {
1065
3298
  /**
1066
- * Invalid authentication
3299
+ * Invalid request parameters
3300
+ */
3301
+ 400: OpenAiApiError;
3302
+ /**
3303
+ * Not authenticated
1067
3304
  */
1068
3305
  401: OpenAiApiError;
3306
+ /**
3307
+ * Insufficient permissions
3308
+ */
3309
+ 403: OpenAiApiError;
1069
3310
  /**
1070
3311
  * Internal server error
1071
3312
  */
@@ -1076,9 +3317,50 @@ export type ListModelsResponses = {
1076
3317
  /**
1077
3318
  * List of available models
1078
3319
  */
1079
- 200: ListModelResponseWrapper;
3320
+ 200: ListModelResponse;
1080
3321
  };
1081
3322
  export type ListModelsResponse = ListModelsResponses[keyof ListModelsResponses];
3323
+ export type GetModelData = {
3324
+ body?: never;
3325
+ path: {
3326
+ /**
3327
+ * Model identifier - can be user alias (e.g., 'llama2:chat'), model alias, or API provider alias
3328
+ */
3329
+ id: string;
3330
+ };
3331
+ query?: never;
3332
+ url: '/v1/models/{id}';
3333
+ };
3334
+ export type GetModelErrors = {
3335
+ /**
3336
+ * Invalid request parameters
3337
+ */
3338
+ 400: OpenAiApiError;
3339
+ /**
3340
+ * Not authenticated
3341
+ */
3342
+ 401: OpenAiApiError;
3343
+ /**
3344
+ * Insufficient permissions
3345
+ */
3346
+ 403: OpenAiApiError;
3347
+ /**
3348
+ * Model not found
3349
+ */
3350
+ 404: OpenAiApiError;
3351
+ /**
3352
+ * Internal server error
3353
+ */
3354
+ 500: OpenAiApiError;
3355
+ };
3356
+ export type GetModelError = GetModelErrors[keyof GetModelErrors];
3357
+ export type GetModelResponses = {
3358
+ /**
3359
+ * Model details
3360
+ */
3361
+ 200: ModelResponse;
3362
+ };
3363
+ export type GetModelResponse = GetModelResponses[keyof GetModelResponses];
1082
3364
  export type ClientOptions = {
1083
3365
  baseUrl: 'http://localhost:1135' | (string & {});
1084
3366
  };