@bodhiapp/ts-client 0.1.6 → 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.
@@ -13,12 +13,12 @@ export type Alias = (UserAlias & {
13
13
  });
14
14
 
15
15
  export type ApiAlias = {
16
+ id: string;
16
17
  api_format: ApiFormat;
17
18
  base_url: string;
18
- created_at: string;
19
- id: string;
20
19
  models: Array<string>;
21
20
  prefix?: string | null;
21
+ created_at: string;
22
22
  updated_at: string;
23
23
  };
24
24
 
@@ -38,32 +38,33 @@ export type ApiFormatsResponse = {
38
38
  * Response containing API model configuration
39
39
  */
40
40
  export type ApiModelResponse = {
41
+ id: string;
41
42
  api_format: ApiFormat;
42
- api_key_masked: string;
43
43
  base_url: string;
44
- created_at: string;
45
- id: string;
44
+ api_key_masked: string;
46
45
  models: Array<string>;
47
46
  prefix?: string | null;
47
+ created_at: string;
48
48
  updated_at: string;
49
49
  };
50
50
 
51
51
  export type ApiToken = {
52
- created_at: string;
53
52
  id: string;
53
+ user_id: string;
54
54
  name: string;
55
- status: TokenStatus;
55
+ token_prefix: string;
56
56
  token_hash: string;
57
- token_id: string;
57
+ scopes: string;
58
+ status: TokenStatus;
59
+ created_at: string;
58
60
  updated_at: string;
59
- user_id: string;
60
61
  };
61
62
 
62
63
  export type ApiTokenResponse = {
63
64
  /**
64
- * API token with bapp_ prefix for programmatic access
65
+ * API token with bodhiapp_ prefix for programmatic access
65
66
  */
66
- offline_token: string;
67
+ token: string;
67
68
  };
68
69
 
69
70
  export type AppAccessRequest = {
@@ -79,151 +80,831 @@ export type AppAccessResponse = {
79
80
  */
80
81
  export type AppInfo = {
81
82
  /**
82
- * Current application setup and operational status
83
+ * Application version number (semantic versioning)
84
+ */
85
+ version: string;
86
+ /**
87
+ * Current application setup and operational status
88
+ */
89
+ status: AppStatus;
90
+ };
91
+
92
+ export type AppRole = ResourceRole | TokenScope | UserScope;
93
+
94
+ export type AppStatus = 'setup' | 'ready' | 'resource-admin';
95
+
96
+ /**
97
+ * Request body for approving access with role assignment
98
+ */
99
+ export type ApproveUserAccessRequest = {
100
+ /**
101
+ * Role to assign to the user
102
+ */
103
+ role: ResourceRole;
104
+ };
105
+
106
+ export type AuthCallbackRequest = {
107
+ /**
108
+ * OAuth authorization code from successful authentication (required for success flow)
109
+ */
110
+ code?: string | null;
111
+ /**
112
+ * OAuth state parameter for CSRF protection (must match initiated request)
113
+ */
114
+ state?: string | null;
115
+ /**
116
+ * OAuth error code if authentication failed (e.g., "access_denied")
117
+ */
118
+ error?: string | null;
119
+ /**
120
+ * Human-readable OAuth error description if authentication failed
121
+ */
122
+ error_description?: string | null;
123
+ [key: string]: string | (string | null) | (string | null) | (string | null) | (string | null) | undefined;
124
+ };
125
+
126
+ /**
127
+ * Change user role request
128
+ */
129
+ export type ChangeRoleRequest = {
130
+ /**
131
+ * Role to assign to the user
132
+ */
133
+ role: string;
134
+ };
135
+
136
+ export type ChatChoice = {
137
+ /**
138
+ * The index of the choice in the list of choices.
139
+ */
140
+ index: number;
141
+ message: ChatCompletionResponseMessage;
142
+ finish_reason?: null | FinishReason;
143
+ logprobs?: null | ChatChoiceLogprobs;
144
+ };
145
+
146
+ export type ChatChoiceLogprobs = {
147
+ /**
148
+ * A list of message content tokens with log probability information.
149
+ */
150
+ content?: Array<ChatCompletionTokenLogprob> | null;
151
+ refusal?: Array<ChatCompletionTokenLogprob> | null;
152
+ };
153
+
154
+ export type ChatChoiceStream = {
155
+ /**
156
+ * The index of the choice in the list of choices.
157
+ */
158
+ index: number;
159
+ delta: ChatCompletionStreamResponseDelta;
160
+ finish_reason?: null | FinishReason;
161
+ logprobs?: null | ChatChoiceLogprobs;
162
+ };
163
+
164
+ export type ChatCompletionAudio = {
165
+ /**
166
+ * 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).
167
+ */
168
+ voice: ChatCompletionAudioVoice;
169
+ /**
170
+ * Specifies the output audio format. Must be one of `wav`, `mp3`, `flac`, `opus`, or `pcm16`.
171
+ */
172
+ format: ChatCompletionAudioFormat;
173
+ };
174
+
175
+ export type ChatCompletionAudioFormat = 'wav' | 'mp3' | 'flac' | 'opus' | 'pcm16';
176
+
177
+ export type ChatCompletionAudioVoice = 'alloy' | 'ash' | 'ballad' | 'coral' | 'echo' | 'sage' | 'shimmer' | 'verse';
178
+
179
+ export type ChatCompletionFunctionCall = 'none' | 'auto' | {
180
+ /**
181
+ * Forces the model to call the specified function.
182
+ */
183
+ Function: {
184
+ name: string;
185
+ };
186
+ };
187
+
188
+ /**
189
+ * @deprecated
190
+ */
191
+ export type ChatCompletionFunctions = {
192
+ /**
193
+ * 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.
194
+ */
195
+ name: string;
196
+ /**
197
+ * A description of what the function does, used by the model to choose when and how to call the function.
198
+ */
199
+ description?: string | null;
200
+ /**
201
+ * 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.
202
+ *
203
+ * Omitting `parameters` defines a function with an empty parameter list.
204
+ */
205
+ parameters: unknown;
206
+ };
207
+
208
+ export type ChatCompletionMessageToolCall = {
209
+ /**
210
+ * The ID of the tool call.
211
+ */
212
+ id: string;
213
+ /**
214
+ * The type of the tool. Currently, only `function` is supported.
215
+ */
216
+ type: ChatCompletionToolType;
217
+ /**
218
+ * The function that the model called.
219
+ */
220
+ function: FunctionCall;
221
+ };
222
+
223
+ export type ChatCompletionMessageToolCallChunk = {
224
+ index: number;
225
+ /**
226
+ * The ID of the tool call.
227
+ */
228
+ id?: string | null;
229
+ type?: null | ChatCompletionToolType;
230
+ function?: null | FunctionCallStream;
231
+ };
232
+
233
+ /**
234
+ * Output types that you would like the model to generate for this request.
235
+ *
236
+ * Most models are capable of generating text, which is the default: `["text"]`
237
+ *
238
+ * The `gpt-4o-audio-preview` model can also be used to [generate
239
+ * audio](https://platform.openai.com/docs/guides/audio). To request that this model generate both text and audio responses, you can use: `["text", "audio"]`
240
+ */
241
+ export type ChatCompletionModalities = 'text' | 'audio';
242
+
243
+ /**
244
+ * Specifies a tool the model should use. Use to force the model to call a specific function.
245
+ */
246
+ export type ChatCompletionNamedToolChoice = {
247
+ /**
248
+ * The type of the tool. Currently, only `function` is supported.
249
+ */
250
+ type: ChatCompletionToolType;
251
+ function: FunctionName;
252
+ };
253
+
254
+ export type ChatCompletionRequestAssistantMessage = {
255
+ content?: null | ChatCompletionRequestAssistantMessageContent;
256
+ /**
257
+ * The refusal message by the assistant.
258
+ */
259
+ refusal?: string | null;
260
+ /**
261
+ * An optional name for the participant. Provides the model information to differentiate between participants of the same role.
262
+ */
263
+ name?: string | null;
264
+ audio?: null | ChatCompletionRequestAssistantMessageAudio;
265
+ tool_calls?: Array<ChatCompletionMessageToolCall> | null;
266
+ function_call?: null | FunctionCall;
267
+ };
268
+
269
+ export type ChatCompletionRequestAssistantMessageAudio = {
270
+ /**
271
+ * Unique identifier for a previous audio response from the model.
272
+ */
273
+ id: string;
274
+ };
275
+
276
+ export type ChatCompletionRequestAssistantMessageContent = string | Array<ChatCompletionRequestAssistantMessageContentPart>;
277
+
278
+ export type ChatCompletionRequestAssistantMessageContentPart = (ChatCompletionRequestMessageContentPartText & {
279
+ type: 'text';
280
+ }) | (ChatCompletionRequestMessageContentPartRefusal & {
281
+ type: 'refusal';
282
+ });
283
+
284
+ export type ChatCompletionRequestDeveloperMessage = {
285
+ /**
286
+ * The contents of the developer message.
287
+ */
288
+ content: ChatCompletionRequestDeveloperMessageContent;
289
+ /**
290
+ * An optional name for the participant. Provides the model information to differentiate between participants of the same role.
291
+ */
292
+ name?: string | null;
293
+ };
294
+
295
+ export type ChatCompletionRequestDeveloperMessageContent = string | Array<ChatCompletionRequestMessageContentPartText>;
296
+
297
+ export type ChatCompletionRequestFunctionMessage = {
298
+ /**
299
+ * The return value from the function call, to return to the model.
300
+ */
301
+ content?: string | null;
302
+ /**
303
+ * The name of the function to call.
304
+ */
305
+ name: string;
306
+ };
307
+
308
+ export type ChatCompletionRequestMessage = (ChatCompletionRequestDeveloperMessage & {
309
+ role: 'developer';
310
+ }) | (ChatCompletionRequestSystemMessage & {
311
+ role: 'system';
312
+ }) | (ChatCompletionRequestUserMessage & {
313
+ role: 'user';
314
+ }) | (ChatCompletionRequestAssistantMessage & {
315
+ role: 'assistant';
316
+ }) | (ChatCompletionRequestToolMessage & {
317
+ role: 'tool';
318
+ }) | (ChatCompletionRequestFunctionMessage & {
319
+ role: 'function';
320
+ });
321
+
322
+ /**
323
+ * Learn about [audio inputs](https://platform.openai.com/docs/guides/audio).
324
+ */
325
+ export type ChatCompletionRequestMessageContentPartAudio = {
326
+ input_audio: InputAudio;
327
+ };
328
+
329
+ export type ChatCompletionRequestMessageContentPartImage = {
330
+ image_url: ImageUrl;
331
+ };
332
+
333
+ export type ChatCompletionRequestMessageContentPartRefusal = {
334
+ /**
335
+ * The refusal message generated by the model.
336
+ */
337
+ refusal: string;
338
+ };
339
+
340
+ export type ChatCompletionRequestMessageContentPartText = {
341
+ text: string;
342
+ };
343
+
344
+ export type ChatCompletionRequestSystemMessage = {
345
+ /**
346
+ * The contents of the system message.
347
+ */
348
+ content: ChatCompletionRequestSystemMessageContent;
349
+ /**
350
+ * An optional name for the participant. Provides the model information to differentiate between participants of the same role.
351
+ */
352
+ name?: string | null;
353
+ };
354
+
355
+ export type ChatCompletionRequestSystemMessageContent = string | Array<ChatCompletionRequestSystemMessageContentPart>;
356
+
357
+ export type ChatCompletionRequestSystemMessageContentPart = ChatCompletionRequestMessageContentPartText & {
358
+ type: 'text';
359
+ };
360
+
361
+ /**
362
+ * Tool message
363
+ */
364
+ export type ChatCompletionRequestToolMessage = {
365
+ /**
366
+ * The contents of the tool message.
367
+ */
368
+ content: ChatCompletionRequestToolMessageContent;
369
+ tool_call_id: string;
370
+ };
371
+
372
+ export type ChatCompletionRequestToolMessageContent = string | Array<ChatCompletionRequestToolMessageContentPart>;
373
+
374
+ export type ChatCompletionRequestToolMessageContentPart = ChatCompletionRequestMessageContentPartText & {
375
+ type: 'text';
376
+ };
377
+
378
+ export type ChatCompletionRequestUserMessage = {
379
+ /**
380
+ * The contents of the user message.
381
+ */
382
+ content: ChatCompletionRequestUserMessageContent;
383
+ /**
384
+ * An optional name for the participant. Provides the model information to differentiate between participants of the same role.
385
+ */
386
+ name?: string | null;
387
+ };
388
+
389
+ export type ChatCompletionRequestUserMessageContent = string | Array<ChatCompletionRequestUserMessageContentPart>;
390
+
391
+ export type ChatCompletionRequestUserMessageContentPart = (ChatCompletionRequestMessageContentPartText & {
392
+ type: 'text';
393
+ }) | (ChatCompletionRequestMessageContentPartImage & {
394
+ type: 'image_url';
395
+ }) | (ChatCompletionRequestMessageContentPartAudio & {
396
+ type: 'input_audio';
397
+ });
398
+
399
+ /**
400
+ * A chat completion message generated by the model.
401
+ */
402
+ export type ChatCompletionResponseMessage = {
403
+ /**
404
+ * The contents of the message.
405
+ */
406
+ content?: string | null;
407
+ /**
408
+ * The refusal message generated by the model.
409
+ */
410
+ refusal?: string | null;
411
+ /**
412
+ * The tool calls generated by the model, such as function calls.
413
+ */
414
+ tool_calls?: Array<ChatCompletionMessageToolCall> | null;
415
+ /**
416
+ * The role of the author of this message.
417
+ */
418
+ role: Role;
419
+ function_call?: null | FunctionCall;
420
+ audio?: null | ChatCompletionResponseMessageAudio;
421
+ };
422
+
423
+ export type ChatCompletionResponseMessageAudio = {
424
+ /**
425
+ * Unique identifier for this audio response.
426
+ */
427
+ id: string;
428
+ /**
429
+ * The Unix timestamp (in seconds) for when this audio response will no longer be accessible on the server for use in multi-turn conversations.
430
+ */
431
+ expires_at: number;
432
+ /**
433
+ * Base64 encoded audio bytes generated by the model, in the format specified in the request.
434
+ */
435
+ data: string;
436
+ /**
437
+ * Transcript of the audio generated by the model.
438
+ */
439
+ transcript: string;
440
+ };
441
+
442
+ /**
443
+ * Options for streaming response. Only set this when you set `stream: true`.
444
+ */
445
+ export type ChatCompletionStreamOptions = {
446
+ /**
447
+ * 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.
448
+ */
449
+ include_usage: boolean;
450
+ };
451
+
452
+ /**
453
+ * A chat completion delta generated by streamed model responses.
454
+ */
455
+ export type ChatCompletionStreamResponseDelta = {
456
+ /**
457
+ * The contents of the chunk message.
458
+ */
459
+ content?: string | null;
460
+ function_call?: null | FunctionCallStream;
461
+ tool_calls?: Array<ChatCompletionMessageToolCallChunk> | null;
462
+ role?: null | Role;
463
+ /**
464
+ * The refusal message generated by the model.
465
+ */
466
+ refusal?: string | null;
467
+ };
468
+
469
+ export type ChatCompletionTokenLogprob = {
470
+ /**
471
+ * The token.
472
+ */
473
+ token: string;
474
+ /**
475
+ * 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.
476
+ */
477
+ logprob: number;
478
+ /**
479
+ * 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.
480
+ */
481
+ bytes?: Array<number> | null;
482
+ /**
483
+ * 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.
484
+ */
485
+ top_logprobs: Array<TopLogprobs>;
486
+ };
487
+
488
+ export type ChatCompletionTool = {
489
+ type: ChatCompletionToolType;
490
+ function: FunctionObject;
491
+ };
492
+
493
+ /**
494
+ * Controls which (if any) tool is called by the model.
495
+ * `none` means the model will not call any tool and instead generates a message.
496
+ * `auto` means the model can pick between generating a message or calling one or more tools.
497
+ * `required` means the model must call one or more tools.
498
+ * Specifying a particular tool via `{"type": "function", "function": {"name": "my_function"}}` forces the model to call that tool.
499
+ *
500
+ * `none` is the default when no tools are present. `auto` is the default if tools are present.
501
+ */
502
+ export type ChatCompletionToolChoiceOption = 'none' | 'auto' | 'required' | {
503
+ named: ChatCompletionNamedToolChoice;
504
+ };
505
+
506
+ export type ChatCompletionToolType = 'function';
507
+
508
+ export type ChatRequest = {
509
+ model: string;
510
+ messages: Array<Message>;
511
+ stream?: boolean | null;
512
+ format?: string | null;
513
+ keep_alive?: null | Duration;
514
+ options?: null | Options;
515
+ };
516
+
517
+ /**
518
+ * Breakdown of tokens used in a completion.
519
+ */
520
+ export type CompletionTokensDetails = {
521
+ accepted_prediction_tokens?: number | null;
522
+ /**
523
+ * Audio input tokens generated by the model.
524
+ */
525
+ audio_tokens?: number | null;
526
+ /**
527
+ * Tokens generated by the model for reasoning.
528
+ */
529
+ reasoning_tokens?: number | null;
530
+ /**
531
+ * When using Predicted Outputs, the number of tokens in the
532
+ * prediction that did not appear in the completion. However, like
533
+ * reasoning tokens, these tokens are still counted in the total
534
+ * completion tokens for purposes of billing, output, and context
535
+ * window limits.
536
+ */
537
+ rejected_prediction_tokens?: number | null;
538
+ };
539
+
540
+ /**
541
+ * Usage statistics for the completion request.
542
+ */
543
+ export type CompletionUsage = {
544
+ /**
545
+ * Number of tokens in the prompt.
546
+ */
547
+ prompt_tokens: number;
548
+ /**
549
+ * Number of tokens in the generated completion.
550
+ */
551
+ completion_tokens: number;
552
+ /**
553
+ * Total number of tokens used in the request (prompt + completion).
554
+ */
555
+ total_tokens: number;
556
+ prompt_tokens_details?: null | PromptTokensDetails;
557
+ completion_tokens_details?: null | CompletionTokensDetails;
558
+ };
559
+
560
+ export type CreateAliasRequest = {
561
+ alias: string;
562
+ repo: string;
563
+ filename: string;
564
+ snapshot?: string | null;
565
+ request_params?: null | OaiRequestParams;
566
+ context_params?: Array<string> | null;
567
+ };
568
+
569
+ /**
570
+ * Request to create a new API model configuration
571
+ */
572
+ export type CreateApiModelRequest = {
573
+ /**
574
+ * API format/protocol (e.g., "openai")
575
+ */
576
+ api_format: ApiFormat;
577
+ /**
578
+ * API base URL
579
+ */
580
+ base_url: string;
581
+ /**
582
+ * API key for authentication
583
+ */
584
+ api_key: string;
585
+ /**
586
+ * List of available models
587
+ */
588
+ models: Array<string>;
589
+ /**
590
+ * Optional prefix for model namespacing (e.g., "azure/" for "azure/gpt-4", "openai:" for "openai:gpt-4")
591
+ */
592
+ prefix?: string | null;
593
+ };
594
+
595
+ /**
596
+ * Request to create a new API token
597
+ */
598
+ export type CreateApiTokenRequest = {
599
+ /**
600
+ * Descriptive name for the API token (minimum 3 characters)
601
+ */
602
+ name?: string | null;
603
+ /**
604
+ * Token scope defining access level
605
+ */
606
+ scope: TokenScope;
607
+ };
608
+
609
+ export type CreateChatCompletionRequest = {
610
+ /**
611
+ * 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).
612
+ */
613
+ messages: Array<ChatCompletionRequestMessage>;
614
+ /**
615
+ * ID of the model to use.
616
+ * 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.
617
+ */
618
+ model: string;
619
+ /**
620
+ * Whether or not to store the output of this chat completion request
621
+ *
622
+ * for use in our [model distillation](https://platform.openai.com/docs/guides/distillation) or [evals](https://platform.openai.com/docs/guides/evals) products.
623
+ */
624
+ store?: boolean | null;
625
+ reasoning_effort?: null | ReasoningEffort;
626
+ /**
627
+ * Developer-defined tags and values used for filtering completions in the [dashboard](https://platform.openai.com/chat-completions).
628
+ */
629
+ metadata?: unknown;
630
+ /**
631
+ * 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.
632
+ */
633
+ frequency_penalty?: number | null;
634
+ /**
635
+ * Modify the likelihood of specified tokens appearing in the completion.
636
+ *
637
+ * Accepts a json object that maps tokens (specified by their token ID in the tokenizer) to an associated bias value from -100 to 100.
638
+ * Mathematically, the bias is added to the logits generated by the model prior to sampling.
639
+ * The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection;
640
+ * values like -100 or 100 should result in a ban or exclusive selection of the relevant token.
641
+ */
642
+ logit_bias?: {} | null;
643
+ /**
644
+ * 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`.
645
+ */
646
+ logprobs?: boolean | null;
647
+ /**
648
+ * 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.
649
+ */
650
+ top_logprobs?: number | null;
651
+ /**
652
+ * The maximum number of [tokens](https://platform.openai.com/tokenizer) that can be generated in the chat completion.
653
+ *
654
+ * This value can be used to control [costs](https://openai.com/api/pricing/) for text generated via API.
655
+ * This value is now deprecated in favor of `max_completion_tokens`, and is
656
+ * not compatible with [o1 series models](https://platform.openai.com/docs/guides/reasoning).
657
+ * @deprecated
658
+ */
659
+ max_tokens?: number | null;
660
+ /**
661
+ * 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).
662
+ */
663
+ max_completion_tokens?: number | null;
664
+ /**
665
+ * 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.
666
+ */
667
+ n?: number | null;
668
+ modalities?: Array<ChatCompletionModalities> | null;
669
+ prediction?: null | PredictionContent;
670
+ audio?: null | ChatCompletionAudio;
671
+ /**
672
+ * 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.
673
+ */
674
+ presence_penalty?: number | null;
675
+ response_format?: null | ResponseFormat;
676
+ /**
677
+ * This feature is in Beta.
678
+ * If specified, our system will make a best effort to sample deterministically, such that repeated requests
679
+ * with the same `seed` and parameters should return the same result.
680
+ * Determinism is not guaranteed, and you should refer to the `system_fingerprint` response parameter to monitor changes in the backend.
681
+ */
682
+ seed?: number | null;
683
+ service_tier?: null | ServiceTier;
684
+ stop?: null | Stop;
685
+ /**
686
+ * If set, partial message deltas will be sent, like in ChatGPT.
687
+ * 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)
688
+ * 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).
689
+ */
690
+ stream?: boolean | null;
691
+ stream_options?: null | ChatCompletionStreamOptions;
692
+ /**
693
+ * What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random,
694
+ * while lower values like 0.2 will make it more focused and deterministic.
695
+ *
696
+ * We generally recommend altering this or `top_p` but not both.
697
+ */
698
+ temperature?: number | null;
699
+ /**
700
+ * An alternative to sampling with temperature, called nucleus sampling,
701
+ * where the model considers the results of the tokens with top_p probability mass.
702
+ * So 0.1 means only the tokens comprising the top 10% probability mass are considered.
703
+ *
704
+ * We generally recommend altering this or `temperature` but not both.
83
705
  */
84
- status: AppStatus;
706
+ top_p?: number | null;
85
707
  /**
86
- * Application version number (semantic versioning)
708
+ * A list of tools the model may call. Currently, only functions are supported as a tool.
709
+ * Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported.
87
710
  */
88
- version: string;
711
+ tools?: Array<ChatCompletionTool> | null;
712
+ tool_choice?: null | ChatCompletionToolChoiceOption;
713
+ /**
714
+ * Whether to enable [parallel function calling](https://platform.openai.com/docs/guides/function-calling/parallel-function-calling) during tool use.
715
+ */
716
+ parallel_tool_calls?: boolean | null;
717
+ /**
718
+ * 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).
719
+ */
720
+ user?: string | null;
721
+ web_search_options?: null | WebSearchOptions;
722
+ function_call?: null | ChatCompletionFunctionCall;
723
+ /**
724
+ * Deprecated in favor of `tools`.
725
+ *
726
+ * A list of functions the model may generate JSON inputs for.
727
+ * @deprecated
728
+ */
729
+ functions?: Array<ChatCompletionFunctions> | null;
89
730
  };
90
731
 
91
- export type AppRole = Role | TokenScope | UserScope;
92
-
93
- export type AppStatus = 'setup' | 'ready' | 'resource-admin';
94
-
95
732
  /**
96
- * Request body for approving access with role assignment
733
+ * Represents a chat completion response returned by model, based on the provided input.
97
734
  */
98
- export type ApproveUserAccessRequest = {
735
+ export type CreateChatCompletionResponse = {
99
736
  /**
100
- * Role to assign to the user
737
+ * A unique identifier for the chat completion.
101
738
  */
102
- role: Role;
103
- };
104
-
105
- export type AuthCallbackRequest = {
739
+ id: string;
106
740
  /**
107
- * OAuth authorization code from successful authentication (required for success flow)
741
+ * A list of chat completion choices. Can be more than one if `n` is greater than 1.
108
742
  */
109
- code?: string | null;
743
+ choices: Array<ChatChoice>;
110
744
  /**
111
- * OAuth error code if authentication failed (e.g., "access_denied")
745
+ * The Unix timestamp (in seconds) of when the chat completion was created.
112
746
  */
113
- error?: string | null;
747
+ created: number;
114
748
  /**
115
- * Human-readable OAuth error description if authentication failed
749
+ * The model used for the chat completion.
116
750
  */
117
- error_description?: string | null;
751
+ model: string;
752
+ service_tier?: null | ServiceTierResponse;
118
753
  /**
119
- * OAuth state parameter for CSRF protection (must match initiated request)
754
+ * This fingerprint represents the backend configuration that the model runs with.
755
+ *
756
+ * Can be used in conjunction with the `seed` request parameter to understand when backend changes have been made that might impact determinism.
120
757
  */
121
- state?: string | null;
122
- [key: string]: string | (string | null) | (string | null) | (string | null) | (string | null) | undefined;
758
+ system_fingerprint?: string | null;
759
+ /**
760
+ * The object type, which is always `chat.completion`.
761
+ */
762
+ object: string;
763
+ usage?: null | CompletionUsage;
123
764
  };
124
765
 
125
766
  /**
126
- * Change user role request
767
+ * Represents a streamed chunk of a chat completion response returned by model, based on the provided input.
127
768
  */
128
- export type ChangeRoleRequest = {
769
+ export type CreateChatCompletionStreamResponse = {
129
770
  /**
130
- * Role to assign to the user
771
+ * A unique identifier for the chat completion. Each chunk has the same ID.
772
+ */
773
+ id: string;
774
+ /**
775
+ * 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}`.
776
+ */
777
+ choices: Array<ChatChoiceStream>;
778
+ /**
779
+ * The Unix timestamp (in seconds) of when the chat completion was created. Each chunk has the same timestamp.
780
+ */
781
+ created: number;
782
+ /**
783
+ * The model to generate the completion.
131
784
  */
132
- role: string;
133
- };
134
-
135
- export type ChatRequest = {
136
- format?: string | null;
137
- keep_alive?: null | Duration;
138
- messages: Array<Message>;
139
785
  model: string;
140
- options?: null | Options;
141
- stream?: boolean | null;
142
- };
143
-
144
- export type CreateAliasRequest = {
145
- alias: string;
146
- context_params?: Array<string> | null;
147
- filename: string;
148
- repo: string;
149
- request_params?: null | OaiRequestParams;
150
- snapshot?: string | null;
151
- };
152
-
153
- /**
154
- * Request to create a new API model configuration
155
- */
156
- export type CreateApiModelRequest = {
786
+ service_tier?: null | ServiceTierResponse;
157
787
  /**
158
- * API format/protocol (e.g., "openai")
788
+ * This fingerprint represents the backend configuration that the model runs with.
789
+ * Can be used in conjunction with the `seed` request parameter to understand when backend changes have been made that might impact determinism.
159
790
  */
160
- api_format: ApiFormat;
791
+ system_fingerprint?: string | null;
161
792
  /**
162
- * API key for authentication
793
+ * The object type, which is always `chat.completion.chunk`.
163
794
  */
164
- api_key: string;
795
+ object: string;
796
+ usage?: null | CompletionUsage;
797
+ };
798
+
799
+ export type CreateEmbeddingRequest = {
165
800
  /**
166
- * API base URL
801
+ * ID of the model to use. You can use the
802
+ * [List models](https://platform.openai.com/docs/api-reference/models/list)
803
+ * API to see all of your available models, or see our
804
+ * [Model overview](https://platform.openai.com/docs/models/overview)
805
+ * for descriptions of them.
167
806
  */
168
- base_url: string;
807
+ model: string;
169
808
  /**
170
- * List of available models
809
+ * 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.
171
810
  */
172
- models: Array<string>;
811
+ input: EmbeddingInput;
812
+ encoding_format?: null | EncodingFormat;
173
813
  /**
174
- * Optional prefix for model namespacing (e.g., "azure/" for "azure/gpt-4", "openai:" for "openai:gpt-4")
814
+ * A unique identifier representing your end-user, which will help OpenAI
815
+ * to monitor and detect abuse. [Learn more](https://platform.openai.com/docs/usage-policies/end-user-ids).
175
816
  */
176
- prefix?: string | null;
817
+ user?: string | null;
818
+ /**
819
+ * The number of dimensions the resulting output embeddings should have. Only supported in `text-embedding-3` and later models.
820
+ */
821
+ dimensions?: number | null;
177
822
  };
178
823
 
179
- /**
180
- * Request to create a new API token
181
- */
182
- export type CreateApiTokenRequest = {
824
+ export type CreateEmbeddingResponse = {
825
+ object: string;
183
826
  /**
184
- * Descriptive name for the API token (minimum 3 characters)
827
+ * The name of the model used to generate the embedding.
185
828
  */
186
- name?: string | null;
829
+ model: string;
830
+ /**
831
+ * The list of embeddings generated by the model.
832
+ */
833
+ data: Array<Embedding>;
834
+ /**
835
+ * The usage information for the request.
836
+ */
837
+ usage: EmbeddingUsage;
187
838
  };
188
839
 
189
840
  export type DownloadRequest = {
190
- created_at: string;
191
- downloaded_bytes?: number;
192
- error?: string | null;
193
- filename: string;
194
841
  id: string;
195
842
  repo: string;
196
- started_at: string;
843
+ filename: string;
197
844
  status: DownloadStatus;
198
- total_bytes?: number | null;
845
+ error?: string | null;
846
+ created_at: string;
199
847
  updated_at: string;
848
+ total_bytes?: number | null;
849
+ downloaded_bytes?: number;
850
+ started_at: string;
200
851
  };
201
852
 
202
853
  export type DownloadStatus = 'pending' | 'completed' | 'error';
203
854
 
204
855
  export type Duration = string;
205
856
 
206
- export type EmptyResponse = {
207
- [key: string]: unknown;
857
+ /**
858
+ * Represents an embedding vector returned by embedding endpoint.
859
+ */
860
+ export type Embedding = {
861
+ /**
862
+ * The index of the embedding in the list of embeddings.
863
+ */
864
+ index: number;
865
+ /**
866
+ * The object type, which is always "embedding".
867
+ */
868
+ object: string;
869
+ /**
870
+ * The embedding vector, which is a list of floats. The length of vector
871
+ * depends on the model as listed in the [embedding guide](https://platform.openai.com/docs/guides/embeddings).
872
+ */
873
+ embedding: Array<number>;
208
874
  };
209
875
 
210
- export type ErrorBody = {
876
+ export type EmbeddingInput = string | Array<string> | Array<number> | Array<Array<number>>;
877
+
878
+ export type EmbeddingUsage = {
211
879
  /**
212
- * Specific error code for programmatic error handling
880
+ * The number of tokens used by the prompt.
213
881
  */
214
- code?: string | null;
882
+ prompt_tokens: number;
215
883
  /**
216
- * Human-readable error message describing what went wrong
884
+ * The total number of tokens used by the request.
217
885
  */
218
- message: string;
886
+ total_tokens: number;
887
+ };
888
+
889
+ export type EncodingFormat = 'float' | 'base64';
890
+
891
+ export type ErrorBody = {
219
892
  /**
220
- * Parameter name that caused the error (for validation errors)
893
+ * Human-readable error message describing what went wrong
221
894
  */
222
- param?: string | null;
895
+ message: string;
223
896
  /**
224
897
  * Error type categorizing the kind of error that occurred
225
898
  */
226
899
  type: string;
900
+ /**
901
+ * Specific error code for programmatic error handling
902
+ */
903
+ code?: string | null;
904
+ /**
905
+ * Parameter name that caused the error (for validation errors)
906
+ */
907
+ param?: string | null;
227
908
  };
228
909
 
229
910
  /**
@@ -234,14 +915,14 @@ export type FetchModelsRequest = {
234
915
  * API key for authentication (provide either api_key OR id, api_key takes preference if both provided)
235
916
  */
236
917
  api_key?: string;
237
- /**
238
- * API base URL (optional when using id)
239
- */
240
- base_url: string;
241
918
  /**
242
919
  * API model ID to look up stored credentials (provide either api_key OR id, api_key takes preference if both provided)
243
920
  */
244
921
  id?: string;
922
+ /**
923
+ * API base URL (optional when using id)
924
+ */
925
+ base_url: string;
245
926
  };
246
927
 
247
928
  /**
@@ -251,12 +932,90 @@ export type FetchModelsResponse = {
251
932
  models: Array<string>;
252
933
  };
253
934
 
935
+ export type FinishReason = 'stop' | 'length' | 'tool_calls' | 'content_filter' | 'function_call';
936
+
937
+ /**
938
+ * The name and arguments of a function that should be called, as generated by the model.
939
+ */
940
+ export type FunctionCall = {
941
+ /**
942
+ * The name of the function to call.
943
+ */
944
+ name: string;
945
+ /**
946
+ * 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.
947
+ */
948
+ arguments: string;
949
+ };
950
+
951
+ export type FunctionCallStream = {
952
+ /**
953
+ * The name of the function to call.
954
+ */
955
+ name?: string | null;
956
+ /**
957
+ * The arguments to call the function with, as generated by the model in JSON format.
958
+ * Note that the model does not always generate valid JSON, and may hallucinate
959
+ * parameters not defined by your function schema. Validate the arguments in your
960
+ * code before calling your function.
961
+ */
962
+ arguments?: string | null;
963
+ };
964
+
965
+ export type FunctionName = {
966
+ /**
967
+ * The name of the function to call.
968
+ */
969
+ name: string;
970
+ };
971
+
972
+ export type FunctionObject = {
973
+ /**
974
+ * 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.
975
+ */
976
+ name: string;
977
+ /**
978
+ * A description of what the function does, used by the model to choose when and how to call the function.
979
+ */
980
+ description?: string | null;
981
+ /**
982
+ * 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.
983
+ *
984
+ * Omitting `parameters` defines a function with an empty parameter list.
985
+ */
986
+ parameters?: unknown;
987
+ /**
988
+ * 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).
989
+ */
990
+ strict?: boolean | null;
991
+ };
992
+
993
+ export type ImageDetail = 'auto' | 'low' | 'high';
994
+
995
+ export type ImageUrl = {
996
+ /**
997
+ * Either a URL of the image or the base64 encoded image data.
998
+ */
999
+ url: string;
1000
+ detail?: null | ImageDetail;
1001
+ };
1002
+
1003
+ export type InputAudio = {
1004
+ /**
1005
+ * Base64 encoded audio data.
1006
+ */
1007
+ data: string;
1008
+ /**
1009
+ * The format of the encoded audio data. Currently supports "wav" and "mp3".
1010
+ */
1011
+ format: InputAudioFormat;
1012
+ };
1013
+
1014
+ export type InputAudioFormat = 'wav' | 'mp3';
1015
+
254
1016
  export type ListModelResponse = {
1017
+ object: string;
255
1018
  data: Array<{
256
- /**
257
- * The Unix timestamp (in seconds) when the model was created.
258
- */
259
- created: number;
260
1019
  /**
261
1020
  * The model identifier, which can be referenced in the API endpoints.
262
1021
  */
@@ -265,12 +1024,15 @@ export type ListModelResponse = {
265
1024
  * The object type, which is always "model".
266
1025
  */
267
1026
  object: string;
1027
+ /**
1028
+ * The Unix timestamp (in seconds) when the model was created.
1029
+ */
1030
+ created: number;
268
1031
  /**
269
1032
  * The organization that owns the model.
270
1033
  */
271
1034
  owned_by: string;
272
1035
  }>;
273
- object: string;
274
1036
  };
275
1037
 
276
1038
  /**
@@ -282,40 +1044,40 @@ export type ListUsersParams = {
282
1044
  };
283
1045
 
284
1046
  export type LocalModelResponse = {
285
- filename: string;
286
- model_params: {};
287
1047
  repo: string;
288
- size?: number | null;
1048
+ filename: string;
289
1049
  snapshot: string;
1050
+ size?: number | null;
1051
+ model_params: {};
290
1052
  };
291
1053
 
292
1054
  export type Message = {
1055
+ role: string;
293
1056
  content: string;
294
1057
  images?: Array<string> | null;
295
- role: string;
296
1058
  };
297
1059
 
298
1060
  export type Model = {
299
- details: ModelDetails;
300
- digest: string;
301
1061
  model: string;
302
1062
  modified_at: number;
303
1063
  size: number;
1064
+ digest: string;
1065
+ details: ModelDetails;
304
1066
  };
305
1067
 
306
1068
  export type ModelAlias = {
307
1069
  alias: string;
308
- filename: string;
309
1070
  repo: string;
1071
+ filename: string;
310
1072
  snapshot: string;
311
1073
  };
312
1074
 
313
1075
  export type ModelDetails = {
314
- families?: Array<string> | null;
315
- family: string;
1076
+ parent_model?: string | null;
316
1077
  format: string;
1078
+ family: string;
1079
+ families?: Array<string> | null;
317
1080
  parameter_size: string;
318
- parent_model?: string | null;
319
1081
  quantization_level: string;
320
1082
  };
321
1083
 
@@ -323,10 +1085,6 @@ export type ModelDetails = {
323
1085
  * Describes an OpenAI model offering that can be used with the API.
324
1086
  */
325
1087
  export type ModelResponse = {
326
- /**
327
- * The Unix timestamp (in seconds) when the model was created.
328
- */
329
- created: number;
330
1088
  /**
331
1089
  * The model identifier, which can be referenced in the API endpoints.
332
1090
  */
@@ -335,6 +1093,10 @@ export type ModelResponse = {
335
1093
  * The object type, which is always "model".
336
1094
  */
337
1095
  object: string;
1096
+ /**
1097
+ * The Unix timestamp (in seconds) when the model was created.
1098
+ */
1099
+ created: number;
338
1100
  /**
339
1101
  * The organization that owns the model.
340
1102
  */
@@ -349,14 +1111,14 @@ export type ModelsResponse = {
349
1111
  * Request to pull a model file from HuggingFace
350
1112
  */
351
1113
  export type NewDownloadRequest = {
352
- /**
353
- * Model file name to download (typically .gguf format)
354
- */
355
- filename: string;
356
1114
  /**
357
1115
  * HuggingFace repository name in format 'username/repository-name'
358
1116
  */
359
1117
  repo: string;
1118
+ /**
1119
+ * Model file name to download (typically .gguf format)
1120
+ */
1121
+ filename: string;
360
1122
  };
361
1123
 
362
1124
  export type OaiRequestParams = {
@@ -382,42 +1144,42 @@ export type OpenAiApiError = {
382
1144
  };
383
1145
 
384
1146
  export type Options = {
385
- f16_kv?: boolean | null;
1147
+ num_keep?: number | null;
1148
+ seed?: number | null;
1149
+ num_predict?: number | null;
1150
+ top_k?: number | null;
1151
+ top_p?: number | null;
1152
+ tfs_z?: number | null;
1153
+ typical_p?: number | null;
1154
+ repeat_last_n?: number | null;
1155
+ temperature?: number | null;
1156
+ repeat_penalty?: number | null;
1157
+ presence_penalty?: number | null;
386
1158
  frequency_penalty?: number | null;
387
- logits_all?: boolean | null;
388
- low_vram?: boolean | null;
389
- main_gpu?: number | null;
390
1159
  mirostat?: number | null;
391
- mirostat_eta?: number | null;
392
1160
  mirostat_tau?: number | null;
393
- num_batch?: number | null;
394
- num_ctx?: number | null;
395
- num_gpu?: number | null;
396
- num_keep?: number | null;
397
- num_predict?: number | null;
398
- num_thread?: number | null;
399
- numa?: boolean | null;
1161
+ mirostat_eta?: number | null;
400
1162
  penalize_newline?: boolean | null;
401
- presence_penalty?: number | null;
402
- repeat_last_n?: number | null;
403
- repeat_penalty?: number | null;
404
- seed?: number | null;
405
1163
  stop?: Array<string> | null;
406
- temperature?: number | null;
407
- tfs_z?: number | null;
408
- top_k?: number | null;
409
- top_p?: number | null;
410
- typical_p?: number | null;
411
- use_mlock?: boolean | null;
412
- use_mmap?: boolean | null;
1164
+ numa?: boolean | null;
1165
+ num_ctx?: number | null;
1166
+ num_batch?: number | null;
1167
+ num_gpu?: number | null;
1168
+ main_gpu?: number | null;
1169
+ low_vram?: boolean | null;
1170
+ f16_kv?: boolean | null;
1171
+ logits_all?: boolean | null;
413
1172
  vocab_only?: boolean | null;
1173
+ use_mmap?: boolean | null;
1174
+ use_mlock?: boolean | null;
1175
+ num_thread?: number | null;
414
1176
  };
415
1177
 
416
1178
  export type PaginatedAliasResponse = {
417
1179
  data: Array<Alias>;
1180
+ total: number;
418
1181
  page: number;
419
1182
  page_size: number;
420
- total: number;
421
1183
  };
422
1184
 
423
1185
  /**
@@ -425,44 +1187,36 @@ export type PaginatedAliasResponse = {
425
1187
  */
426
1188
  export type PaginatedApiModelResponse = {
427
1189
  data: Array<ApiModelResponse>;
1190
+ total: number;
428
1191
  page: number;
429
1192
  page_size: number;
430
- total: number;
431
1193
  };
432
1194
 
433
1195
  export type PaginatedApiTokenResponse = {
434
1196
  data: Array<ApiToken>;
1197
+ total: number;
435
1198
  page: number;
436
1199
  page_size: number;
437
- total: number;
438
1200
  };
439
1201
 
440
1202
  export type PaginatedDownloadResponse = {
441
1203
  data: Array<DownloadRequest>;
1204
+ total: number;
442
1205
  page: number;
443
1206
  page_size: number;
444
- total: number;
445
1207
  };
446
1208
 
447
1209
  export type PaginatedLocalModelResponse = {
448
1210
  data: Array<LocalModelResponse>;
1211
+ total: number;
449
1212
  page: number;
450
1213
  page_size: number;
451
- total: number;
452
1214
  };
453
1215
 
454
1216
  /**
455
1217
  * Paginated response for access requests
456
1218
  */
457
1219
  export type PaginatedUserAccessResponse = {
458
- /**
459
- * Current page number
460
- */
461
- page: number;
462
- /**
463
- * Number of items per page
464
- */
465
- page_size: number;
466
1220
  /**
467
1221
  * List of access requests
468
1222
  */
@@ -471,13 +1225,21 @@ export type PaginatedUserAccessResponse = {
471
1225
  * Total number of requests
472
1226
  */
473
1227
  total: number;
1228
+ /**
1229
+ * Current page number
1230
+ */
1231
+ page: number;
1232
+ /**
1233
+ * Number of items per page
1234
+ */
1235
+ page_size: number;
474
1236
  };
475
1237
 
476
1238
  export type PaginatedUserAliasResponse = {
477
1239
  data: Array<UserAliasResponse>;
1240
+ total: number;
478
1241
  page: number;
479
1242
  page_size: number;
480
- total: number;
481
1243
  };
482
1244
 
483
1245
  /**
@@ -512,6 +1274,40 @@ export type PingResponse = {
512
1274
  message: string;
513
1275
  };
514
1276
 
1277
+ /**
1278
+ * The type of the predicted content you want to provide. This type is
1279
+ * currently always `content`.
1280
+ */
1281
+ export type PredictionContent = {
1282
+ /**
1283
+ * The type of the predicted content you want to provide. This type is
1284
+ * currently always `content`.
1285
+ */
1286
+ content: PredictionContentContent;
1287
+ type: 'content';
1288
+ };
1289
+
1290
+ /**
1291
+ * 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.
1292
+ */
1293
+ export type PredictionContentContent = string | Array<ChatCompletionRequestMessageContentPartText>;
1294
+
1295
+ /**
1296
+ * Breakdown of tokens used in a completion.
1297
+ */
1298
+ export type PromptTokensDetails = {
1299
+ /**
1300
+ * Audio input tokens present in the prompt.
1301
+ */
1302
+ audio_tokens?: number | null;
1303
+ /**
1304
+ * Cached tokens present in the prompt.
1305
+ */
1306
+ cached_tokens?: number | null;
1307
+ };
1308
+
1309
+ export type ReasoningEffort = 'minimal' | 'low' | 'medium' | 'high';
1310
+
515
1311
  export type RedirectResponse = {
516
1312
  /**
517
1313
  * The URL to redirect to (OAuth authorization URL or application home page)
@@ -519,21 +1315,55 @@ export type RedirectResponse = {
519
1315
  location: string;
520
1316
  };
521
1317
 
522
- export type Role = 'resource_user' | 'resource_power_user' | 'resource_manager' | 'resource_admin';
1318
+ export type ResourceRole = 'resource_user' | 'resource_power_user' | 'resource_manager' | 'resource_admin';
1319
+
1320
+ export type ResponseFormat = {
1321
+ type: 'text';
1322
+ } | {
1323
+ type: 'json_object';
1324
+ } | {
1325
+ json_schema: ResponseFormatJsonSchema;
1326
+ type: 'json_schema';
1327
+ };
1328
+
1329
+ export type ResponseFormatJsonSchema = {
1330
+ /**
1331
+ * A description of what the response format is for, used by the model to determine how to respond in the format.
1332
+ */
1333
+ description?: string | null;
1334
+ /**
1335
+ * 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.
1336
+ */
1337
+ name: string;
1338
+ /**
1339
+ * The schema for the response format, described as a JSON Schema object.
1340
+ */
1341
+ schema?: unknown;
1342
+ /**
1343
+ * 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).
1344
+ */
1345
+ strict?: boolean | null;
1346
+ };
1347
+
1348
+ export type Role = 'system' | 'user' | 'assistant' | 'tool' | 'function';
1349
+
1350
+ export type ServiceTier = 'auto' | 'default' | 'flex' | 'scale' | 'priority';
1351
+
1352
+ export type ServiceTierResponse = 'scale' | 'default' | 'flex' | 'priority';
523
1353
 
524
1354
  export type SettingInfo = {
1355
+ key: string;
525
1356
  current_value: unknown;
526
1357
  default_value: unknown;
527
- key: string;
528
- metadata: SettingMetadata;
529
1358
  source: SettingSource;
1359
+ metadata: SettingMetadata;
530
1360
  };
531
1361
 
532
1362
  export type SettingMetadata = {
533
1363
  type: 'string';
534
1364
  } | {
535
- max: number;
536
1365
  min: number;
1366
+ max: number;
537
1367
  type: 'number';
538
1368
  } | {
539
1369
  type: 'boolean';
@@ -548,14 +1378,14 @@ export type SettingSource = 'system' | 'command_line' | 'environment' | 'setting
548
1378
  * Request to setup the application in authenticated mode
549
1379
  */
550
1380
  export type SetupRequest = {
551
- /**
552
- * Optional description of the server's purpose
553
- */
554
- description?: string | null;
555
1381
  /**
556
1382
  * Server name for identification (minimum 10 characters)
557
1383
  */
558
1384
  name: string;
1385
+ /**
1386
+ * Optional description of the server's purpose
1387
+ */
1388
+ description?: string | null;
559
1389
  };
560
1390
 
561
1391
  /**
@@ -582,6 +1412,8 @@ export type ShowResponse = {
582
1412
  template: string;
583
1413
  };
584
1414
 
1415
+ export type Stop = string | Array<string>;
1416
+
585
1417
  /**
586
1418
  * Request to test API connectivity with a prompt
587
1419
  */
@@ -590,14 +1422,14 @@ export type TestPromptRequest = {
590
1422
  * API key for authentication (provide either api_key OR id, api_key takes preference if both provided)
591
1423
  */
592
1424
  api_key?: string;
593
- /**
594
- * API base URL (optional when using id)
595
- */
596
- base_url: string;
597
1425
  /**
598
1426
  * API model ID to look up stored credentials (provide either api_key OR id, api_key takes preference if both provided)
599
1427
  */
600
1428
  id?: string;
1429
+ /**
1430
+ * API base URL (optional when using id)
1431
+ */
1432
+ base_url: string;
601
1433
  /**
602
1434
  * Model to use for testing
603
1435
  */
@@ -612,21 +1444,43 @@ export type TestPromptRequest = {
612
1444
  * Response from testing API connectivity
613
1445
  */
614
1446
  export type TestPromptResponse = {
615
- error?: string | null;
616
- response?: string | null;
617
1447
  success: boolean;
1448
+ response?: string | null;
1449
+ error?: string | null;
1450
+ };
1451
+
1452
+ /**
1453
+ * API Token information response
1454
+ */
1455
+ export type TokenInfo = {
1456
+ role: TokenScope;
618
1457
  };
619
1458
 
620
1459
  export type TokenScope = 'scope_token_user' | 'scope_token_power_user' | 'scope_token_manager' | 'scope_token_admin';
621
1460
 
622
1461
  export type TokenStatus = 'active' | 'inactive';
623
1462
 
1463
+ export type TopLogprobs = {
1464
+ /**
1465
+ * The token.
1466
+ */
1467
+ token: string;
1468
+ /**
1469
+ * The log probability of this token.
1470
+ */
1471
+ logprob: number;
1472
+ /**
1473
+ * 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.
1474
+ */
1475
+ bytes?: Array<number> | null;
1476
+ };
1477
+
624
1478
  export type UpdateAliasRequest = {
625
- context_params?: Array<string> | null;
626
- filename: string;
627
1479
  repo: string;
628
- request_params?: null | OaiRequestParams;
1480
+ filename: string;
629
1481
  snapshot?: string | null;
1482
+ request_params?: null | OaiRequestParams;
1483
+ context_params?: Array<string> | null;
630
1484
  };
631
1485
 
632
1486
  /**
@@ -637,14 +1491,14 @@ export type UpdateApiModelRequest = {
637
1491
  * API format/protocol (required)
638
1492
  */
639
1493
  api_format: ApiFormat;
640
- /**
641
- * API key for authentication (optional, only update if provided for security)
642
- */
643
- api_key?: string | null;
644
1494
  /**
645
1495
  * API base URL (required)
646
1496
  */
647
1497
  base_url: string;
1498
+ /**
1499
+ * API key for authentication (optional, only update if provided for security)
1500
+ */
1501
+ api_key?: string | null;
648
1502
  /**
649
1503
  * List of available models (required)
650
1504
  */
@@ -680,31 +1534,31 @@ export type UpdateSettingRequest = {
680
1534
  };
681
1535
 
682
1536
  export type UserAccessRequest = {
683
- /**
684
- * Creation timestamp
685
- */
686
- created_at: string;
687
1537
  /**
688
1538
  * Unique identifier for the request
689
1539
  */
690
1540
  id: number;
1541
+ /**
1542
+ * Username of the requesting user
1543
+ */
1544
+ username: string;
1545
+ /**
1546
+ * User ID (UUID) of the requesting user
1547
+ */
1548
+ user_id: string;
691
1549
  reviewer?: string | null;
692
1550
  /**
693
1551
  * Current status of the request
694
1552
  */
695
1553
  status: UserAccessRequestStatus;
696
1554
  /**
697
- * Last update timestamp
698
- */
699
- updated_at: string;
700
- /**
701
- * User ID (UUID) of the requesting user
1555
+ * Creation timestamp
702
1556
  */
703
- user_id: string;
1557
+ created_at: string;
704
1558
  /**
705
- * Username of the requesting user
1559
+ * Last update timestamp
706
1560
  */
707
- username: string;
1561
+ updated_at: string;
708
1562
  };
709
1563
 
710
1564
  export type UserAccessRequestStatus = 'pending' | 'approved' | 'rejected';
@@ -714,60 +1568,60 @@ export type UserAccessRequestStatus = 'pending' | 'approved' | 'rejected';
714
1568
  */
715
1569
  export type UserAccessStatusResponse = {
716
1570
  /**
717
- * Creation timestamp
1571
+ * Username of the requesting user
718
1572
  */
719
- created_at: string;
1573
+ username: string;
720
1574
  /**
721
1575
  * Current status of the request (pending, approved, rejected)
722
1576
  */
723
1577
  status: UserAccessRequestStatus;
724
1578
  /**
725
- * Last update timestamp
1579
+ * Creation timestamp
726
1580
  */
727
- updated_at: string;
1581
+ created_at: string;
728
1582
  /**
729
- * Username of the requesting user
1583
+ * Last update timestamp
730
1584
  */
731
- username: string;
1585
+ updated_at: string;
732
1586
  };
733
1587
 
734
1588
  export type UserAlias = {
735
1589
  alias: string;
736
- context_params?: Array<string>;
737
- filename: string;
738
1590
  repo: string;
739
- request_params?: OaiRequestParams;
1591
+ filename: string;
740
1592
  snapshot: string;
1593
+ request_params?: OaiRequestParams;
1594
+ context_params?: Array<string>;
741
1595
  };
742
1596
 
743
1597
  export type UserAliasResponse = {
744
1598
  alias: string;
745
- context_params: Array<string>;
746
- filename: string;
747
- model_params: {};
748
1599
  repo: string;
749
- request_params: OaiRequestParams;
1600
+ filename: string;
750
1601
  snapshot: string;
751
1602
  source: string;
1603
+ model_params: {};
1604
+ request_params: OaiRequestParams;
1605
+ context_params: Array<string>;
752
1606
  };
753
1607
 
754
1608
  export type UserInfo = {
1609
+ user_id: string;
1610
+ username: string;
755
1611
  first_name?: string | null;
756
1612
  last_name?: string | null;
757
1613
  role?: null | AppRole;
758
- user_id: string;
759
- username: string;
760
1614
  };
761
1615
 
762
1616
  export type UserListResponse = {
763
1617
  client_id: string;
764
- has_next: boolean;
765
- has_previous: boolean;
1618
+ users: Array<UserInfo>;
766
1619
  page: number;
767
1620
  page_size: number;
768
1621
  total_pages: number;
769
1622
  total_users: number;
770
- users: Array<UserInfo>;
1623
+ has_next: boolean;
1624
+ has_previous: boolean;
771
1625
  };
772
1626
 
773
1627
  /**
@@ -777,10 +1631,54 @@ export type UserResponse = {
777
1631
  auth_status: 'logged_out';
778
1632
  } | (UserInfo & {
779
1633
  auth_status: 'logged_in';
1634
+ }) | (TokenInfo & {
1635
+ auth_status: 'api_token';
780
1636
  });
781
1637
 
782
1638
  export type UserScope = 'scope_user_user' | 'scope_user_power_user' | 'scope_user_manager' | 'scope_user_admin';
783
1639
 
1640
+ /**
1641
+ * The amount of context window space to use for the search.
1642
+ */
1643
+ export type WebSearchContextSize = 'low' | 'medium' | 'high';
1644
+
1645
+ /**
1646
+ * Approximate location parameters for the search.
1647
+ */
1648
+ export type WebSearchLocation = {
1649
+ /**
1650
+ * The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.
1651
+ */
1652
+ country?: string | null;
1653
+ /**
1654
+ * Free text input for the region of the user, e.g. `California`.
1655
+ */
1656
+ region?: string | null;
1657
+ /**
1658
+ * Free text input for the city of the user, e.g. `San Francisco`.
1659
+ */
1660
+ city?: string | null;
1661
+ /**
1662
+ * The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.
1663
+ */
1664
+ timezone?: string | null;
1665
+ };
1666
+
1667
+ /**
1668
+ * Options for the web search tool.
1669
+ */
1670
+ export type WebSearchOptions = {
1671
+ search_context_size?: null | WebSearchContextSize;
1672
+ user_location?: null | WebSearchUserLocation;
1673
+ };
1674
+
1675
+ export type WebSearchUserLocation = {
1676
+ type: WebSearchUserLocationType;
1677
+ approximate: WebSearchLocation;
1678
+ };
1679
+
1680
+ export type WebSearchUserLocationType = 'approximate';
1681
+
784
1682
  export type ChatOllamaModelData = {
785
1683
  /**
786
1684
  * Chat request in Ollama format
@@ -793,9 +1691,17 @@ export type ChatOllamaModelData = {
793
1691
 
794
1692
  export type ChatOllamaModelErrors = {
795
1693
  /**
796
- * Invalid request
1694
+ * Invalid request parameters
1695
+ */
1696
+ 400: OpenAiApiError;
1697
+ /**
1698
+ * Not authenticated
1699
+ */
1700
+ 401: OpenAiApiError;
1701
+ /**
1702
+ * Insufficient permissions
797
1703
  */
798
- 400: OllamaError;
1704
+ 403: OpenAiApiError;
799
1705
  /**
800
1706
  * Model not found
801
1707
  */
@@ -803,7 +1709,7 @@ export type ChatOllamaModelErrors = {
803
1709
  /**
804
1710
  * Internal server error
805
1711
  */
806
- 500: OllamaError;
1712
+ 500: OpenAiApiError;
807
1713
  };
808
1714
 
809
1715
  export type ChatOllamaModelError = ChatOllamaModelErrors[keyof ChatOllamaModelErrors];
@@ -826,6 +1732,18 @@ export type ShowOllamaModelData = {
826
1732
  };
827
1733
 
828
1734
  export type ShowOllamaModelErrors = {
1735
+ /**
1736
+ * Invalid request parameters
1737
+ */
1738
+ 400: OpenAiApiError;
1739
+ /**
1740
+ * Not authenticated
1741
+ */
1742
+ 401: OpenAiApiError;
1743
+ /**
1744
+ * Insufficient permissions
1745
+ */
1746
+ 403: OpenAiApiError;
829
1747
  /**
830
1748
  * Model not found
831
1749
  */
@@ -833,7 +1751,7 @@ export type ShowOllamaModelErrors = {
833
1751
  /**
834
1752
  * Internal server error
835
1753
  */
836
- 500: OllamaError;
1754
+ 500: OpenAiApiError;
837
1755
  };
838
1756
 
839
1757
  export type ShowOllamaModelError = ShowOllamaModelErrors[keyof ShowOllamaModelErrors];
@@ -855,10 +1773,22 @@ export type ListOllamaModelsData = {
855
1773
  };
856
1774
 
857
1775
  export type ListOllamaModelsErrors = {
1776
+ /**
1777
+ * Invalid request parameters
1778
+ */
1779
+ 400: OpenAiApiError;
1780
+ /**
1781
+ * Not authenticated
1782
+ */
1783
+ 401: OpenAiApiError;
1784
+ /**
1785
+ * Insufficient permissions
1786
+ */
1787
+ 403: OpenAiApiError;
858
1788
  /**
859
1789
  * Internal server error
860
1790
  */
861
- 500: OllamaError;
1791
+ 500: OpenAiApiError;
862
1792
  };
863
1793
 
864
1794
  export type ListOllamaModelsError = ListOllamaModelsErrors[keyof ListOllamaModelsErrors];
@@ -897,6 +1827,10 @@ export type ListAllAccessRequestsData = {
897
1827
  };
898
1828
 
899
1829
  export type ListAllAccessRequestsErrors = {
1830
+ /**
1831
+ * Invalid request parameters
1832
+ */
1833
+ 400: OpenAiApiError;
900
1834
  /**
901
1835
  * Not authenticated
902
1836
  */
@@ -905,6 +1839,10 @@ export type ListAllAccessRequestsErrors = {
905
1839
  * Insufficient permissions
906
1840
  */
907
1841
  403: OpenAiApiError;
1842
+ /**
1843
+ * Internal server error
1844
+ */
1845
+ 500: OpenAiApiError;
908
1846
  };
909
1847
 
910
1848
  export type ListAllAccessRequestsError = ListAllAccessRequestsErrors[keyof ListAllAccessRequestsErrors];
@@ -943,6 +1881,10 @@ export type ListPendingAccessRequestsData = {
943
1881
  };
944
1882
 
945
1883
  export type ListPendingAccessRequestsErrors = {
1884
+ /**
1885
+ * Invalid request parameters
1886
+ */
1887
+ 400: OpenAiApiError;
946
1888
  /**
947
1889
  * Not authenticated
948
1890
  */
@@ -951,6 +1893,10 @@ export type ListPendingAccessRequestsErrors = {
951
1893
  * Insufficient permissions
952
1894
  */
953
1895
  403: OpenAiApiError;
1896
+ /**
1897
+ * Internal server error
1898
+ */
1899
+ 500: OpenAiApiError;
954
1900
  };
955
1901
 
956
1902
  export type ListPendingAccessRequestsError = ListPendingAccessRequestsErrors[keyof ListPendingAccessRequestsErrors];
@@ -980,6 +1926,10 @@ export type ApproveAccessRequestData = {
980
1926
  };
981
1927
 
982
1928
  export type ApproveAccessRequestErrors = {
1929
+ /**
1930
+ * Invalid request parameters
1931
+ */
1932
+ 400: OpenAiApiError;
983
1933
  /**
984
1934
  * Not authenticated
985
1935
  */
@@ -992,6 +1942,10 @@ export type ApproveAccessRequestErrors = {
992
1942
  * Request not found
993
1943
  */
994
1944
  404: OpenAiApiError;
1945
+ /**
1946
+ * Internal server error
1947
+ */
1948
+ 500: OpenAiApiError;
995
1949
  };
996
1950
 
997
1951
  export type ApproveAccessRequestError = ApproveAccessRequestErrors[keyof ApproveAccessRequestErrors];
@@ -1016,6 +1970,10 @@ export type RejectAccessRequestData = {
1016
1970
  };
1017
1971
 
1018
1972
  export type RejectAccessRequestErrors = {
1973
+ /**
1974
+ * Invalid request parameters
1975
+ */
1976
+ 400: OpenAiApiError;
1019
1977
  /**
1020
1978
  * Not authenticated
1021
1979
  */
@@ -1028,6 +1986,10 @@ export type RejectAccessRequestErrors = {
1028
1986
  * Request not found
1029
1987
  */
1030
1988
  404: OpenAiApiError;
1989
+ /**
1990
+ * Internal server error
1991
+ */
1992
+ 500: OpenAiApiError;
1031
1993
  };
1032
1994
 
1033
1995
  export type RejectAccessRequestError = RejectAccessRequestErrors[keyof RejectAccessRequestErrors];
@@ -1065,7 +2027,19 @@ export type ListApiModelsData = {
1065
2027
 
1066
2028
  export type ListApiModelsErrors = {
1067
2029
  /**
1068
- * Internal server error during API model retrieval
2030
+ * Invalid request parameters
2031
+ */
2032
+ 400: OpenAiApiError;
2033
+ /**
2034
+ * Not authenticated
2035
+ */
2036
+ 401: OpenAiApiError;
2037
+ /**
2038
+ * Insufficient permissions
2039
+ */
2040
+ 403: OpenAiApiError;
2041
+ /**
2042
+ * Internal server error
1069
2043
  */
1070
2044
  500: OpenAiApiError;
1071
2045
  };
@@ -1090,9 +2064,17 @@ export type CreateApiModelData = {
1090
2064
 
1091
2065
  export type CreateApiModelErrors = {
1092
2066
  /**
1093
- * Invalid request
2067
+ * Invalid request parameters
1094
2068
  */
1095
2069
  400: OpenAiApiError;
2070
+ /**
2071
+ * Not authenticated
2072
+ */
2073
+ 401: OpenAiApiError;
2074
+ /**
2075
+ * Insufficient permissions
2076
+ */
2077
+ 403: OpenAiApiError;
1096
2078
  /**
1097
2079
  * Alias already exists
1098
2080
  */
@@ -1123,7 +2105,19 @@ export type GetApiFormatsData = {
1123
2105
 
1124
2106
  export type GetApiFormatsErrors = {
1125
2107
  /**
1126
- * Internal server error during API format retrieval
2108
+ * Invalid request parameters
2109
+ */
2110
+ 400: OpenAiApiError;
2111
+ /**
2112
+ * Not authenticated
2113
+ */
2114
+ 401: OpenAiApiError;
2115
+ /**
2116
+ * Insufficient permissions
2117
+ */
2118
+ 403: OpenAiApiError;
2119
+ /**
2120
+ * Internal server error
1127
2121
  */
1128
2122
  500: OpenAiApiError;
1129
2123
  };
@@ -1148,9 +2142,17 @@ export type FetchApiModelsData = {
1148
2142
 
1149
2143
  export type FetchApiModelsErrors = {
1150
2144
  /**
1151
- * Invalid request
2145
+ * Invalid request parameters
1152
2146
  */
1153
2147
  400: OpenAiApiError;
2148
+ /**
2149
+ * Not authenticated
2150
+ */
2151
+ 401: OpenAiApiError;
2152
+ /**
2153
+ * Insufficient permissions
2154
+ */
2155
+ 403: OpenAiApiError;
1154
2156
  /**
1155
2157
  * Internal server error
1156
2158
  */
@@ -1177,9 +2179,17 @@ export type TestApiModelData = {
1177
2179
 
1178
2180
  export type TestApiModelErrors = {
1179
2181
  /**
1180
- * Invalid request
2182
+ * Invalid request parameters
1181
2183
  */
1182
2184
  400: OpenAiApiError;
2185
+ /**
2186
+ * Not authenticated
2187
+ */
2188
+ 401: OpenAiApiError;
2189
+ /**
2190
+ * Insufficient permissions
2191
+ */
2192
+ 403: OpenAiApiError;
1183
2193
  /**
1184
2194
  * Internal server error
1185
2195
  */
@@ -1201,15 +2211,27 @@ export type DeleteApiModelData = {
1201
2211
  body?: never;
1202
2212
  path: {
1203
2213
  /**
1204
- * API model alias
2214
+ * API model ID
1205
2215
  */
1206
- alias: string;
2216
+ id: string;
1207
2217
  };
1208
2218
  query?: never;
1209
- url: '/bodhi/v1/api-models/{alias}';
2219
+ url: '/bodhi/v1/api-models/{id}';
1210
2220
  };
1211
2221
 
1212
2222
  export type DeleteApiModelErrors = {
2223
+ /**
2224
+ * Invalid request parameters
2225
+ */
2226
+ 400: OpenAiApiError;
2227
+ /**
2228
+ * Not authenticated
2229
+ */
2230
+ 401: OpenAiApiError;
2231
+ /**
2232
+ * Insufficient permissions
2233
+ */
2234
+ 403: OpenAiApiError;
1213
2235
  /**
1214
2236
  * API model not found
1215
2237
  */
@@ -1231,25 +2253,33 @@ export type DeleteApiModelResponses = {
1231
2253
 
1232
2254
  export type DeleteApiModelResponse = DeleteApiModelResponses[keyof DeleteApiModelResponses];
1233
2255
 
1234
- export type UpdateApiModelData = {
1235
- body: UpdateApiModelRequest;
2256
+ export type GetApiModelData = {
2257
+ body?: never;
1236
2258
  path: {
1237
2259
  /**
1238
- * API model alias
2260
+ * Unique identifier for the API model alias
1239
2261
  */
1240
- alias: string;
2262
+ id: string;
1241
2263
  };
1242
2264
  query?: never;
1243
- url: '/bodhi/v1/api-models/{alias}';
2265
+ url: '/bodhi/v1/api-models/{id}';
1244
2266
  };
1245
2267
 
1246
- export type UpdateApiModelErrors = {
2268
+ export type GetApiModelErrors = {
1247
2269
  /**
1248
- * Invalid request
2270
+ * Invalid request parameters
1249
2271
  */
1250
2272
  400: OpenAiApiError;
1251
2273
  /**
1252
- * API model not found
2274
+ * Not authenticated
2275
+ */
2276
+ 401: OpenAiApiError;
2277
+ /**
2278
+ * Insufficient permissions
2279
+ */
2280
+ 403: OpenAiApiError;
2281
+ /**
2282
+ * API model with specified ID not found
1253
2283
  */
1254
2284
  404: OpenAiApiError;
1255
2285
  /**
@@ -1258,22 +2288,22 @@ export type UpdateApiModelErrors = {
1258
2288
  500: OpenAiApiError;
1259
2289
  };
1260
2290
 
1261
- export type UpdateApiModelError = UpdateApiModelErrors[keyof UpdateApiModelErrors];
2291
+ export type GetApiModelError = GetApiModelErrors[keyof GetApiModelErrors];
1262
2292
 
1263
- export type UpdateApiModelResponses = {
2293
+ export type GetApiModelResponses = {
1264
2294
  /**
1265
- * API model updated
2295
+ * API model configuration retrieved successfully
1266
2296
  */
1267
2297
  200: ApiModelResponse;
1268
2298
  };
1269
2299
 
1270
- export type UpdateApiModelResponse = UpdateApiModelResponses[keyof UpdateApiModelResponses];
2300
+ export type GetApiModelResponse = GetApiModelResponses[keyof GetApiModelResponses];
1271
2301
 
1272
- export type GetApiModelData = {
1273
- body?: never;
2302
+ export type UpdateApiModelData = {
2303
+ body: UpdateApiModelRequest;
1274
2304
  path: {
1275
2305
  /**
1276
- * Unique identifier for the API model alias
2306
+ * API model ID
1277
2307
  */
1278
2308
  id: string;
1279
2309
  };
@@ -1281,27 +2311,39 @@ export type GetApiModelData = {
1281
2311
  url: '/bodhi/v1/api-models/{id}';
1282
2312
  };
1283
2313
 
1284
- export type GetApiModelErrors = {
2314
+ export type UpdateApiModelErrors = {
1285
2315
  /**
1286
- * API model with specified ID not found
2316
+ * Invalid request parameters
2317
+ */
2318
+ 400: OpenAiApiError;
2319
+ /**
2320
+ * Not authenticated
2321
+ */
2322
+ 401: OpenAiApiError;
2323
+ /**
2324
+ * Insufficient permissions
2325
+ */
2326
+ 403: OpenAiApiError;
2327
+ /**
2328
+ * API model not found
1287
2329
  */
1288
2330
  404: OpenAiApiError;
1289
2331
  /**
1290
- * Internal server error during model retrieval
2332
+ * Internal server error
1291
2333
  */
1292
2334
  500: OpenAiApiError;
1293
2335
  };
1294
2336
 
1295
- export type GetApiModelError = GetApiModelErrors[keyof GetApiModelErrors];
2337
+ export type UpdateApiModelError = UpdateApiModelErrors[keyof UpdateApiModelErrors];
1296
2338
 
1297
- export type GetApiModelResponses = {
2339
+ export type UpdateApiModelResponses = {
1298
2340
  /**
1299
- * API model configuration retrieved successfully
2341
+ * API model updated
1300
2342
  */
1301
2343
  200: ApiModelResponse;
1302
2344
  };
1303
2345
 
1304
- export type GetApiModelResponse = GetApiModelResponses[keyof GetApiModelResponses];
2346
+ export type UpdateApiModelResponse = UpdateApiModelResponses[keyof UpdateApiModelResponses];
1305
2347
 
1306
2348
  export type RequestAccessData = {
1307
2349
  /**
@@ -1315,11 +2357,19 @@ export type RequestAccessData = {
1315
2357
 
1316
2358
  export type RequestAccessErrors = {
1317
2359
  /**
1318
- * Invalid request, application not registered, or incorrect app status
2360
+ * Invalid request parameters
1319
2361
  */
1320
2362
  400: OpenAiApiError;
1321
2363
  /**
1322
- * Internal server error during access request
2364
+ * Not authenticated
2365
+ */
2366
+ 401: OpenAiApiError;
2367
+ /**
2368
+ * Insufficient permissions
2369
+ */
2370
+ 403: OpenAiApiError;
2371
+ /**
2372
+ * Internal server error
1323
2373
  */
1324
2374
  500: OpenAiApiError;
1325
2375
  };
@@ -1346,12 +2396,24 @@ export type CompleteOAuthFlowData = {
1346
2396
  };
1347
2397
 
1348
2398
  export type CompleteOAuthFlowErrors = {
2399
+ /**
2400
+ * Invalid request parameters
2401
+ */
2402
+ 400: OpenAiApiError;
2403
+ /**
2404
+ * Not authenticated
2405
+ */
2406
+ 401: OpenAiApiError;
2407
+ /**
2408
+ * Insufficient permissions
2409
+ */
2410
+ 403: OpenAiApiError;
1349
2411
  /**
1350
2412
  * OAuth error, invalid request parameters, or state mismatch
1351
2413
  */
1352
2414
  422: OpenAiApiError;
1353
2415
  /**
1354
- * Internal server error during token exchange
2416
+ * Internal server error
1355
2417
  */
1356
2418
  500: OpenAiApiError;
1357
2419
  };
@@ -1376,7 +2438,19 @@ export type InitiateOAuthFlowData = {
1376
2438
 
1377
2439
  export type InitiateOAuthFlowErrors = {
1378
2440
  /**
1379
- * Internal server error during OAuth initialization
2441
+ * Invalid request parameters
2442
+ */
2443
+ 400: OpenAiApiError;
2444
+ /**
2445
+ * Not authenticated
2446
+ */
2447
+ 401: OpenAiApiError;
2448
+ /**
2449
+ * Insufficient permissions
2450
+ */
2451
+ 403: OpenAiApiError;
2452
+ /**
2453
+ * Internal server error
1380
2454
  */
1381
2455
  500: OpenAiApiError;
1382
2456
  };
@@ -1404,6 +2478,10 @@ export type GetAppInfoData = {
1404
2478
  };
1405
2479
 
1406
2480
  export type GetAppInfoErrors = {
2481
+ /**
2482
+ * Invalid request parameters
2483
+ */
2484
+ 400: OpenAiApiError;
1407
2485
  /**
1408
2486
  * Internal server error
1409
2487
  */
@@ -1430,7 +2508,19 @@ export type LogoutUserData = {
1430
2508
 
1431
2509
  export type LogoutUserErrors = {
1432
2510
  /**
1433
- * Session deletion failed
2511
+ * Invalid request parameters
2512
+ */
2513
+ 400: OpenAiApiError;
2514
+ /**
2515
+ * Not authenticated
2516
+ */
2517
+ 401: OpenAiApiError;
2518
+ /**
2519
+ * Insufficient permissions
2520
+ */
2521
+ 403: OpenAiApiError;
2522
+ /**
2523
+ * Internal server error
1434
2524
  */
1435
2525
  500: OpenAiApiError;
1436
2526
  };
@@ -1471,6 +2561,18 @@ export type ListModelFilesData = {
1471
2561
  };
1472
2562
 
1473
2563
  export type ListModelFilesErrors = {
2564
+ /**
2565
+ * Invalid request parameters
2566
+ */
2567
+ 400: OpenAiApiError;
2568
+ /**
2569
+ * Not authenticated
2570
+ */
2571
+ 401: OpenAiApiError;
2572
+ /**
2573
+ * Insufficient permissions
2574
+ */
2575
+ 403: OpenAiApiError;
1474
2576
  /**
1475
2577
  * Internal server error
1476
2578
  */
@@ -1514,7 +2616,19 @@ export type ListDownloadsData = {
1514
2616
 
1515
2617
  export type ListDownloadsErrors = {
1516
2618
  /**
1517
- * Internal server error during download list retrieval
2619
+ * Invalid request parameters
2620
+ */
2621
+ 400: OpenAiApiError;
2622
+ /**
2623
+ * Not authenticated
2624
+ */
2625
+ 401: OpenAiApiError;
2626
+ /**
2627
+ * Insufficient permissions
2628
+ */
2629
+ 403: OpenAiApiError;
2630
+ /**
2631
+ * Internal server error
1518
2632
  */
1519
2633
  500: OpenAiApiError;
1520
2634
  };
@@ -1542,9 +2656,17 @@ export type PullModelFileData = {
1542
2656
 
1543
2657
  export type PullModelFileErrors = {
1544
2658
  /**
1545
- * File already exists or invalid input
2659
+ * Invalid request parameters
2660
+ */
2661
+ 400: OpenAiApiError;
2662
+ /**
2663
+ * Not authenticated
1546
2664
  */
1547
- 400: OpenAiApiError;
2665
+ 401: OpenAiApiError;
2666
+ /**
2667
+ * Insufficient permissions
2668
+ */
2669
+ 403: OpenAiApiError;
1548
2670
  /**
1549
2671
  * Internal server error
1550
2672
  */
@@ -1580,9 +2702,17 @@ export type PullModelByAliasData = {
1580
2702
 
1581
2703
  export type PullModelByAliasErrors = {
1582
2704
  /**
1583
- * File already exists
2705
+ * Invalid request parameters
1584
2706
  */
1585
2707
  400: OpenAiApiError;
2708
+ /**
2709
+ * Not authenticated
2710
+ */
2711
+ 401: OpenAiApiError;
2712
+ /**
2713
+ * Insufficient permissions
2714
+ */
2715
+ 403: OpenAiApiError;
1586
2716
  /**
1587
2717
  * Alias not found
1588
2718
  */
@@ -1621,6 +2751,18 @@ export type GetDownloadStatusData = {
1621
2751
  };
1622
2752
 
1623
2753
  export type GetDownloadStatusErrors = {
2754
+ /**
2755
+ * Invalid request parameters
2756
+ */
2757
+ 400: OpenAiApiError;
2758
+ /**
2759
+ * Not authenticated
2760
+ */
2761
+ 401: OpenAiApiError;
2762
+ /**
2763
+ * Insufficient permissions
2764
+ */
2765
+ 403: OpenAiApiError;
1624
2766
  /**
1625
2767
  * Download request not found
1626
2768
  */
@@ -1667,6 +2809,18 @@ export type ListAllModelsData = {
1667
2809
  };
1668
2810
 
1669
2811
  export type ListAllModelsErrors = {
2812
+ /**
2813
+ * Invalid request parameters
2814
+ */
2815
+ 400: OpenAiApiError;
2816
+ /**
2817
+ * Not authenticated
2818
+ */
2819
+ 401: OpenAiApiError;
2820
+ /**
2821
+ * Insufficient permissions
2822
+ */
2823
+ 403: OpenAiApiError;
1670
2824
  /**
1671
2825
  * Internal server error
1672
2826
  */
@@ -1693,9 +2847,17 @@ export type CreateAliasData = {
1693
2847
 
1694
2848
  export type CreateAliasErrors = {
1695
2849
  /**
1696
- * Invalid request
2850
+ * Invalid request parameters
1697
2851
  */
1698
2852
  400: OpenAiApiError;
2853
+ /**
2854
+ * Not authenticated
2855
+ */
2856
+ 401: OpenAiApiError;
2857
+ /**
2858
+ * Insufficient permissions
2859
+ */
2860
+ 403: OpenAiApiError;
1699
2861
  /**
1700
2862
  * Internal server error
1701
2863
  */
@@ -1726,6 +2888,18 @@ export type GetAliasData = {
1726
2888
  };
1727
2889
 
1728
2890
  export type GetAliasErrors = {
2891
+ /**
2892
+ * Invalid request parameters
2893
+ */
2894
+ 400: OpenAiApiError;
2895
+ /**
2896
+ * Not authenticated
2897
+ */
2898
+ 401: OpenAiApiError;
2899
+ /**
2900
+ * Insufficient permissions
2901
+ */
2902
+ 403: OpenAiApiError;
1729
2903
  /**
1730
2904
  * Alias not found
1731
2905
  */
@@ -1761,9 +2935,17 @@ export type UpdateAliasData = {
1761
2935
 
1762
2936
  export type UpdateAliasErrors = {
1763
2937
  /**
1764
- * Invalid request
2938
+ * Invalid request parameters
1765
2939
  */
1766
2940
  400: OpenAiApiError;
2941
+ /**
2942
+ * Not authenticated
2943
+ */
2944
+ 401: OpenAiApiError;
2945
+ /**
2946
+ * Insufficient permissions
2947
+ */
2948
+ 403: OpenAiApiError;
1767
2949
  /**
1768
2950
  * Internal server error
1769
2951
  */
@@ -1774,9 +2956,9 @@ export type UpdateAliasError = UpdateAliasErrors[keyof UpdateAliasErrors];
1774
2956
 
1775
2957
  export type UpdateAliasResponses = {
1776
2958
  /**
1777
- * Alias created succesfully
2959
+ * Alias updated succesfully
1778
2960
  */
1779
- 201: UserAliasResponse;
2961
+ 200: UserAliasResponse;
1780
2962
  };
1781
2963
 
1782
2964
  export type UpdateAliasResponse = UpdateAliasResponses[keyof UpdateAliasResponses];
@@ -1790,9 +2972,17 @@ export type ListSettingsData = {
1790
2972
 
1791
2973
  export type ListSettingsErrors = {
1792
2974
  /**
1793
- * Unauthorized - User is not an admin
2975
+ * Invalid request parameters
2976
+ */
2977
+ 400: OpenAiApiError;
2978
+ /**
2979
+ * Not authenticated
1794
2980
  */
1795
2981
  401: OpenAiApiError;
2982
+ /**
2983
+ * Insufficient permissions
2984
+ */
2985
+ 403: OpenAiApiError;
1796
2986
  /**
1797
2987
  * Internal server error
1798
2988
  */
@@ -1823,10 +3013,26 @@ export type DeleteSettingData = {
1823
3013
  };
1824
3014
 
1825
3015
  export type DeleteSettingErrors = {
3016
+ /**
3017
+ * Invalid request parameters
3018
+ */
3019
+ 400: OpenAiApiError;
3020
+ /**
3021
+ * Not authenticated
3022
+ */
3023
+ 401: OpenAiApiError;
3024
+ /**
3025
+ * Insufficient permissions
3026
+ */
3027
+ 403: OpenAiApiError;
1826
3028
  /**
1827
3029
  * Setting not found
1828
3030
  */
1829
3031
  404: OpenAiApiError;
3032
+ /**
3033
+ * Internal server error
3034
+ */
3035
+ 500: OpenAiApiError;
1830
3036
  };
1831
3037
 
1832
3038
  export type DeleteSettingError = DeleteSettingErrors[keyof DeleteSettingErrors];
@@ -1862,13 +3068,25 @@ export type UpdateSettingData = {
1862
3068
 
1863
3069
  export type UpdateSettingErrors = {
1864
3070
  /**
1865
- * Invalid setting or value
3071
+ * Invalid request parameters
1866
3072
  */
1867
3073
  400: OpenAiApiError;
3074
+ /**
3075
+ * Not authenticated
3076
+ */
3077
+ 401: OpenAiApiError;
3078
+ /**
3079
+ * Insufficient permissions
3080
+ */
3081
+ 403: OpenAiApiError;
1868
3082
  /**
1869
3083
  * Setting not found
1870
3084
  */
1871
3085
  404: OpenAiApiError;
3086
+ /**
3087
+ * Internal server error
3088
+ */
3089
+ 500: OpenAiApiError;
1872
3090
  };
1873
3091
 
1874
3092
  export type UpdateSettingError = UpdateSettingErrors[keyof UpdateSettingErrors];
@@ -1894,11 +3112,11 @@ export type SetupAppData = {
1894
3112
 
1895
3113
  export type SetupAppErrors = {
1896
3114
  /**
1897
- * Invalid request or application already setup
3115
+ * Invalid request parameters
1898
3116
  */
1899
3117
  400: OpenAiApiError;
1900
3118
  /**
1901
- * Internal server error during setup
3119
+ * Internal server error
1902
3120
  */
1903
3121
  500: OpenAiApiError;
1904
3122
  };
@@ -1940,9 +3158,17 @@ export type ListApiTokensData = {
1940
3158
 
1941
3159
  export type ListApiTokensErrors = {
1942
3160
  /**
1943
- * Unauthorized - Token missing or invalid
3161
+ * Invalid request parameters
3162
+ */
3163
+ 400: OpenAiApiError;
3164
+ /**
3165
+ * Not authenticated
1944
3166
  */
1945
3167
  401: OpenAiApiError;
3168
+ /**
3169
+ * Insufficient permissions
3170
+ */
3171
+ 403: OpenAiApiError;
1946
3172
  /**
1947
3173
  * Internal server error
1948
3174
  */
@@ -1972,11 +3198,19 @@ export type CreateApiTokenData = {
1972
3198
 
1973
3199
  export type CreateApiTokenErrors = {
1974
3200
  /**
1975
- * Invalid request parameters or token name already exists
3201
+ * Invalid request parameters
1976
3202
  */
1977
3203
  400: OpenAiApiError;
1978
3204
  /**
1979
- * Internal server error during token creation
3205
+ * Not authenticated
3206
+ */
3207
+ 401: OpenAiApiError;
3208
+ /**
3209
+ * Insufficient permissions
3210
+ */
3211
+ 403: OpenAiApiError;
3212
+ /**
3213
+ * Internal server error
1980
3214
  */
1981
3215
  500: OpenAiApiError;
1982
3216
  };
@@ -2009,9 +3243,17 @@ export type UpdateApiTokenData = {
2009
3243
 
2010
3244
  export type UpdateApiTokenErrors = {
2011
3245
  /**
2012
- * Unauthorized - Token missing or invalid
3246
+ * Invalid request parameters
3247
+ */
3248
+ 400: OpenAiApiError;
3249
+ /**
3250
+ * Not authenticated
2013
3251
  */
2014
3252
  401: OpenAiApiError;
3253
+ /**
3254
+ * Insufficient permissions
3255
+ */
3256
+ 403: OpenAiApiError;
2015
3257
  /**
2016
3258
  * Token not found
2017
3259
  */
@@ -2042,7 +3284,19 @@ export type GetCurrentUserData = {
2042
3284
 
2043
3285
  export type GetCurrentUserErrors = {
2044
3286
  /**
2045
- * Authentication error or invalid token
3287
+ * Invalid request parameters
3288
+ */
3289
+ 400: OpenAiApiError;
3290
+ /**
3291
+ * Not authenticated
3292
+ */
3293
+ 401: OpenAiApiError;
3294
+ /**
3295
+ * Insufficient permissions
3296
+ */
3297
+ 403: OpenAiApiError;
3298
+ /**
3299
+ * Internal server error
2046
3300
  */
2047
3301
  500: OpenAiApiError;
2048
3302
  };
@@ -2051,7 +3305,7 @@ export type GetCurrentUserError = GetCurrentUserErrors[keyof GetCurrentUserError
2051
3305
 
2052
3306
  export type GetCurrentUserResponses = {
2053
3307
  /**
2054
- * Current user information retrieved successfully
3308
+ * User information (authenticated or not)
2055
3309
  */
2056
3310
  200: UserResponse;
2057
3311
  };
@@ -2066,10 +3320,18 @@ export type RequestUserAccessData = {
2066
3320
  };
2067
3321
 
2068
3322
  export type RequestUserAccessErrors = {
3323
+ /**
3324
+ * Invalid request parameters
3325
+ */
3326
+ 400: OpenAiApiError;
2069
3327
  /**
2070
3328
  * Not authenticated
2071
3329
  */
2072
3330
  401: OpenAiApiError;
3331
+ /**
3332
+ * Insufficient permissions
3333
+ */
3334
+ 403: OpenAiApiError;
2073
3335
  /**
2074
3336
  * Pending request already exists
2075
3337
  */
@@ -2078,6 +3340,10 @@ export type RequestUserAccessErrors = {
2078
3340
  * User already has role
2079
3341
  */
2080
3342
  422: OpenAiApiError;
3343
+ /**
3344
+ * Internal server error
3345
+ */
3346
+ 500: OpenAiApiError;
2081
3347
  };
2082
3348
 
2083
3349
  export type RequestUserAccessError = RequestUserAccessErrors[keyof RequestUserAccessErrors];
@@ -2086,11 +3352,9 @@ export type RequestUserAccessResponses = {
2086
3352
  /**
2087
3353
  * Access request created successfully
2088
3354
  */
2089
- 201: EmptyResponse;
3355
+ 201: unknown;
2090
3356
  };
2091
3357
 
2092
- export type RequestUserAccessResponse = RequestUserAccessResponses[keyof RequestUserAccessResponses];
2093
-
2094
3358
  export type GetUserAccessStatusData = {
2095
3359
  body?: never;
2096
3360
  path?: never;
@@ -2100,17 +3364,25 @@ export type GetUserAccessStatusData = {
2100
3364
 
2101
3365
  export type GetUserAccessStatusErrors = {
2102
3366
  /**
2103
- * Bad Request
3367
+ * Invalid request parameters
2104
3368
  */
2105
3369
  400: OpenAiApiError;
2106
3370
  /**
2107
3371
  * Not authenticated
2108
3372
  */
2109
3373
  401: OpenAiApiError;
3374
+ /**
3375
+ * Insufficient permissions
3376
+ */
3377
+ 403: OpenAiApiError;
2110
3378
  /**
2111
3379
  * Request not found
2112
3380
  */
2113
3381
  404: OpenAiApiError;
3382
+ /**
3383
+ * Internal server error
3384
+ */
3385
+ 500: OpenAiApiError;
2114
3386
  };
2115
3387
 
2116
3388
  export type GetUserAccessStatusError = GetUserAccessStatusErrors[keyof GetUserAccessStatusErrors];
@@ -2184,7 +3456,7 @@ export type RemoveUserData = {
2184
3456
 
2185
3457
  export type RemoveUserErrors = {
2186
3458
  /**
2187
- * Invalid request
3459
+ * Invalid request parameters
2188
3460
  */
2189
3461
  400: OpenAiApiError;
2190
3462
  /**
@@ -2228,7 +3500,7 @@ export type ChangeUserRoleData = {
2228
3500
 
2229
3501
  export type ChangeUserRoleErrors = {
2230
3502
  /**
2231
- * Invalid request
3503
+ * Invalid request parameters
2232
3504
  */
2233
3505
  400: OpenAiApiError;
2234
3506
  /**
@@ -2265,6 +3537,19 @@ export type HealthCheckData = {
2265
3537
  url: '/health';
2266
3538
  };
2267
3539
 
3540
+ export type HealthCheckErrors = {
3541
+ /**
3542
+ * Invalid request parameters
3543
+ */
3544
+ 400: OpenAiApiError;
3545
+ /**
3546
+ * Internal server error
3547
+ */
3548
+ 500: OpenAiApiError;
3549
+ };
3550
+
3551
+ export type HealthCheckError = HealthCheckErrors[keyof HealthCheckErrors];
3552
+
2268
3553
  export type HealthCheckResponses = {
2269
3554
  /**
2270
3555
  * Application is healthy and fully operational
@@ -2281,6 +3566,19 @@ export type PingServerData = {
2281
3566
  url: '/ping';
2282
3567
  };
2283
3568
 
3569
+ export type PingServerErrors = {
3570
+ /**
3571
+ * Invalid request parameters
3572
+ */
3573
+ 400: OpenAiApiError;
3574
+ /**
3575
+ * Internal server error
3576
+ */
3577
+ 500: OpenAiApiError;
3578
+ };
3579
+
3580
+ export type PingServerError = PingServerErrors[keyof PingServerErrors];
3581
+
2284
3582
  export type PingServerResponses = {
2285
3583
  /**
2286
3584
  * Server is responding normally
@@ -2291,7 +3589,7 @@ export type PingServerResponses = {
2291
3589
  export type PingServerResponse = PingServerResponses[keyof PingServerResponses];
2292
3590
 
2293
3591
  export type CreateChatCompletionData = {
2294
- body: unknown;
3592
+ body: CreateChatCompletionRequest;
2295
3593
  path?: never;
2296
3594
  query?: never;
2297
3595
  url: '/v1/chat/completions';
@@ -2303,9 +3601,13 @@ export type CreateChatCompletionErrors = {
2303
3601
  */
2304
3602
  400: OpenAiApiError;
2305
3603
  /**
2306
- * Invalid authentication
3604
+ * Not authenticated
2307
3605
  */
2308
3606
  401: OpenAiApiError;
3607
+ /**
3608
+ * Insufficient permissions
3609
+ */
3610
+ 403: OpenAiApiError;
2309
3611
  /**
2310
3612
  * Internal server error
2311
3613
  */
@@ -2318,13 +3620,52 @@ export type CreateChatCompletionResponses = {
2318
3620
  /**
2319
3621
  * Chat completion response
2320
3622
  */
2321
- 200: unknown;
3623
+ 200: CreateChatCompletionResponse;
2322
3624
  /**
2323
3625
  * Chat completion stream, the status is 200, using 201 to avoid OpenAPI format limitation.
2324
3626
  */
2325
- 201: unknown;
3627
+ 201: CreateChatCompletionStreamResponse;
3628
+ };
3629
+
3630
+ export type CreateChatCompletionResponse2 = CreateChatCompletionResponses[keyof CreateChatCompletionResponses];
3631
+
3632
+ export type CreateEmbeddingData = {
3633
+ body: CreateEmbeddingRequest;
3634
+ path?: never;
3635
+ query?: never;
3636
+ url: '/v1/embeddings';
3637
+ };
3638
+
3639
+ export type CreateEmbeddingErrors = {
3640
+ /**
3641
+ * Invalid request parameters
3642
+ */
3643
+ 400: OpenAiApiError;
3644
+ /**
3645
+ * Not authenticated
3646
+ */
3647
+ 401: OpenAiApiError;
3648
+ /**
3649
+ * Insufficient permissions
3650
+ */
3651
+ 403: OpenAiApiError;
3652
+ /**
3653
+ * Internal server error
3654
+ */
3655
+ 500: OpenAiApiError;
2326
3656
  };
2327
3657
 
3658
+ export type CreateEmbeddingError = CreateEmbeddingErrors[keyof CreateEmbeddingErrors];
3659
+
3660
+ export type CreateEmbeddingResponses = {
3661
+ /**
3662
+ * Embedding response
3663
+ */
3664
+ 200: CreateEmbeddingResponse;
3665
+ };
3666
+
3667
+ export type CreateEmbeddingResponse2 = CreateEmbeddingResponses[keyof CreateEmbeddingResponses];
3668
+
2328
3669
  export type ListModelsData = {
2329
3670
  body?: never;
2330
3671
  path?: never;
@@ -2334,9 +3675,17 @@ export type ListModelsData = {
2334
3675
 
2335
3676
  export type ListModelsErrors = {
2336
3677
  /**
2337
- * Invalid authentication
3678
+ * Invalid request parameters
3679
+ */
3680
+ 400: OpenAiApiError;
3681
+ /**
3682
+ * Not authenticated
2338
3683
  */
2339
3684
  401: OpenAiApiError;
3685
+ /**
3686
+ * Insufficient permissions
3687
+ */
3688
+ 403: OpenAiApiError;
2340
3689
  /**
2341
3690
  * Internal server error
2342
3691
  */
@@ -2368,9 +3717,17 @@ export type GetModelData = {
2368
3717
 
2369
3718
  export type GetModelErrors = {
2370
3719
  /**
2371
- * Invalid authentication
3720
+ * Invalid request parameters
3721
+ */
3722
+ 400: OpenAiApiError;
3723
+ /**
3724
+ * Not authenticated
2372
3725
  */
2373
3726
  401: OpenAiApiError;
3727
+ /**
3728
+ * Insufficient permissions
3729
+ */
3730
+ 403: OpenAiApiError;
2374
3731
  /**
2375
3732
  * Model not found
2376
3733
  */