@epam/ai-dial-typescript-sdk 0.1.0-dev.38 → 0.1.0-dev.39

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.
package/dist/index.d.ts CHANGED
@@ -1235,7 +1235,12 @@ interface paths {
1235
1235
  path?: never;
1236
1236
  cookie?: never;
1237
1237
  };
1238
- /** /v1/metadata/applications/platform/{path} */
1238
+ /**
1239
+ * /v1/metadata/applications/platform/{path}
1240
+ * @description Call this endpoint to get metadata for a folder or an item.
1241
+ * If the path is a folder, it must end with a "/".
1242
+ * If it is called for a folder, there can be optional `nextToken` field in the response to be used to request next items if present.
1243
+ */
1239
1244
  get: operations['getPlatformApplicationMetadata'];
1240
1245
  put?: never;
1241
1246
  post?: never;
@@ -2663,6 +2668,62 @@ interface paths {
2663
2668
  patch?: never;
2664
2669
  trace?: never;
2665
2670
  };
2671
+ '/v1/user/limits': {
2672
+ parameters: {
2673
+ query?: never;
2674
+ header?: never;
2675
+ path?: never;
2676
+ cookie?: never;
2677
+ };
2678
+ /**
2679
+ * /v1/user/limits
2680
+ * @description Returns limits and current rolling usage for every deployment available to the authenticated caller -
2681
+ * a JWT user or an API-key project. It replaces calling `/v1/deployments/{deployment_name}/limits` once
2682
+ * per deployment, and one response labels an entire model picker, so switching model needs no refetch.
2683
+ *
2684
+ * A deployment the caller has never used is reported, not omitted: its real limits arrive against zeros.
2685
+ * Use `/v1/user/usage` for the short list of deployments actually used.
2686
+ *
2687
+ * Five things to know before rendering this response:
2688
+ *
2689
+ * 1. **Models only.** Applications, toolsets and routes are not listed. DIAL never writes rate-limit
2690
+ * counters for them, so an entry would report zeros against a limit that cannot fire. Tokens and
2691
+ * spend an application drives are reported against the model that incurred them.
2692
+ * 2. **The cost budget is global; attributed spend is per deployment.** The top-level `*CostStats` are
2693
+ * the caller's money budget and the spend against it, because a budget cannot be scoped to a
2694
+ * deployment. The `*CostStats` inside a deployment entry are that deployment's own attributed spend,
2695
+ * with `total` at the unlimited sentinel since no per-deployment cap exists.
2696
+ * 3. **`*CostStats` means something different on the legacy endpoint.**
2697
+ * `/v1/deployments/{deployment_name}/limits` returns the caller's *global* cost figures inside its
2698
+ * per-deployment response. The shape is identical, so re-read the scope, not just the parser.
2699
+ * 4. **A limit is optional.** When no role configures one, `total` is `9223372036854775807`
2700
+ * (`Long.MAX_VALUE`), meaning unlimited. That value exceeds JavaScript's `Number.MAX_SAFE_INTEGER`
2701
+ * (`9007199254740991`), so treat any `total` at or above 2^53 as unlimited rather than rendering it
2702
+ * as a `used / total` ratio.
2703
+ * 5. **Every window is trailing, not calendar-aligned.** `day` is the last 24 hours, `week` the last 7
2704
+ * days, `month` the last 30 days - never "since midnight" or "since the 1st". As a result `used`
2705
+ * decreases on its own as older activity ages out; there is no refund and no periodic reset.
2706
+ * Eviction happens in steps on UTC boundaries at each window's granularity (1 hour for `day`, 1 day
2707
+ * for `week` and `month`).
2708
+ *
2709
+ * Per-deployment spend does not reconcile to the global figure. Attribution starts at rollout and does
2710
+ * not back-fill, and a model without `pricing` never contributes while still consuming tokens, so the
2711
+ * breakdown must not be presented as a decomposition of the global figure and "other" must not be
2712
+ * computed as the remainder.
2713
+ *
2714
+ * Not to be confused with `limits` in the deployment listing, which is `TokenLimitsData`
2715
+ * (`maxTotalTokens`, `maxPromptTokens`, `maxCompletionTokens`) - context-window sizes, unrelated to
2716
+ * rate limits.
2717
+ */
2718
+ get: operations['getUserLimits'];
2719
+ put?: never;
2720
+ post?: never;
2721
+ delete?: never;
2722
+ options?: never;
2723
+ head?: never;
2724
+ patch?: never;
2725
+ trace?: never;
2726
+ };
2666
2727
  '/v1/user/offline-credentials': {
2667
2728
  parameters: {
2668
2729
  query?: never;
@@ -2714,6 +2775,38 @@ interface paths {
2714
2775
  patch?: never;
2715
2776
  trace?: never;
2716
2777
  };
2778
+ '/v1/user/usage': {
2779
+ parameters: {
2780
+ query?: never;
2781
+ header?: never;
2782
+ path?: never;
2783
+ cookie?: never;
2784
+ };
2785
+ /**
2786
+ * /v1/user/usage
2787
+ * @description The `/v1/user/limits` response with the all-zero entries dropped, leaving the deployments the caller
2788
+ * used within the trailing 30 days and can currently access. Same field names, same figures, same
2789
+ * top-level cost pairs - a client moving between the two endpoints changes nothing but the set it
2790
+ * iterates. Every caveat documented on `/v1/user/limits` applies here unchanged.
2791
+ *
2792
+ * The 30 days is not a parameter: it is the widest window DIAL keeps, so a deployment absent from this
2793
+ * response has nothing to report in any window. Absence therefore means zero, not "unknown" - a client
2794
+ * that wants the whole accessible set should call `/v1/user/limits` rather than reconstruct it. A
2795
+ * deployment the caller used and then lost access to, or that was removed from config, is absent from
2796
+ * both, even though its spend still counted toward the global cost figures.
2797
+ *
2798
+ * Intended for a client that renders only what was used - a "where is my budget going" panel, a report,
2799
+ * a mobile view. In an installation with many models the difference in payload size is large.
2800
+ */
2801
+ get: operations['getUserUsage'];
2802
+ put?: never;
2803
+ post?: never;
2804
+ delete?: never;
2805
+ options?: never;
2806
+ head?: never;
2807
+ patch?: never;
2808
+ trace?: never;
2809
+ };
2717
2810
  '/v1/{deployment_name}/rate': {
2718
2811
  parameters: {
2719
2812
  query?: never;
@@ -2972,35 +3065,16 @@ interface components {
2972
3065
  };
2973
3066
  /** @enum {string} */
2974
3067
  ApplicationMcpConfigDelivery: 'HEADER' | 'META';
2975
- Attachment: ({
2976
- /** @default text/markdown */
2977
- type: string;
2978
- title?: string;
2979
- data?: string;
2980
- url?: string;
2981
- reference_type?: string;
2982
- reference_url?: string;
2983
- } & {
2984
- [key: string]: unknown;
2985
- }) & (unknown | unknown);
2986
3068
  /** @enum {string} */
2987
3069
  AuthenticationType: 'OAUTH' | 'API_KEY' | 'NONE' | 'DIAL_NATIVE';
2988
- AzureEmbeddingsRequest: {
2989
- model?: string;
2990
- input: string | unknown[];
2991
- /** @enum {string} */
2992
- encoding_format?: 'float' | 'base64';
2993
- dimensions?: number;
2994
- user?: string;
2995
- };
2996
3070
  Bucket: {
2997
3071
  appdata?: string;
2998
3072
  bucket?: string;
2999
3073
  };
3074
+ /** @description A manual cache breakpoint. The part of the chat completion request up to this breakpoint will be cached by the deployment. Follow-up requests sharing the same prefix have a chance of hitting the cache and reusing the input tokens associated with this prefix. The field only makes sense for the deployments that support [prompt caching](https://docs.dialx.ai/tutorials/developers/prompt-caching). */
3000
3075
  CacheBreakpoint: {
3076
+ /** @description An optional expiration time for the given cache breakpoint, e.g. '2025-10-02T15:01:23Z' */
3001
3077
  expire_at?: string;
3002
- } & {
3003
- [key: string]: unknown;
3004
3078
  };
3005
3079
  CapabilitiesData: {
3006
3080
  chat_completion?: boolean;
@@ -3010,58 +3084,529 @@ interface components {
3010
3084
  inference?: boolean;
3011
3085
  scale_types?: string[];
3012
3086
  };
3013
- ChatCompletionChoice: {
3087
+ ChatCompletionAddon: {
3088
+ /** @description The name of an addon defined in the DIAL Core config. */
3089
+ name?: string;
3090
+ } | {
3091
+ /**
3092
+ * @description The URL pointing to an OpenAI Plugin Schema.
3093
+ * <br><br>
3094
+ * See for example the [to-do plugin](https://github.com/openai/plugins-quickstart/blob/main/.well-known/ai-plugin.json).
3095
+ */
3096
+ url?: string;
3097
+ };
3098
+ /** @deprecated */
3099
+ ChatCompletionFunction: {
3100
+ /** @description A description of what the function does, used by the model to choose when and how to call the function. */
3101
+ description?: string;
3102
+ /** @description 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. */
3103
+ name: string;
3104
+ parameters?: components['schemas']['FunctionParameters'];
3105
+ };
3106
+ /** @description Deprecated and replaced by `tool_calls`. The name and arguments of a `function` that should be called, as generated by the model. */
3107
+ ChatCompletionFunctionCall: {
3108
+ /** @description The name of the `function` to call. */
3109
+ name: string;
3110
+ /** @description 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`. */
3111
+ arguments: string;
3112
+ };
3113
+ /** @description Specifying a particular function via `{"name": "my_function"}` forces the model to call that function. */
3114
+ ChatCompletionFunctionCallOption: {
3115
+ /** @description The name of the function to call. */
3116
+ name: string;
3117
+ };
3118
+ ChatCompletionMessageToolCall: {
3119
+ /** @description The ID of the `tool` call. */
3120
+ id: string;
3121
+ type: components['schemas']['ToolCallType'];
3122
+ /** @description The `function` that the model called. */
3123
+ function: {
3124
+ /** @description The name of the `function` to call. */
3125
+ name: string;
3126
+ /** @description The arguments to call the `function` with, as generated by the model in JSON format. Note that the model does not always generate a valid JSON, and may hallucinate parameters not defined by your `function` schema. Validate the arguments in your code before calling your `function`. */
3127
+ arguments: string;
3128
+ };
3129
+ };
3130
+ ChatCompletionMessageToolCallChunk: {
3014
3131
  index: number;
3015
- message: components['schemas']['ChatCompletionMessage'];
3016
- finish_reason?: string | null;
3132
+ /** @description The ID of the tool call. */
3133
+ id?: string;
3134
+ /**
3135
+ * @description The type of the tool. Currently, only `function` is supported.
3136
+ * @enum {string}
3137
+ */
3138
+ type?: 'function';
3139
+ function?: {
3140
+ /** @description The name of the function to call. */
3141
+ name?: string;
3142
+ /** @description 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. */
3143
+ arguments?: string;
3144
+ };
3017
3145
  };
3018
- ChatCompletionMessage: {
3019
- /** @enum {string} */
3020
- role: 'system' | 'user' | 'assistant' | 'tool';
3021
- content?: string | null;
3022
- refusal?: string | null;
3146
+ /** @description The `tool` calls generated by the model, such as `function` calls. */
3147
+ ChatCompletionMessageToolCalls: components['schemas']['ChatCompletionMessageToolCall'][];
3148
+ /** @description Specifies a `tool` the model should use. Use to force the model to call a specific `function`. */
3149
+ ChatCompletionNamedToolChoice: {
3150
+ /**
3151
+ * @description The type of the `tool`. Currently, only `function` is supported.
3152
+ * @enum {string}
3153
+ */
3154
+ type: 'function';
3155
+ function: {
3156
+ /** @description The name of the `function` to call. */
3157
+ name: string;
3158
+ };
3023
3159
  };
3024
3160
  ChatCompletionRequest: {
3161
+ /** @description The name of the model to use. */
3025
3162
  model?: string;
3026
- messages: components['schemas']['Message'][];
3027
- functions?: components['schemas']['Function'][];
3028
- function_call?: ('auto' | 'none') | components['schemas']['FunctionChoice'];
3029
- tools?: (components['schemas']['Tool'] | components['schemas']['StaticTool'])[];
3030
- tool_choice?: ('auto' | 'none' | 'required') | components['schemas']['ToolChoice'];
3031
- /** @default false */
3032
- stream: boolean;
3033
- stream_options?: components['schemas']['StreamOptions'];
3034
- temperature?: number;
3035
- top_p?: number;
3036
- n?: number;
3037
- stop?: string | string[];
3038
- max_tokens?: number;
3039
- max_completion_tokens?: number;
3040
- presence_penalty?: number;
3041
- frequency_penalty?: number;
3042
- logit_bias?: {
3043
- [key: string]: number;
3044
- };
3163
+ /** @description A list of messages comprising the conversation so far. */
3164
+ messages: components['schemas']['ChatCompletionRequestMessage'][];
3165
+ /**
3166
+ * @deprecated
3167
+ * @description Deprecated in favor of `tools`.
3168
+ *
3169
+ * A list of functions the model may generate JSON inputs for.
3170
+ */
3171
+ functions?: components['schemas']['ChatCompletionFunction'][];
3172
+ /**
3173
+ * @deprecated
3174
+ * @description Deprecated in favor of `tool_choice`.
3175
+ *
3176
+ * Controls which (if any) `function` is called by the model.
3177
+ */
3178
+ function_call?: ('none' | 'auto') | components['schemas']['ChatCompletionFunctionCallOption'];
3179
+ /**
3180
+ * @description A list of tools the model may call. Currently, only `functions`
3181
+ * are supported as a tool. Use this to provide a list of `functions`
3182
+ * the model may generate JSON inputs for. A max of 128 functions
3183
+ * are supported.
3184
+ */
3185
+ tools?: components['schemas']['ChatCompletionTool'][];
3186
+ tool_choice?: components['schemas']['ChatCompletionToolChoiceOption'];
3187
+ /**
3188
+ * @deprecated
3189
+ * @description A list of Addons the Assistant can use.
3190
+ */
3191
+ addons?: components['schemas']['ChatCompletionAddon'][];
3192
+ /**
3193
+ * @description If set, partial message deltas will be sent. Tokens will be sent as data-only server-sent events as they become available.
3194
+ * @default false
3195
+ */
3196
+ stream: boolean | null;
3197
+ /**
3198
+ * @description What sampling temperature to use, between 0 and 2. Higher values such as 0.8 make the output more random, while lower values such as 0.2 make it more focused and deterministic.
3199
+ * @default 1
3200
+ */
3201
+ temperature: number;
3202
+ /**
3203
+ * @description An alternative to sampling with temperature, called nucleus sampling.
3204
+ * @default 1
3205
+ */
3206
+ top_p: number;
3207
+ /**
3208
+ * @description How many chat completion choices to generate for each input message.
3209
+ * @default 1
3210
+ */
3211
+ n: number | null;
3212
+ parallel_tool_calls?: components['schemas']['ParallelToolCalls'];
3213
+ /** @description Up to 4 sequences where the Assistant will stop generating further tokens. */
3214
+ stop?: (string | null) | string[];
3215
+ /**
3216
+ * @description The maximum number of tokens to generate by the Assistant.
3217
+ * @default infinity
3218
+ */
3219
+ max_tokens: number;
3220
+ /**
3221
+ * @description The maximum number of prompt tokens to handle in a request.
3222
+ * The feature is supported only by the model adapters and the Assistant.
3223
+ * @default infinity
3224
+ */
3225
+ max_prompt_tokens: number;
3226
+ /**
3227
+ * @description Note the parameter is only supported in OpenAI models.
3228
+ *
3229
+ * An upper bound for the number of tokens that can be generated
3230
+ * for a completion, including visible output tokens and reasoning tokens.
3231
+ */
3232
+ max_completion_tokens?: number | null;
3233
+ /**
3234
+ * @description A number between -2.0 and 2.0. Positive values impose a penalty on new tokens based on their appearance in the current text.
3235
+ * @default 0
3236
+ */
3237
+ presence_penalty: number;
3238
+ /**
3239
+ * @description A number between -2.0 and 2.0. Positive values apply a penalty to new tokens according to their existing frequency.
3240
+ * @default 0
3241
+ */
3242
+ frequency_penalty: number;
3243
+ /**
3244
+ * @description Modifies the likelihood of specified tokens appearing in the completion.
3245
+ *
3246
+ * Accepts a JSON object that maps tokens specified by their token ID
3247
+ * to an associated bias value from -100 to 100.
3248
+ * @default null
3249
+ */
3250
+ logit_bias: Record<string, never> | null;
3251
+ /**
3252
+ * @description This feature is in Beta.
3253
+ *
3254
+ * If specified, our system will make a best effort to sample deterministically.
3255
+ * Determinism is not guaranteed.
3256
+ */
3257
+ seed?: number | null;
3258
+ /** @description A unique identifier representing the end-user. */
3045
3259
  user?: string;
3046
- seed?: number;
3047
- logprobs?: boolean;
3048
- top_logprobs?: number;
3049
- /** @enum {string} */
3050
- reasoning_effort?: 'none' | 'minimal' | 'low' | 'medium' | 'high';
3260
+ /** @description An object specifying the format that the model must output. */
3051
3261
  response_format?: components['schemas']['ResponseFormatText'] | components['schemas']['ResponseFormatJsonObject'] | components['schemas']['ResponseFormatJsonSchema'];
3052
- parallel_tool_calls?: boolean;
3053
- max_prompt_tokens?: number;
3262
+ custom_fields?: components['schemas']['ChatCompletionsCustomFields'];
3263
+ };
3264
+ /** Assistant message */
3265
+ ChatCompletionRequestAssistantMessage: {
3266
+ /** @description The contents of the assistant message. Required unless `tool_calls` or `function_call` is specified. */
3267
+ content?: (string & (string | components['schemas']['ChatCompletionRequestAssistantMessageContentPart'][])) | null;
3268
+ custom_content?: components['schemas']['ChatCompletionRequestAssistantMessageCustomContent'];
3054
3269
  custom_fields?: components['schemas']['ChatCompletionRequestCustomFields'];
3055
- } & {
3056
- [key: string]: unknown;
3270
+ /** @description The refusal message by the assistant. */
3271
+ refusal?: string | null;
3272
+ /**
3273
+ * @description The role of the messages author, in this case `assistant`.
3274
+ * @enum {string}
3275
+ */
3276
+ role: 'assistant';
3277
+ /** @description An optional name for the participant. Provides the model information to differentiate between participants of the same role. */
3278
+ name?: string;
3279
+ tool_calls?: components['schemas']['ChatCompletionMessageToolCalls'];
3280
+ /**
3281
+ * @deprecated
3282
+ * @description Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model.
3283
+ */
3284
+ function_call?: {
3285
+ /** @description 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. */
3286
+ arguments: string;
3287
+ /** @description The name of the function to call. */
3288
+ name: string;
3289
+ } | null;
3290
+ };
3291
+ ChatCompletionRequestAssistantMessageContentPart: components['schemas']['ChatCompletionRequestMessageContentPartText'] | components['schemas']['ChatCompletionRequestMessageContentPartRefusal'];
3292
+ /** @description The custom content of the assistant message. */
3293
+ ChatCompletionRequestAssistantMessageCustomContent: {
3294
+ /** @description The internal state of the Assistant. This field can have an arbitrary set of fields with an arbitrary structure. */
3295
+ state?: Record<string, never>;
3296
+ /** @description List of attachments used to supply an additional output from the model. */
3297
+ attachments?: components['schemas']['RequestAttachment'][];
3298
+ /**
3299
+ * @description The JSON schema describing a form that the assistant prompts the user to fill in.
3300
+ * Given this schema, the user is expected to provide a JSON value in the next message in the `custom_content.form_value` field.
3301
+ */
3302
+ form_schema?: Record<string, never>;
3057
3303
  };
3304
+ /** @description DIAL-specific extensions of the Chat Completions message. */
3058
3305
  ChatCompletionRequestCustomFields: {
3059
- configuration?: {
3060
- [key: string]: unknown;
3061
- };
3062
3306
  cache_breakpoint?: components['schemas']['CacheBreakpoint'];
3063
- } & {
3064
- [key: string]: unknown;
3307
+ };
3308
+ /**
3309
+ * Developer message
3310
+ * @description Developer-provided instructions that the model should follow, regardless of messages sent by the user. With o1 models and newer, `developer` messages replace the previous `system` messages.
3311
+ */
3312
+ ChatCompletionRequestDeveloperMessage: {
3313
+ /** @description The contents of the developer message. */
3314
+ content: string | components['schemas']['ChatCompletionRequestDeveloperMessageContentPart'][];
3315
+ custom_fields?: components['schemas']['ChatCompletionRequestCustomFields'];
3316
+ /**
3317
+ * @description The role of the messages author, in this case `developer`.
3318
+ * @enum {string}
3319
+ */
3320
+ role: 'developer';
3321
+ /** @description An optional name for the participant. Provides the model information to differentiate between participants of the same role. */
3322
+ name?: string;
3323
+ };
3324
+ ChatCompletionRequestDeveloperMessageContentPart: components['schemas']['ChatCompletionRequestMessageContentPartText'];
3325
+ /**
3326
+ * Function message
3327
+ * @deprecated
3328
+ */
3329
+ ChatCompletionRequestFunctionMessage: {
3330
+ /**
3331
+ * @description The role of the messages author, in this case `function`.
3332
+ * @enum {string}
3333
+ */
3334
+ role: 'function';
3335
+ /** @description The contents of the function message. */
3336
+ content: string | null;
3337
+ custom_fields?: components['schemas']['ChatCompletionRequestCustomFields'];
3338
+ /** @description The name of the function to call. */
3339
+ name: string;
3340
+ };
3341
+ ChatCompletionRequestMessage: components['schemas']['ChatCompletionRequestDeveloperMessage'] | components['schemas']['ChatCompletionRequestSystemMessage'] | components['schemas']['ChatCompletionRequestAssistantMessage'] | components['schemas']['ChatCompletionRequestToolMessage'] | components['schemas']['ChatCompletionRequestFunctionMessage'] | components['schemas']['ChatCompletionRequestUserMessage'];
3342
+ /** Image content part */
3343
+ ChatCompletionRequestMessageContentPartImage: {
3344
+ /**
3345
+ * @description The type of the content part.
3346
+ * @enum {string}
3347
+ */
3348
+ type: 'image_url';
3349
+ image_url: {
3350
+ /**
3351
+ * Format: uri
3352
+ * @description Either a URL of the image or the base64 encoded image data.
3353
+ */
3354
+ url: string;
3355
+ /**
3356
+ * @description Specifies the detail level of the image. Learn more in the [Vision guide](https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/gpt-with-vision?tabs=rest%2Csystem-assigned%2Cresource#detail-parameter-settings-in-image-processing-low-high-auto).
3357
+ * @default auto
3358
+ * @enum {string}
3359
+ */
3360
+ detail: 'auto' | 'low' | 'high';
3361
+ };
3362
+ };
3363
+ /** Refusal content part */
3364
+ ChatCompletionRequestMessageContentPartRefusal: {
3365
+ /**
3366
+ * @description The type of the content part.
3367
+ * @enum {string}
3368
+ */
3369
+ type: 'refusal';
3370
+ /** @description The refusal message generated by the model. */
3371
+ refusal: string;
3372
+ };
3373
+ /** Text content part */
3374
+ ChatCompletionRequestMessageContentPartText: {
3375
+ /**
3376
+ * @description The type of the content part.
3377
+ * @enum {string}
3378
+ */
3379
+ type: 'text';
3380
+ /** @description The text content. */
3381
+ text: string;
3382
+ };
3383
+ /** System message */
3384
+ ChatCompletionRequestSystemMessage: {
3385
+ /** @description The contents of the system message. */
3386
+ content: string | components['schemas']['ChatCompletionRequestSystemMessageContentPart'][];
3387
+ custom_fields?: components['schemas']['ChatCompletionRequestCustomFields'];
3388
+ /**
3389
+ * @description The role of the messages author, in this case `system`.
3390
+ * @enum {string}
3391
+ */
3392
+ role: 'system';
3393
+ /** @description An optional name for the participant. Provides the model information to differentiate between participants of the same role. */
3394
+ name?: string;
3395
+ };
3396
+ ChatCompletionRequestSystemMessageContentPart: components['schemas']['ChatCompletionRequestMessageContentPartText'];
3397
+ /** Tool message */
3398
+ ChatCompletionRequestToolMessage: {
3399
+ /**
3400
+ * @description The role of the messages author, in this case `tool`.
3401
+ * @enum {string}
3402
+ */
3403
+ role: 'tool';
3404
+ /** @description The contents of the tool message. */
3405
+ content: string | components['schemas']['ChatCompletionRequestToolMessageContentPart'][];
3406
+ custom_fields?: components['schemas']['ChatCompletionRequestCustomFields'];
3407
+ /** @description Tool call that this message is responding to. */
3408
+ tool_call_id: string;
3409
+ };
3410
+ ChatCompletionRequestToolMessageContentPart: components['schemas']['ChatCompletionRequestMessageContentPartText'];
3411
+ /** User message */
3412
+ ChatCompletionRequestUserMessage: {
3413
+ /** @description The contents of the user message. */
3414
+ content: string | components['schemas']['ChatCompletionRequestUserMessageContentPart'][];
3415
+ custom_content?: components['schemas']['ChatCompletionRequestUserMessageCustomContent'];
3416
+ custom_fields?: components['schemas']['ChatCompletionRequestCustomFields'];
3417
+ /**
3418
+ * @description The role of the messages author, in this case `user`.
3419
+ * @enum {string}
3420
+ */
3421
+ role: 'user';
3422
+ /** @description An optional name for the participant. Provides the model information to differentiate between participants of the same role. */
3423
+ name?: string;
3424
+ };
3425
+ ChatCompletionRequestUserMessageContentPart: components['schemas']['ChatCompletionRequestMessageContentPartText'] | components['schemas']['ChatCompletionRequestMessageContentPartImage'];
3426
+ /** @description The custom content of the user message. */
3427
+ ChatCompletionRequestUserMessageCustomContent: {
3428
+ /** @description List of attachments used to supply an additional input for the model. */
3429
+ attachments?: components['schemas']['RequestAttachment'][];
3430
+ /** @description The JSON value corresponding to the JSON schema sent by the assistant in the previous message in the `custom_content.form_schema` field. */
3431
+ form_value?: Record<string, never>;
3432
+ };
3433
+ ChatCompletionResponseAttachment: {
3434
+ /**
3435
+ * @description In *streaming* chat completion responses, each attachment includes an `index` field
3436
+ * indicating its position in the final ordered list. This field is required because
3437
+ * attachments may arrive out of order, and the client must reconstruct the correct
3438
+ * sequence using `index`.
3439
+ * <br><br>
3440
+ * In *non-streaming* responses, the `index` field is omitted because an attachment's
3441
+ * position is already determined by its place in the returned list.
3442
+ */
3443
+ index: number;
3444
+ /**
3445
+ * @description The content type of the attachment. Should be one of the MIME types.
3446
+ * @default text/markdown
3447
+ */
3448
+ type: string;
3449
+ /** @description The title of the attachment. */
3450
+ title?: string;
3451
+ /**
3452
+ * @description Should follow the format described in the MIME standard for `type`.
3453
+ *
3454
+ * It is <span style="color: #f604fe;">mandatory</span> for the attachment to have one of the following fields (never both): `data` or `url`.
3455
+ */
3456
+ data?: string;
3457
+ /**
3458
+ * @description The content of `url` should follow the format described in the MIME standard for `type`.
3459
+ *
3460
+ * It is <span style="color: #f604fe;">mandatory</span> for the attachment to have one of the following fields (never both): `data` or `url`.
3461
+ */
3462
+ url?: string;
3463
+ /** @description The content type of `reference_url`. Should be one of the MIME types. */
3464
+ reference_type?: string;
3465
+ /** @description If `reference_type` is specified, the content of `reference_url` should follow the format described in the MIME standard for `reference_type`. */
3466
+ reference_url?: string;
3467
+ };
3468
+ /** @description The custom content of a message. */
3469
+ ChatCompletionResponseCustomContent: {
3470
+ /** @description List of attachments. */
3471
+ attachments?: components['schemas']['ChatCompletionResponseAttachment'][];
3472
+ /** @description The intermediate stages that the Assistant went through to generate the response. */
3473
+ readonly stages?: components['schemas']['ChatCompletionResponseStage'][];
3474
+ /** @description The internal state of the Assistant. This field can have an arbitrary set of fields with an arbitrary structure. In case of a streaming, the state is published fully in one chunk. */
3475
+ state?: Record<string, never>;
3476
+ };
3477
+ /** @description The Assistant message. */
3478
+ ChatCompletionResponseMessage: {
3479
+ /**
3480
+ * @description The role of the author of the response message.
3481
+ * @enum {string}
3482
+ */
3483
+ role: 'assistant';
3484
+ /** @description The refusal message generated by the model. */
3485
+ refusal: string | null;
3486
+ /** @description The contents of the message. `content` is set for all messages except messages with tool calls, function calls and refusals. */
3487
+ content: string | null;
3488
+ custom_content?: components['schemas']['ChatCompletionResponseCustomContent'];
3489
+ /** @description The tool calls generated by the model, such as function calls. */
3490
+ tool_calls?: components['schemas']['ChatCompletionMessageToolCall'][];
3491
+ function_call?: components['schemas']['ChatCompletionFunctionCall'];
3492
+ };
3493
+ ChatCompletionResponseStage: {
3494
+ /**
3495
+ * @description In *streaming* chat completion responses, each stage includes an `index` field
3496
+ * indicating its position in the final ordered list. This field is required because
3497
+ * stages may arrive out of order, and the client must reconstruct the correct
3498
+ * sequence using `index`.
3499
+ * <br><br>
3500
+ * In *non-streaming* responses, the `index` field is omitted because a stage's
3501
+ * position is already determined by its place in the returned list.
3502
+ */
3503
+ index: number;
3504
+ /** @description The name of the stage. */
3505
+ name: string;
3506
+ /** @description The contents of the stage. */
3507
+ content?: string;
3508
+ /** @description List of attachments to the stage. */
3509
+ attachments?: components['schemas']['ChatCompletionResponseAttachment'][];
3510
+ /**
3511
+ * @description The execution status of the stage. Available status values:
3512
+ *
3513
+ * * `null`: The stage is in progress.
3514
+ * * `completed`: The stage is completed.
3515
+ * * `failed`: The stage is failed.
3516
+ */
3517
+ status: string | null;
3518
+ };
3519
+ /** @description The Assistant work statistics. */
3520
+ ChatCompletionResponseStatistics: {
3521
+ /** @description Statistics of tokens used in models by the Assistant. In case of streaming, the statistics is published fully in one chunk. */
3522
+ usage_per_model?: {
3523
+ /**
3524
+ * @description In *streaming* chat completion responses, each model usage includes an `index` field
3525
+ * indicating its position in the final ordered list. This field is required because
3526
+ * model usages may arrive out of order, and the client must reconstruct the correct
3527
+ * sequence using `index`.
3528
+ * <br><br>
3529
+ * In *non-streaming* responses, the `index` field is omitted because the position of a model usage is already determined by its place in the returned list.
3530
+ */
3531
+ index?: number;
3532
+ /** @description The model name. */
3533
+ model?: string;
3534
+ /** @description The number of tokens in the request to the model. */
3535
+ prompt_tokens?: number;
3536
+ /** @description The number of tokens in the response from the model. */
3537
+ completion_tokens?: number;
3538
+ /** @description The sum of prompt and completion tokens. */
3539
+ total_tokens?: number;
3540
+ }[];
3541
+ /**
3542
+ * @description The list of indices of messages that were discarded by the Assistant.
3543
+ *
3544
+ * Returned only when `max_prompt_tokens` was set in the request.
3545
+ */
3546
+ discarded_messages?: number[];
3547
+ };
3548
+ /** @description A chat completion delta generated by streamed model responses. */
3549
+ ChatCompletionStreamResponseDelta: {
3550
+ /**
3551
+ * @description The role of the author of this message.
3552
+ * @enum {string}
3553
+ */
3554
+ role?: 'assistant';
3555
+ /** @description The refusal message generated by the model. */
3556
+ refusal?: string | null;
3557
+ /** @description The contents of the chunk message. */
3558
+ content?: string | null;
3559
+ custom_content?: components['schemas']['ChatCompletionResponseCustomContent'];
3560
+ /**
3561
+ * @deprecated
3562
+ * @description Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model.
3563
+ */
3564
+ function_call?: {
3565
+ /** @description 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. */
3566
+ arguments?: string;
3567
+ /** @description The name of the function to call. */
3568
+ name?: string;
3569
+ };
3570
+ tool_calls?: components['schemas']['ChatCompletionMessageToolCallChunk'][];
3571
+ };
3572
+ ChatCompletionTool: {
3573
+ /**
3574
+ * @description The type of the tool. Currently, only `function` is supported.
3575
+ * @enum {string}
3576
+ */
3577
+ type: 'function';
3578
+ function: components['schemas']['FunctionObject'];
3579
+ custom_fields?: components['schemas']['ToolCustomFields'];
3580
+ };
3581
+ /**
3582
+ * @description Controls which (if any) tool is called by the model.
3583
+ *
3584
+ * `none` means the model will not call any `tool` and instead generates a `message`.
3585
+ *
3586
+ * `auto` means the model can pick between generating a `message` or calling one or more `tools`.
3587
+ * `required` means the model must call one or more `tools`.
3588
+ *
3589
+ * Specifying a particular `tool` via `{"type": "function", "function": {"name": "my_function"}}` forces the model to call that `tool`.
3590
+ *
3591
+ * `none` is the default when no `tools` are present.
3592
+ * `auto` is the default if `tools` are present.
3593
+ */
3594
+ ChatCompletionToolChoiceOption: ('none' | 'auto' | 'required') | components['schemas']['ChatCompletionNamedToolChoice'];
3595
+ /** @description Additional DIAL-specific parameters for a chat completion request. */
3596
+ ChatCompletionsCustomFields: {
3597
+ /**
3598
+ * @description The object that represents configuration of the deployment.
3599
+ * The schema of the object is specific for each deployment and provided by the endpoint
3600
+ * `GET /v1/deployments/{deployment_name}/configuration`.
3601
+ * <br><br>
3602
+ * A deployment supports configuration if its listing, retrieved by `GET /openai/deployments/{deployment_name}`, has a field `features.configuration` set to **true**.
3603
+ * <br><br>
3604
+ * Certain models connected via DIAL adapters are configurable. For detailed configuration information, refer to the documentation of each adapter:
3605
+ * - [OpenAI Adapter](https://github.com/epam/ai-dial-adapter-openai/?tab=readme-ov-file#configurable-models)
3606
+ * - [Google VertexAI Adapter](https://github.com/epam/ai-dial-adapter-vertexai/?tab=readme-ov-file#configurable-models)
3607
+ * - [AWS Bedrock Adapter](https://github.com/epam/ai-dial-adapter-bedrock/?tab=readme-ov-file#configurable-models)
3608
+ */
3609
+ configuration?: Record<string, never>;
3065
3610
  };
3066
3611
  CodeInterpreterExecuteRequest: {
3067
3612
  code?: string;
@@ -3107,16 +3652,6 @@ interface components {
3107
3652
  sessionId?: string;
3108
3653
  };
3109
3654
  CollectionMetadataBase: components['schemas']['MetadataBase'][];
3110
- CompletionTokensDetails: {
3111
- reasoning_tokens?: number;
3112
- };
3113
- CompletionUsage: {
3114
- prompt_tokens?: number;
3115
- completion_tokens?: number;
3116
- total_tokens?: number;
3117
- prompt_tokens_details?: components['schemas']['PromptTokensDetails'];
3118
- completion_tokens_details?: components['schemas']['CompletionTokensDetails'];
3119
- };
3120
3655
  Config: {
3121
3656
  applicationTypeSchemas?: components['schemas']['MapStringString'];
3122
3657
  applications?: components['schemas']['MapStringApplication'];
@@ -3184,53 +3719,90 @@ interface components {
3184
3719
  week?: number;
3185
3720
  };
3186
3721
  CreateChatCompletionResponse: {
3722
+ /** @description The ID of the response. */
3723
+ id?: string;
3724
+ /** @description Object type. Always is `chat.completion` for non-streaming. */
3725
+ object?: string;
3726
+ /** @description The response timestamp. The time in seconds since the epoch. */
3727
+ created?: number;
3728
+ /** @description The name of the model that generated the response. May not be the same as the deployment name. */
3729
+ model?: string;
3730
+ /** @description List of generated messages. Contains _n_ items. */
3731
+ choices?: {
3732
+ /** @description The index of the choice from `0` to `n - 1`. */
3733
+ index: number;
3734
+ message: components['schemas']['ChatCompletionResponseMessage'];
3735
+ /**
3736
+ * @description The reason indicating the completion of the choice generation process. The possible reasons:
3737
+ *
3738
+ * * `stop`: Successful generation.
3739
+ * * `length`: The generation was stopped because it surpassed the available number of tokens.
3740
+ * * `function_call`: The Assistant decided to call a function.
3741
+ * * `tool_calls`: The Assistant decided to call a tool.
3742
+ * * `content_filter`: Omitted content due to a flag from content filters.
3743
+ */
3744
+ finish_reason: string | null;
3745
+ }[];
3746
+ /** @description This field contains information about the tokens from the model that were used to generate the response. */
3747
+ usage?: {
3748
+ /** @description The number of tokens in the request to the model. */
3749
+ prompt_tokens?: number;
3750
+ /** @description The number of tokens in the response from the model. */
3751
+ completion_tokens?: number;
3752
+ /** @description The sum of prompt and completion tokens. */
3753
+ total_tokens?: number;
3754
+ };
3755
+ statistics?: components['schemas']['ChatCompletionResponseStatistics'];
3756
+ /** @description Can be used in conjunction with the `seed` request parameter to understand when backend changes have been made that might impact determinism. */
3757
+ system_fingerprint?: string;
3758
+ };
3759
+ /** @description Represents a streamed chunk of a chat completion response returned by model, based on the provided input. */
3760
+ CreateChatCompletionStreamResponse: {
3761
+ /** @description A unique identifier for the chat completion. Each chunk has the same ID. */
3187
3762
  id: string;
3188
- /** @enum {string} */
3189
- object: 'chat.completion';
3190
- /** Format: int64 */
3763
+ /**
3764
+ * @description The object type, which is always `chat.completion.chunk`.
3765
+ * @enum {string}
3766
+ */
3767
+ object: 'chat.completion.chunk';
3768
+ /** @description The Unix timestamp (in seconds) of when the chat completion was created. Each chunk has the same timestamp. */
3191
3769
  created: number;
3770
+ /** @description The model name that generated the response. May not be the same as the deployment name. */
3192
3771
  model: string;
3193
- choices: components['schemas']['ChatCompletionChoice'][];
3194
- usage?: components['schemas']['CompletionUsage'];
3195
- statistics?: components['schemas']['Statistics'];
3196
- };
3197
- CreateChatCompletionStreamChoice: {
3198
- index: number;
3199
- finish_reason?: components['schemas']['FinishReason'];
3200
- delta: components['schemas']['CreateChatCompletionStreamDelta'];
3201
- };
3202
- CreateChatCompletionStreamDelta: {
3203
- /** @enum {string} */
3204
- role?: 'assistant';
3205
- content?: string;
3206
- function_call?: components['schemas']['FunctionCall'];
3207
- tool_calls?: components['schemas']['StreamToolCall'][];
3208
- custom_content?: components['schemas']['CustomContent'];
3209
- };
3210
- CreateChatCompletionStreamResponse: {
3211
- id?: string;
3212
- model?: string;
3213
- /** Format: int64 */
3214
- created?: number;
3215
- /** @enum {string} */
3216
- object?: 'chat.completion.chunk';
3217
- choices?: components['schemas']['CreateChatCompletionStreamChoice'][];
3218
- usage?: components['schemas']['Usage'];
3219
- statistics?: components['schemas']['Statistics'];
3772
+ /**
3773
+ * @description This fingerprint represents the backend configuration that the model runs with.
3774
+ * Can be used in conjunction with the `seed` request parameter to understand when backend changes have been made that might impact determinism.
3775
+ */
3776
+ system_fingerprint?: string;
3777
+ /** @description A list of generated chunks. */
3778
+ choices: {
3779
+ /** @description The index of the choice from 0 to _n - 1_ */
3780
+ index: number;
3781
+ delta: components['schemas']['ChatCompletionStreamResponseDelta'];
3782
+ /**
3783
+ * @description The reason the model stopped generating tokens. This will be `stop` if the model hit a natural stop point or a provided stop sequence,
3784
+ *
3785
+ * `length` if the maximum number of tokens specified in the request was reached,
3786
+ *
3787
+ * `content_filter` if content was omitted due to a flag from our content filters,
3788
+ *
3789
+ * `tool_calls` if the model called a tool, or `function_call` (deprecated) if the model called a function.
3790
+ */
3791
+ finish_reason: string | null;
3792
+ }[];
3793
+ /** @description This field contains information about used models tokens for generation of the response. In case of streaming, the usage is published fully in one chunk. */
3794
+ usage?: {
3795
+ /** @description The number of tokens in the request to the model. */
3796
+ prompt_tokens: number;
3797
+ /** @description The number of tokens in the response from the model. */
3798
+ completion_tokens: number;
3799
+ /** @description The sum of prompt and completion tokens. */
3800
+ total_tokens: number;
3801
+ };
3802
+ statistics?: components['schemas']['ChatCompletionResponseStatistics'];
3220
3803
  };
3221
3804
  /** @enum {string} */
3222
3805
  CredentialsLevel: 'GLOBAL' | 'APPLICATION' | 'USER';
3223
- CustomContent: {
3224
- stages?: components['schemas']['Stage'][];
3225
- attachments?: components['schemas']['Attachment'][];
3226
- state?: {
3227
- [key: string]: unknown;
3228
- };
3229
- form_value?: unknown;
3230
- form_schema?: unknown;
3231
- } & {
3232
- [key: string]: unknown;
3233
- };
3234
3806
  DeleteNotificationRequest: {
3235
3807
  ids?: string[];
3236
3808
  };
@@ -3238,32 +3810,79 @@ interface components {
3238
3810
  DeploymentInterface: {
3239
3811
  base_url?: string;
3240
3812
  };
3241
- Embedding: {
3242
- embedding: string | number[];
3243
- index: number;
3244
- /** @enum {string} */
3245
- object?: 'embedding';
3246
- };
3247
3813
  EmbeddingResponse: {
3248
- /** @description A list of generated vectors. */
3249
- data: components['schemas']['Embedding'][];
3814
+ /** @description Object type. Always is `list`. */
3815
+ object: string;
3250
3816
  /** @description The name of the model that generated the response. */
3251
3817
  model: string;
3252
- /**
3253
- * @description Object type. Always is `list`.
3254
- * @enum {string}
3255
- */
3256
- object?: 'list';
3818
+ /** @description A list of generated vectors. */
3819
+ data: {
3820
+ /** @description The index of the embedding from `0` to `number of regular and custom inputs in the request - 1`. */
3821
+ index: number;
3822
+ /** @description Object type. Always is `embedding`. */
3823
+ object: string;
3824
+ /** @description Embedding output corresponding to the `index`-th embedding input. It's either an array of floats or base64-encoded vector depending on the value of `encoding_format` request parameter. */
3825
+ embedding: number[] | string;
3826
+ }[];
3257
3827
  /** @description This field contains information about the tokens from the model that were used to generate the response. */
3258
- usage: components['schemas']['Usage'];
3828
+ usage: {
3829
+ /** @description The number of tokens in the request to the model. */
3830
+ prompt_tokens: number;
3831
+ /** @description The number of tokens in the request to the model. */
3832
+ total_tokens: number;
3833
+ };
3259
3834
  };
3260
- EmbeddingsRequest: {
3261
- custom_fields?: components['schemas']['EmbeddingsRequestCustomFields'];
3262
- } & components['schemas']['AzureEmbeddingsRequest'];
3263
- EmbeddingsRequestCustomFields: {
3835
+ /** @description Additional parameters for an embedding model. */
3836
+ EmbeddingsCustomFields: {
3837
+ /**
3838
+ * @description Type of embedding to embed an input with.
3839
+ *
3840
+ * The particular values of this parameter are specific for particular models.
3841
+ *
3842
+ * **Note:** embedding types may not be supported by some models.
3843
+ */
3264
3844
  type?: string;
3845
+ /**
3846
+ * @description Allows to specify an instruction prompt for an instructor-like embedding model.
3847
+ *
3848
+ * **Note:** instruction may not be supported by some models.
3849
+ */
3265
3850
  instruction?: string;
3266
3851
  };
3852
+ /** @description The custom embedding inputs that represent multi-modal inputs (e.g. images and video) along with compound inputs (e.g. a title for an image and the image itself). */
3853
+ EmbeddingsCustomInput: components['schemas']['EmbeddingsCustomInputElement'][];
3854
+ /** @description An embedding input composed of multiple strings and attachments. */
3855
+ EmbeddingsCustomInputCompoundElement: (string | components['schemas']['RequestAttachment'])[];
3856
+ /** @description A particular embedding input which embeddings model translates to an embedding vector. */
3857
+ EmbeddingsCustomInputElement: string | components['schemas']['RequestAttachment'] | components['schemas']['EmbeddingsCustomInputCompoundElement'];
3858
+ EmbeddingsRequest: {
3859
+ /**
3860
+ * @description The input text to generate embeddings for. It can be either:
3861
+ * - a string,
3862
+ * - an array of strings,
3863
+ * - an array of token ids <i>(representing a single tokenized string)</i> and
3864
+ * - an array of arrays of token ids <i>(representing an array of tokenized strings)</i>.
3865
+ *
3866
+ * **Note:** representation of strings as an array of token ids may not be supported by certain models.
3867
+ */
3868
+ input: string | string[] | number[] | number[][];
3869
+ custom_input?: components['schemas']['EmbeddingsCustomInput'];
3870
+ /** @description A unique identifier representing the end-user. */
3871
+ user?: string;
3872
+ /**
3873
+ * @description The format in which the embeddings are returned.
3874
+ * @default float
3875
+ * @enum {string}
3876
+ */
3877
+ encoding_format: 'float' | 'base64';
3878
+ /**
3879
+ * @description The number of dimensions the resulting output embeddings should have.
3880
+ *
3881
+ * **Note:** instruction may not be supported by some models.
3882
+ */
3883
+ dimensions?: number;
3884
+ custom_fields?: components['schemas']['EmbeddingsCustomFields'];
3885
+ };
3267
3886
  EntityMetadata: {
3268
3887
  name?: string;
3269
3888
  status?: string;
@@ -3376,28 +3995,6 @@ interface components {
3376
3995
  updatedAt?: number;
3377
3996
  url?: string;
3378
3997
  };
3379
- /** @enum {string} */
3380
- FinishReason: 'stop' | 'length' | 'function_call' | 'tool_calls' | 'content_filter';
3381
- Function: {
3382
- name: string;
3383
- /** @default false */
3384
- strict: boolean;
3385
- description?: string;
3386
- parameters?: {
3387
- [key: string]: unknown;
3388
- };
3389
- } & {
3390
- [key: string]: unknown;
3391
- };
3392
- FunctionCall: {
3393
- name?: string;
3394
- arguments?: string;
3395
- };
3396
- FunctionChoice: {
3397
- name: string;
3398
- } & {
3399
- [key: string]: unknown;
3400
- };
3401
3998
  FunctionMapping: {
3402
3999
  chat_completion?: string;
3403
4000
  configuration?: string;
@@ -3405,6 +4002,24 @@ interface components {
3405
4002
  tokenize?: string;
3406
4003
  truncate_prompt?: string;
3407
4004
  };
4005
+ FunctionObject: {
4006
+ /** @description A description of what the `function` does, used by the model to choose when and how to call the `function`. */
4007
+ description?: string;
4008
+ /** @description 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. */
4009
+ name: string;
4010
+ parameters?: components['schemas']['FunctionParameters'];
4011
+ /**
4012
+ * @description 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](docs/guides/function-calling).
4013
+ * @default false
4014
+ */
4015
+ strict: boolean | null;
4016
+ };
4017
+ /**
4018
+ * @description The parameters the `function` accepts, described as a JSON Schema object. See the [guide](https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format.
4019
+ *
4020
+ * Omitting `parameters` defines a `function` with an empty parameter list.
4021
+ */
4022
+ FunctionParameters: Record<string, never>;
3408
4023
  /** @enum {string} */
3409
4024
  FunctionStatus: 'DEPLOYING' | 'UNDEPLOYING' | 'DEPLOYED' | 'UNDEPLOYED' | 'FAILED';
3410
4025
  GlobalSettings: {
@@ -3415,26 +4030,6 @@ interface components {
3415
4030
  skipped?: components['schemas']['SkippedEntity'][];
3416
4031
  status?: string;
3417
4032
  };
3418
- ImageURL: {
3419
- url: string;
3420
- /** @enum {string} */
3421
- detail?: 'auto' | 'low' | 'high';
3422
- } & {
3423
- [key: string]: unknown;
3424
- };
3425
- InputAudio: {
3426
- data: string;
3427
- format: string;
3428
- } & {
3429
- [key: string]: unknown;
3430
- };
3431
- InputFile: {
3432
- file_data?: string;
3433
- file_id?: string;
3434
- filename?: string;
3435
- } & {
3436
- [key: string]: unknown;
3437
- };
3438
4033
  Interceptor: {
3439
4034
  author?: string;
3440
4035
  createdAt?: number;
@@ -3558,7 +4153,10 @@ interface components {
3558
4153
  resourceTypes?: components['schemas']['ResourceTypes'][];
3559
4154
  with?: string;
3560
4155
  };
3561
- LocalizedValue: string | components['schemas']['MapStringString'];
4156
+ LocalizedValue: {
4157
+ localeMap?: components['schemas']['MapStringString'];
4158
+ plainValue?: string;
4159
+ } & (string | components['schemas']['MapStringString']);
3562
4160
  MapStringApplication: {
3563
4161
  [key: string]: components['schemas']['Application'];
3564
4162
  };
@@ -3580,6 +4178,9 @@ interface components {
3580
4178
  MapStringLimit: {
3581
4179
  [key: string]: components['schemas']['Limit'];
3582
4180
  };
4181
+ MapStringLimitStats: {
4182
+ [key: string]: components['schemas']['LimitStats'];
4183
+ };
3583
4184
  MapStringList: {
3584
4185
  [key: string]: components['schemas']['Rule'][];
3585
4186
  };
@@ -3624,76 +4225,6 @@ interface components {
3624
4225
  [key: string]: unknown;
3625
4226
  };
3626
4227
  };
3627
- Message: {
3628
- /** @enum {string} */
3629
- role: 'system' | 'developer' | 'user' | 'assistant' | 'function' | 'tool';
3630
- content?: string | components['schemas']['MessageContentPart'][];
3631
- custom_content?: components['schemas']['CustomContent'];
3632
- custom_fields?: components['schemas']['MessageCustomFields'];
3633
- name?: string;
3634
- tool_calls?: components['schemas']['ToolCall'][];
3635
- tool_call_id?: string;
3636
- function_call?: components['schemas']['FunctionCall'];
3637
- refusal?: string;
3638
- } & {
3639
- [key: string]: unknown;
3640
- };
3641
- MessageContentAudioPart: {
3642
- /**
3643
- * @description discriminator enum property added by openapi-typescript
3644
- * @enum {string}
3645
- */
3646
- type: 'MessageContentAudioPart';
3647
- input_audio: components['schemas']['InputAudio'];
3648
- } & {
3649
- [key: string]: unknown;
3650
- };
3651
- MessageContentFilePart: {
3652
- /**
3653
- * @description discriminator enum property added by openapi-typescript
3654
- * @enum {string}
3655
- */
3656
- type: 'MessageContentFilePart';
3657
- file: components['schemas']['InputFile'];
3658
- } & {
3659
- [key: string]: unknown;
3660
- };
3661
- MessageContentImagePart: {
3662
- /**
3663
- * @description discriminator enum property added by openapi-typescript
3664
- * @enum {string}
3665
- */
3666
- type: 'MessageContentImagePart';
3667
- image_url: components['schemas']['ImageURL'];
3668
- } & {
3669
- [key: string]: unknown;
3670
- };
3671
- MessageContentPart: components['schemas']['MessageContentTextPart'] | components['schemas']['MessageContentImagePart'] | components['schemas']['MessageContentFilePart'] | components['schemas']['MessageContentAudioPart'] | components['schemas']['MessageContentRefusalPart'];
3672
- MessageContentRefusalPart: {
3673
- /**
3674
- * @description discriminator enum property added by openapi-typescript
3675
- * @enum {string}
3676
- */
3677
- type: 'MessageContentRefusalPart';
3678
- refusal: string;
3679
- } & {
3680
- [key: string]: unknown;
3681
- };
3682
- MessageContentTextPart: {
3683
- /**
3684
- * @description discriminator enum property added by openapi-typescript
3685
- * @enum {string}
3686
- */
3687
- type: 'MessageContentTextPart';
3688
- text: string;
3689
- } & {
3690
- [key: string]: unknown;
3691
- };
3692
- MessageCustomFields: {
3693
- cache_breakpoint?: components['schemas']['CacheBreakpoint'];
3694
- } & {
3695
- [key: string]: unknown;
3696
- };
3697
4228
  MetadataBase: components['schemas']['ResourceFolderMetadata'] | components['schemas']['ResourceItemMetadata'];
3698
4229
  Model: {
3699
4230
  author?: string;
@@ -3811,6 +4342,11 @@ interface components {
3811
4342
  redirect_uri?: string;
3812
4343
  scopes?: string[];
3813
4344
  };
4345
+ /**
4346
+ * @description Whether to enable parallel `function` calling during the `tool` use.
4347
+ * @default true
4348
+ */
4349
+ ParallelToolCalls: boolean;
3814
4350
  Pattern: Record<string, never>;
3815
4351
  PerRequestReceiver: {
3816
4352
  receiver?: string;
@@ -3839,10 +4375,6 @@ interface components {
3839
4375
  id?: string;
3840
4376
  name?: string;
3841
4377
  };
3842
- PromptTokensDetails: {
3843
- cached_tokens?: number;
3844
- cache_write_tokens?: number;
3845
- };
3846
4378
  ProxyRequest: {
3847
4379
  [key: string]: unknown;
3848
4380
  };
@@ -3882,6 +4414,31 @@ interface components {
3882
4414
  comment?: string;
3883
4415
  url?: string;
3884
4416
  };
4417
+ RequestAttachment: {
4418
+ /**
4419
+ * @description The content type of the attachment. Should be one of the MIME types.
4420
+ * @default text/markdown
4421
+ */
4422
+ type: string;
4423
+ /** @description The title of the attachment. */
4424
+ title?: string;
4425
+ /**
4426
+ * @description Should follow the format described in the MIME standard for `type`.
4427
+ *
4428
+ * It is <span style="color: #f604fe;">mandatory</span> for the attachment to have exactly one of the following fields (never both): `data` or `url`.
4429
+ */
4430
+ data?: string;
4431
+ /**
4432
+ * @description The content of `url` should follow the format described in the MIME standard for `type`.
4433
+ *
4434
+ * It is <span style="color: #f604fe;">mandatory</span> for the attachment to have exactly one of the following fields (never both): `data` or `url`.
4435
+ */
4436
+ url?: string;
4437
+ /** @description The content type of `reference_url`. Should be one of the MIME types. */
4438
+ reference_type?: string;
4439
+ /** @description If `reference_type` is specified, the content of `reference_url` should follow the format described in the MIME standard for `reference_type`. */
4440
+ reference_url?: string;
4441
+ };
3885
4442
  /** @enum {string} */
3886
4443
  ResourceAccessType: 'READ' | 'WRITE' | 'SHARE';
3887
4444
  ResourceAuthSettings: {
@@ -4112,48 +4669,6 @@ interface components {
4112
4669
  id?: string;
4113
4670
  reason?: string;
4114
4671
  };
4115
- Stage: {
4116
- name: string;
4117
- status: components['schemas']['Status'];
4118
- content?: string;
4119
- attachments?: components['schemas']['Attachment'][];
4120
- } & {
4121
- [key: string]: unknown;
4122
- };
4123
- StaticFunction: {
4124
- name: string;
4125
- description?: string;
4126
- configuration?: {
4127
- [key: string]: unknown;
4128
- };
4129
- } & {
4130
- [key: string]: unknown;
4131
- };
4132
- StaticTool: {
4133
- /** @enum {string} */
4134
- type: 'static_function';
4135
- static_function: components['schemas']['StaticFunction'];
4136
- } & {
4137
- [key: string]: unknown;
4138
- };
4139
- Statistics: {
4140
- usage_per_model?: components['schemas']['UsagePerModel'][];
4141
- discarded_messages?: number[];
4142
- };
4143
- /** @enum {string} */
4144
- Status: 'completed' | 'failed';
4145
- StreamOptions: {
4146
- include_usage?: boolean;
4147
- } & {
4148
- [key: string]: unknown;
4149
- };
4150
- StreamToolCall: {
4151
- index?: number;
4152
- id?: string;
4153
- /** @enum {string} */
4154
- type?: 'function';
4155
- function?: components['schemas']['FunctionCall'];
4156
- };
4157
4672
  SubscribeResourcesRequest: {
4158
4673
  resources?: components['schemas']['ResourceLink'][];
4159
4674
  };
@@ -4205,14 +4720,6 @@ interface components {
4205
4720
  status: 'TokenizeSuccess';
4206
4721
  token_count: number;
4207
4722
  };
4208
- Tool: {
4209
- /** @enum {string} */
4210
- type: 'function';
4211
- function: components['schemas']['Function'];
4212
- custom_fields?: components['schemas']['ToolCustomFields'];
4213
- } & {
4214
- [key: string]: unknown;
4215
- };
4216
4723
  ToolAnnotations: {
4217
4724
  title?: string;
4218
4725
  /** @description Tool does not modify state. */
@@ -4226,24 +4733,11 @@ interface components {
4226
4733
  /** @description Result should be returned directly to the caller. */
4227
4734
  returnDirect?: boolean;
4228
4735
  };
4229
- ToolCall: {
4230
- index?: number;
4231
- id?: string;
4232
- /** @enum {string} */
4233
- type?: 'function';
4234
- function?: components['schemas']['ToolCallFunction'];
4235
- };
4236
- ToolCallFunction: {
4237
- name?: string;
4238
- arguments?: string;
4239
- };
4240
- ToolChoice: {
4241
- /** @enum {string} */
4242
- type: 'function';
4243
- function: components['schemas']['FunctionChoice'];
4244
- } & {
4245
- [key: string]: unknown;
4246
- };
4736
+ /**
4737
+ * @description The type of the `tool` call, in this case `function`.
4738
+ * @enum {string}
4739
+ */
4740
+ ToolCallType: 'function';
4247
4741
  ToolCustomFields: {
4248
4742
  cache_breakpoint?: components['schemas']['CacheBreakpoint'];
4249
4743
  } & {
@@ -4366,22 +4860,6 @@ interface components {
4366
4860
  tier?: number;
4367
4861
  weight?: number;
4368
4862
  };
4369
- Usage: {
4370
- prompt_tokens?: number;
4371
- completion_tokens?: number;
4372
- total_tokens?: number;
4373
- prompt_tokens_details?: components['schemas']['PromptTokensDetails'];
4374
- completion_tokens_details?: components['schemas']['CompletionTokensDetails'];
4375
- };
4376
- UsagePerModel: {
4377
- index?: number;
4378
- model?: string;
4379
- prompt_tokens?: number;
4380
- completion_tokens?: number;
4381
- total_tokens?: number;
4382
- prompt_tokens_details?: components['schemas']['PromptTokensDetails'];
4383
- completion_tokens_details?: components['schemas']['CompletionTokensDetails'];
4384
- };
4385
4863
  UserInfoResponse: {
4386
4864
  /** @description List of user or API key authorization roles */
4387
4865
  roles?: string[];
@@ -4394,6 +4872,13 @@ interface components {
4394
4872
  [key: string]: string[];
4395
4873
  };
4396
4874
  };
4875
+ UserLimitStats: {
4876
+ dayCostStats?: components['schemas']['CostItemLimitStats'];
4877
+ deployments?: components['schemas']['MapStringLimitStats'];
4878
+ minuteCostStats?: components['schemas']['CostItemLimitStats'];
4879
+ monthCostStats?: components['schemas']['CostItemLimitStats'];
4880
+ weekCostStats?: components['schemas']['CostItemLimitStats'];
4881
+ };
4397
4882
  ValidationResult: {
4398
4883
  entityId?: string;
4399
4884
  error?: string;
@@ -8091,6 +8576,15 @@ interface operations {
8091
8576
  };
8092
8577
  cookie?: never;
8093
8578
  };
8579
+ /**
8580
+ * @description An arbitrary string in JSON format representing the structure of the application.
8581
+ *
8582
+ * **Important**: Applications may or may not include an `application_type_schema_id`, which affects their creation and modification mechanics. If `application_type_schema_id` is absent or `NULL`, `application_properties` are not required. If you provide `application_type_schema_id` but `application_properties` are `NULL`, the application is a "stub" and can be updated later, but completion requests will not be possible. When you supply `application_properties`, they must be a valid JSON object that conforms to the schema specified by `application_type_schema_id`. An invalid JSON object will result in a bad request status.
8583
+ *
8584
+ * If you do not provide `application_type_schema_id`, refer to [DIAL Core](https://github.com/epam/ai-dial-core/blob/development/docs/dynamic-settings/applications.md) documentation to learn about available properties of applications you can pass in the JSON object describing the structure of the application.
8585
+ *
8586
+ * **Note**: When `applicationTypeSchemaId` and `applicationProperties` are specified, parameters defined in the corresponding JSON schema will take precedence and will override the corresponding parameters specified in the `application` object.
8587
+ */
8094
8588
  requestBody: {
8095
8589
  content: {
8096
8590
  'application/json': components['schemas']['Application'];
@@ -9388,6 +9882,7 @@ interface operations {
9388
9882
  };
9389
9883
  cookie?: never;
9390
9884
  };
9885
+ /** @description A JSON object satisfying [mcp specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/main/schema/2025-06-18/schema.json). */
9391
9886
  requestBody: {
9392
9887
  content: {
9393
9888
  'application/json': components['schemas']['ProxyRequest'];
@@ -17878,6 +18373,44 @@ interface operations {
17878
18373
  };
17879
18374
  };
17880
18375
  };
18376
+ getUserLimits: {
18377
+ parameters: {
18378
+ query?: never;
18379
+ header?: never;
18380
+ path?: never;
18381
+ cookie?: never;
18382
+ };
18383
+ requestBody?: never;
18384
+ responses: {
18385
+ /** @description Success */
18386
+ 200: {
18387
+ headers: {
18388
+ [name: string]: unknown;
18389
+ };
18390
+ content: {
18391
+ 'application/json': components['schemas']['UserLimitStats'];
18392
+ };
18393
+ };
18394
+ /** @description Invalid Authentication */
18395
+ 401: {
18396
+ headers: {
18397
+ [name: string]: unknown;
18398
+ };
18399
+ content: {
18400
+ 'application/json': components['schemas']['ErrorData'];
18401
+ };
18402
+ };
18403
+ /** @description The server had an error while processing your request. */
18404
+ 500: {
18405
+ headers: {
18406
+ [name: string]: unknown;
18407
+ };
18408
+ content: {
18409
+ 'application/json': components['schemas']['ErrorData'];
18410
+ };
18411
+ };
18412
+ };
18413
+ };
17881
18414
  getOfflineCredentials: {
17882
18415
  parameters: {
17883
18416
  query?: never;
@@ -18023,6 +18556,44 @@ interface operations {
18023
18556
  };
18024
18557
  };
18025
18558
  };
18559
+ getUserUsage: {
18560
+ parameters: {
18561
+ query?: never;
18562
+ header?: never;
18563
+ path?: never;
18564
+ cookie?: never;
18565
+ };
18566
+ requestBody?: never;
18567
+ responses: {
18568
+ /** @description Success */
18569
+ 200: {
18570
+ headers: {
18571
+ [name: string]: unknown;
18572
+ };
18573
+ content: {
18574
+ 'application/json': components['schemas']['UserLimitStats'];
18575
+ };
18576
+ };
18577
+ /** @description Invalid Authentication */
18578
+ 401: {
18579
+ headers: {
18580
+ [name: string]: unknown;
18581
+ };
18582
+ content: {
18583
+ 'application/json': components['schemas']['ErrorData'];
18584
+ };
18585
+ };
18586
+ /** @description The server had an error while processing your request. */
18587
+ 500: {
18588
+ headers: {
18589
+ [name: string]: unknown;
18590
+ };
18591
+ content: {
18592
+ 'application/json': components['schemas']['ErrorData'];
18593
+ };
18594
+ };
18595
+ };
18596
+ };
18026
18597
  rateDeployment: {
18027
18598
  parameters: {
18028
18599
  query?: never;
@@ -19191,6 +19762,8 @@ interface DIAL_SDK {
19191
19762
  getToolset: (toolset_name: string, init?: SDKOperationInit<operations['getToolset']>) => Promise<SDKOperationResponse<operations['getToolset']>>;
19192
19763
  getUserBucket: (init?: SDKOperationInit<operations['getUserBucket']>) => Promise<SDKOperationResponse<operations['getUserBucket']>>;
19193
19764
  getUserInfo: (init?: SDKOperationInit<operations['getUserInfo']>) => Promise<SDKOperationResponse<operations['getUserInfo']>>;
19765
+ getUserLimits: (init?: SDKOperationInit<operations['getUserLimits']>) => Promise<SDKOperationResponse<operations['getUserLimits']>>;
19766
+ getUserUsage: (init?: SDKOperationInit<operations['getUserUsage']>) => Promise<SDKOperationResponse<operations['getUserUsage']>>;
19194
19767
  grantExternalServiceConsent: (appid: string, id: string, init?: SDKOperationInit<operations['grantExternalServiceConsent']>) => Promise<SDKOperationResponse<operations['grantExternalServiceConsent']>>;
19195
19768
  grantPerRequestPermissions: (init: SDKOperationInit<operations['grantPerRequestPermissions']>) => Promise<SDKOperationResponse<operations['grantPerRequestPermissions']>>;
19196
19769
  interactClientChannel: (init: SDKOperationInit<operations['interactClientChannel']>) => Promise<SDKOperationResponse<operations['interactClientChannel']>>;