@openrouter/sdk 0.8.0 → 0.9.11
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/esm/funcs/chatSend.d.ts +3 -3
- package/esm/funcs/chatSend.js +18 -2
- package/esm/lib/config.d.ts +2 -2
- package/esm/lib/config.js +2 -2
- package/esm/models/assistantmessage.d.ts +47 -36
- package/esm/models/assistantmessage.js +35 -47
- package/esm/models/assistantmessageimages.d.ts +33 -0
- package/esm/models/assistantmessageimages.js +44 -0
- package/esm/models/chatgenerationparams.d.ts +453 -126
- package/esm/models/chatgenerationparams.js +238 -97
- package/esm/models/chatgenerationtokenusage.d.ts +48 -0
- package/esm/models/chatmessagecontentitem.d.ts +15 -10
- package/esm/models/chatmessagecontentitem.js +25 -4
- package/esm/models/chatmessagecontentitemaudio.d.ts +20 -2
- package/esm/models/chatmessagecontentitemaudio.js +9 -2
- package/esm/models/chatmessagecontentitemcachecontrol.d.ts +14 -3
- package/esm/models/chatmessagecontentitemcachecontrol.js +9 -2
- package/esm/models/chatmessagecontentitemimage.d.ts +26 -3
- package/esm/models/chatmessagecontentitemimage.js +12 -2
- package/esm/models/chatmessagecontentitemtext.d.ts +17 -2
- package/esm/models/chatmessagecontentitemtext.js +9 -2
- package/esm/models/chatmessagecontentitemvideo.d.ts +12 -55
- package/esm/models/chatmessagecontentitemvideo.js +5 -72
- package/esm/models/chatmessagecontentitemvideolegacy.d.ts +28 -0
- package/esm/models/chatmessagecontentitemvideolegacy.js +33 -0
- package/esm/models/chatmessagetokenlogprob.d.ts +15 -0
- package/esm/models/chatmessagetokenlogprobs.d.ts +9 -0
- package/esm/models/chatmessagetoolcall.d.ts +23 -2
- package/esm/models/chatmessagetoolcall.js +9 -2
- package/esm/models/chatresponse.d.ts +29 -1
- package/esm/models/chatresponse.js +6 -1
- package/esm/models/chatresponsechoice.d.ts +13 -2
- package/esm/models/chatresponsechoice.js +1 -2
- package/esm/models/chatstreamingchoice.d.ts +13 -2
- package/esm/models/chatstreamingchoice.js +1 -2
- package/esm/models/chatstreamingmessagechunk.d.ts +29 -2
- package/esm/models/chatstreamingmessagechunk.js +5 -2
- package/esm/models/chatstreamingmessagetoolcall.d.ts +38 -1
- package/esm/models/chatstreamingmessagetoolcall.js +9 -1
- package/esm/models/chatstreamingresponsechunk.d.ts +45 -11
- package/esm/models/chatstreamingresponsechunk.js +11 -25
- package/esm/models/chatstreamoptions.d.ts +8 -0
- package/esm/models/debugoptions.d.ts +18 -0
- package/esm/models/debugoptions.js +18 -0
- package/esm/models/developermessage.d.ts +12 -0
- package/esm/models/errors/index.d.ts +0 -1
- package/esm/models/errors/index.js +0 -1
- package/esm/models/index.d.ts +12 -8
- package/esm/models/index.js +12 -8
- package/esm/models/jsonschemaconfig.d.ts +17 -2
- package/esm/models/jsonschemaconfig.js +1 -1
- package/esm/models/message.d.ts +9 -2
- package/esm/models/message.js +1 -1
- package/esm/models/modelscountresponse.d.ts +4 -4
- package/esm/models/modelscountresponse.js +4 -4
- package/esm/models/namedtoolchoice.d.ts +15 -2
- package/esm/models/namedtoolchoice.js +6 -1
- package/esm/models/openairesponsesreasoningconfig.d.ts +1 -1
- package/esm/models/openairesponsesreasoningconfig.js +1 -1
- package/esm/models/openresponsesnonstreamingresponse.d.ts +4 -4
- package/esm/models/openresponsesnonstreamingresponse.js +3 -3
- package/esm/models/openresponsesreasoning.d.ts +2 -2
- package/esm/models/openresponsesreasoning.js +1 -1
- package/esm/models/openresponsesreasoningconfig.d.ts +2 -2
- package/esm/models/openresponsesreasoningconfig.js +1 -1
- package/esm/models/openresponsesrequest.d.ts +62 -32
- package/esm/models/openresponsesrequest.js +61 -36
- package/esm/models/operations/createauthkeyscode.d.ts +24 -0
- package/esm/models/operations/createauthkeyscode.js +14 -0
- package/esm/models/operations/getgeneration.d.ts +2 -0
- package/esm/models/operations/getgeneration.js +2 -0
- package/esm/models/operations/sendchatcompletionrequest.d.ts +12 -3
- package/esm/models/operations/sendchatcompletionrequest.js +20 -2
- package/esm/models/providername.d.ts +2 -0
- package/esm/models/providername.js +2 -0
- package/esm/models/providerpreferences.d.ts +45 -14
- package/esm/models/providerpreferences.js +29 -15
- package/esm/models/providersort.d.ts +6 -0
- package/esm/models/providersort.js +3 -0
- package/esm/models/providersortconfig.d.ts +30 -2
- package/esm/models/providersortconfig.js +15 -2
- package/esm/models/reasoningdetailencrypted.d.ts +42 -0
- package/esm/models/reasoningdetailencrypted.js +42 -0
- package/esm/models/reasoningdetailsummary.d.ts +42 -0
- package/esm/models/reasoningdetailsummary.js +42 -0
- package/esm/models/reasoningdetailtext.d.ts +44 -0
- package/esm/models/reasoningdetailtext.js +44 -0
- package/esm/models/reasoningdetailunion.d.ts +19 -0
- package/esm/models/reasoningdetailunion.js +28 -0
- package/esm/models/responseformatjsonobject.d.ts +20 -0
- package/esm/models/responseformatjsonobject.js +21 -0
- package/esm/models/responseformatjsonschema.d.ts +6 -0
- package/esm/models/responseformattext.d.ts +15 -0
- package/esm/models/responseformattext.js +13 -0
- package/esm/models/responseformattextconfig.d.ts +3 -3
- package/esm/models/responseformattextconfig.js +3 -3
- package/esm/models/responseformattextgrammar.d.ts +6 -0
- package/esm/models/responseformattextpython.d.ts +15 -0
- package/esm/models/responseformattextpython.js +13 -0
- package/esm/models/responseserrorfield.d.ts +4 -4
- package/esm/models/responseserrorfield.js +4 -4
- package/esm/models/responsesoutputitemreasoning.d.ts +2 -2
- package/esm/models/responsesoutputitemreasoning.js +2 -2
- package/esm/models/systemmessage.d.ts +12 -0
- package/esm/models/toolchoiceoption.d.ts +31 -0
- package/esm/models/toolchoiceoption.js +32 -0
- package/esm/models/tooldefinitionjson.d.ts +38 -4
- package/esm/models/tooldefinitionjson.js +14 -2
- package/esm/models/toolresponsemessage.d.ts +12 -0
- package/esm/models/usermessage.d.ts +12 -0
- package/esm/models/videoinput.d.ts +23 -0
- package/esm/models/videoinput.js +22 -0
- package/esm/sdk/chat.d.ts +1 -1
- package/esm/sdk/sdk.d.ts +2 -2
- package/esm/sdk/sdk.js +3 -3
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/esm/models/chaterror.d.ts +0 -17
- package/esm/models/chaterror.js +0 -25
- package/esm/models/errors/chaterror.d.ts +0 -19
- package/esm/models/errors/chaterror.js +0 -32
- package/esm/models/providersortunion.d.ts +0 -10
- package/esm/models/providersortunion.js +0 -13
- package/esm/models/responsesformatjsonobject.d.ts +0 -20
- package/esm/models/responsesformatjsonobject.js +0 -21
- package/esm/models/schema10.d.ts +0 -33
- package/esm/models/schema10.js +0 -30
- package/esm/models/schema14.d.ts +0 -8
- package/esm/models/schema14.js +0 -12
- package/esm/models/schema17.d.ts +0 -102
- package/esm/models/schema17.js +0 -95
- package/esm/models/schema19.d.ts +0 -92
- package/esm/models/schema19.js +0 -109
- package/esm/models/schema5.d.ts +0 -86
- package/esm/models/schema5.js +0 -89
|
@@ -1,59 +1,225 @@
|
|
|
1
1
|
import * as z from "zod/v4";
|
|
2
|
-
import { OpenEnum } from "../types/enums.js";
|
|
2
|
+
import { ClosedEnum, OpenEnum } from "../types/enums.js";
|
|
3
3
|
import { ChatStreamOptions, ChatStreamOptions$Outbound } from "./chatstreamoptions.js";
|
|
4
|
+
import { DataCollection } from "./datacollection.js";
|
|
5
|
+
import { DebugOptions, DebugOptions$Outbound } from "./debugoptions.js";
|
|
4
6
|
import { Message, Message$Outbound } from "./message.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
+
import { PDFParserOptions, PDFParserOptions$Outbound } from "./pdfparseroptions.js";
|
|
8
|
+
import { PreferredMaxLatency, PreferredMaxLatency$Outbound } from "./preferredmaxlatency.js";
|
|
9
|
+
import { PreferredMinThroughput, PreferredMinThroughput$Outbound } from "./preferredminthroughput.js";
|
|
10
|
+
import { ProviderName } from "./providername.js";
|
|
11
|
+
import { Quantization } from "./quantization.js";
|
|
12
|
+
import { ResponseFormatJSONObject, ResponseFormatJSONObject$Outbound } from "./responseformatjsonobject.js";
|
|
7
13
|
import { ResponseFormatJSONSchema, ResponseFormatJSONSchema$Outbound } from "./responseformatjsonschema.js";
|
|
14
|
+
import { ResponseFormatText, ResponseFormatText$Outbound } from "./responseformattext.js";
|
|
8
15
|
import { ResponseFormatTextGrammar, ResponseFormatTextGrammar$Outbound } from "./responseformattextgrammar.js";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import { Schema5, Schema5$Outbound } from "./schema5.js";
|
|
16
|
+
import { ResponseFormatTextPython, ResponseFormatTextPython$Outbound } from "./responseformattextpython.js";
|
|
17
|
+
import { ToolChoiceOption, ToolChoiceOption$Outbound } from "./toolchoiceoption.js";
|
|
12
18
|
import { ToolDefinitionJson, ToolDefinitionJson$Outbound } from "./tooldefinitionjson.js";
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
19
|
+
import { WebSearchEngine } from "./websearchengine.js";
|
|
20
|
+
export type ChatGenerationParamsOrder = ProviderName | string;
|
|
21
|
+
export type ChatGenerationParamsOnly = ProviderName | string;
|
|
22
|
+
export type ChatGenerationParamsIgnore = ProviderName | string;
|
|
23
|
+
export declare const ChatGenerationParamsSortEnum: {
|
|
24
|
+
readonly Price: "price";
|
|
25
|
+
readonly Throughput: "throughput";
|
|
26
|
+
readonly Latency: "latency";
|
|
16
27
|
};
|
|
17
|
-
export type
|
|
18
|
-
export declare const
|
|
19
|
-
readonly
|
|
20
|
-
readonly
|
|
21
|
-
readonly
|
|
22
|
-
readonly Fp6: "fp6";
|
|
23
|
-
readonly Fp8: "fp8";
|
|
24
|
-
readonly Fp16: "fp16";
|
|
25
|
-
readonly Bf16: "bf16";
|
|
26
|
-
readonly Fp32: "fp32";
|
|
27
|
-
readonly Unknown: "unknown";
|
|
28
|
+
export type ChatGenerationParamsSortEnum = OpenEnum<typeof ChatGenerationParamsSortEnum>;
|
|
29
|
+
export declare const ChatGenerationParamsProviderSortConfigEnum: {
|
|
30
|
+
readonly Price: "price";
|
|
31
|
+
readonly Throughput: "throughput";
|
|
32
|
+
readonly Latency: "latency";
|
|
28
33
|
};
|
|
29
|
-
export type
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
34
|
+
export type ChatGenerationParamsProviderSortConfigEnum = ClosedEnum<typeof ChatGenerationParamsProviderSortConfigEnum>;
|
|
35
|
+
/**
|
|
36
|
+
* The provider sorting strategy (price, throughput, latency)
|
|
37
|
+
*/
|
|
38
|
+
export declare const ChatGenerationParamsBy: {
|
|
39
|
+
readonly Price: "price";
|
|
40
|
+
readonly Throughput: "throughput";
|
|
41
|
+
readonly Latency: "latency";
|
|
35
42
|
};
|
|
36
|
-
|
|
37
|
-
|
|
43
|
+
/**
|
|
44
|
+
* The provider sorting strategy (price, throughput, latency)
|
|
45
|
+
*/
|
|
46
|
+
export type ChatGenerationParamsBy = OpenEnum<typeof ChatGenerationParamsBy>;
|
|
47
|
+
/**
|
|
48
|
+
* Partitioning strategy for sorting: "model" (default) groups endpoints by model before sorting (fallback models remain fallbacks), "none" sorts all endpoints together regardless of model.
|
|
49
|
+
*/
|
|
50
|
+
export declare const ChatGenerationParamsPartition: {
|
|
51
|
+
readonly Model: "model";
|
|
52
|
+
readonly None: "none";
|
|
53
|
+
};
|
|
54
|
+
/**
|
|
55
|
+
* Partitioning strategy for sorting: "model" (default) groups endpoints by model before sorting (fallback models remain fallbacks), "none" sorts all endpoints together regardless of model.
|
|
56
|
+
*/
|
|
57
|
+
export type ChatGenerationParamsPartition = OpenEnum<typeof ChatGenerationParamsPartition>;
|
|
58
|
+
export type ChatGenerationParamsProviderSortConfig = {
|
|
59
|
+
/**
|
|
60
|
+
* The provider sorting strategy (price, throughput, latency)
|
|
61
|
+
*/
|
|
62
|
+
by?: ChatGenerationParamsBy | null | undefined;
|
|
63
|
+
/**
|
|
64
|
+
* Partitioning strategy for sorting: "model" (default) groups endpoints by model before sorting (fallback models remain fallbacks), "none" sorts all endpoints together regardless of model.
|
|
65
|
+
*/
|
|
66
|
+
partition?: ChatGenerationParamsPartition | null | undefined;
|
|
67
|
+
};
|
|
68
|
+
export type ChatGenerationParamsProviderSortConfigUnion = ChatGenerationParamsProviderSortConfig | ChatGenerationParamsProviderSortConfigEnum;
|
|
69
|
+
/**
|
|
70
|
+
* The provider sorting strategy (price, throughput, latency)
|
|
71
|
+
*/
|
|
72
|
+
export declare const ChatGenerationParamsProviderSort: {
|
|
73
|
+
readonly Price: "price";
|
|
74
|
+
readonly Throughput: "throughput";
|
|
75
|
+
readonly Latency: "latency";
|
|
76
|
+
};
|
|
77
|
+
/**
|
|
78
|
+
* The provider sorting strategy (price, throughput, latency)
|
|
79
|
+
*/
|
|
80
|
+
export type ChatGenerationParamsProviderSort = OpenEnum<typeof ChatGenerationParamsProviderSort>;
|
|
81
|
+
/**
|
|
82
|
+
* The sorting strategy to use for this request, if "order" is not specified. When set, no load balancing is performed.
|
|
83
|
+
*/
|
|
84
|
+
export type ChatGenerationParamsSortUnion = ChatGenerationParamsProviderSort | ChatGenerationParamsProviderSortConfig | ChatGenerationParamsProviderSortConfigEnum | ChatGenerationParamsSortEnum;
|
|
85
|
+
/**
|
|
86
|
+
* The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion.
|
|
87
|
+
*/
|
|
88
|
+
export type ChatGenerationParamsMaxPrice = {
|
|
89
|
+
/**
|
|
90
|
+
* Price per million prompt tokens
|
|
91
|
+
*/
|
|
92
|
+
prompt?: string | undefined;
|
|
93
|
+
completion?: string | undefined;
|
|
94
|
+
image?: string | undefined;
|
|
95
|
+
audio?: string | undefined;
|
|
96
|
+
request?: string | undefined;
|
|
97
|
+
};
|
|
98
|
+
/**
|
|
99
|
+
* When multiple model providers are available, optionally indicate your routing preference.
|
|
100
|
+
*/
|
|
101
|
+
export type ChatGenerationParamsProvider = {
|
|
102
|
+
/**
|
|
103
|
+
* Whether to allow backup providers to serve requests
|
|
104
|
+
*
|
|
105
|
+
* @remarks
|
|
106
|
+
* - true: (default) when the primary provider (or your custom providers in "order") is unavailable, use the next best provider.
|
|
107
|
+
* - false: use only the primary/custom provider, and return the upstream error if it's unavailable.
|
|
108
|
+
*/
|
|
38
109
|
allowFallbacks?: boolean | null | undefined;
|
|
110
|
+
/**
|
|
111
|
+
* Whether to filter providers to only those that support the parameters you've provided. If this setting is omitted or set to false, then providers will receive only the parameters they support, and ignore the rest.
|
|
112
|
+
*/
|
|
39
113
|
requireParameters?: boolean | null | undefined;
|
|
40
|
-
|
|
114
|
+
/**
|
|
115
|
+
* Data collection setting. If no available model provider meets the requirement, your request will return an error.
|
|
116
|
+
*
|
|
117
|
+
* @remarks
|
|
118
|
+
* - allow: (default) allow providers which store user data non-transiently and may train on it
|
|
119
|
+
*
|
|
120
|
+
* - deny: use only providers which do not collect user data.
|
|
121
|
+
*/
|
|
122
|
+
dataCollection?: DataCollection | null | undefined;
|
|
123
|
+
/**
|
|
124
|
+
* Whether to restrict routing to only ZDR (Zero Data Retention) endpoints. When true, only endpoints that do not retain prompts will be used.
|
|
125
|
+
*/
|
|
41
126
|
zdr?: boolean | null | undefined;
|
|
127
|
+
/**
|
|
128
|
+
* Whether to restrict routing to only models that allow text distillation. When true, only models where the author has allowed distillation will be used.
|
|
129
|
+
*/
|
|
42
130
|
enforceDistillableText?: boolean | null | undefined;
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
131
|
+
/**
|
|
132
|
+
* An ordered list of provider slugs. The router will attempt to use the first provider in the subset of this list that supports your requested model, and fall back to the next if it is unavailable. If no providers are available, the request will fail with an error message.
|
|
133
|
+
*/
|
|
134
|
+
order?: Array<ProviderName | string> | null | undefined;
|
|
135
|
+
/**
|
|
136
|
+
* List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request.
|
|
137
|
+
*/
|
|
138
|
+
only?: Array<ProviderName | string> | null | undefined;
|
|
139
|
+
/**
|
|
140
|
+
* List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request.
|
|
141
|
+
*/
|
|
142
|
+
ignore?: Array<ProviderName | string> | null | undefined;
|
|
143
|
+
/**
|
|
144
|
+
* A list of quantization levels to filter the provider by.
|
|
145
|
+
*/
|
|
146
|
+
quantizations?: Array<Quantization> | null | undefined;
|
|
147
|
+
sort?: ChatGenerationParamsProviderSort | ChatGenerationParamsProviderSortConfig | ChatGenerationParamsProviderSortConfigEnum | ChatGenerationParamsSortEnum | null | undefined;
|
|
148
|
+
/**
|
|
149
|
+
* The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion.
|
|
150
|
+
*/
|
|
151
|
+
maxPrice?: ChatGenerationParamsMaxPrice | undefined;
|
|
152
|
+
/**
|
|
153
|
+
* Preferred minimum throughput (in tokens per second). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints below the threshold(s) may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold.
|
|
154
|
+
*/
|
|
155
|
+
preferredMinThroughput?: PreferredMinThroughput | null | undefined;
|
|
156
|
+
/**
|
|
157
|
+
* Preferred maximum latency (in seconds). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints above the threshold(s) may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold.
|
|
158
|
+
*/
|
|
159
|
+
preferredMaxLatency?: PreferredMaxLatency | null | undefined;
|
|
160
|
+
};
|
|
161
|
+
export type ChatGenerationParamsPluginResponseHealing = {
|
|
162
|
+
id: "response-healing";
|
|
163
|
+
/**
|
|
164
|
+
* Set to false to disable the response-healing plugin for this request. Defaults to true.
|
|
165
|
+
*/
|
|
166
|
+
enabled?: boolean | undefined;
|
|
167
|
+
};
|
|
168
|
+
export type ChatGenerationParamsPluginFileParser = {
|
|
169
|
+
id: "file-parser";
|
|
170
|
+
/**
|
|
171
|
+
* Set to false to disable the file-parser plugin for this request. Defaults to true.
|
|
172
|
+
*/
|
|
173
|
+
enabled?: boolean | undefined;
|
|
174
|
+
/**
|
|
175
|
+
* Options for PDF parsing.
|
|
176
|
+
*/
|
|
177
|
+
pdf?: PDFParserOptions | undefined;
|
|
51
178
|
};
|
|
52
|
-
export
|
|
53
|
-
|
|
54
|
-
|
|
179
|
+
export type ChatGenerationParamsPluginWeb = {
|
|
180
|
+
id: "web";
|
|
181
|
+
/**
|
|
182
|
+
* Set to false to disable the web-search plugin for this request. Defaults to true.
|
|
183
|
+
*/
|
|
184
|
+
enabled?: boolean | undefined;
|
|
185
|
+
maxResults?: number | undefined;
|
|
186
|
+
searchPrompt?: string | undefined;
|
|
187
|
+
/**
|
|
188
|
+
* The search engine to use for web search.
|
|
189
|
+
*/
|
|
190
|
+
engine?: WebSearchEngine | undefined;
|
|
55
191
|
};
|
|
56
|
-
export type
|
|
192
|
+
export type ChatGenerationParamsPluginModeration = {
|
|
193
|
+
id: "moderation";
|
|
194
|
+
};
|
|
195
|
+
export type ChatGenerationParamsPluginAutoRouter = {
|
|
196
|
+
id: "auto-router";
|
|
197
|
+
/**
|
|
198
|
+
* Set to false to disable the auto-router plugin for this request. Defaults to true.
|
|
199
|
+
*/
|
|
200
|
+
enabled?: boolean | undefined;
|
|
201
|
+
/**
|
|
202
|
+
* List of model patterns to filter which models the auto-router can route between. Supports wildcards (e.g., "anthropic/*" matches all Anthropic models). When not specified, uses the default supported models list.
|
|
203
|
+
*/
|
|
204
|
+
allowedModels?: Array<string> | undefined;
|
|
205
|
+
};
|
|
206
|
+
export type ChatGenerationParamsPluginUnion = ChatGenerationParamsPluginAutoRouter | ChatGenerationParamsPluginModeration | ChatGenerationParamsPluginWeb | ChatGenerationParamsPluginFileParser | ChatGenerationParamsPluginResponseHealing;
|
|
207
|
+
/**
|
|
208
|
+
* Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations.
|
|
209
|
+
*/
|
|
210
|
+
export type ChatGenerationParamsTrace = {
|
|
211
|
+
traceId?: string | undefined;
|
|
212
|
+
traceName?: string | undefined;
|
|
213
|
+
spanName?: string | undefined;
|
|
214
|
+
generationName?: string | undefined;
|
|
215
|
+
parentSpanId?: string | undefined;
|
|
216
|
+
additionalProperties?: {
|
|
217
|
+
[k: string]: any | null;
|
|
218
|
+
} | undefined;
|
|
219
|
+
};
|
|
220
|
+
/**
|
|
221
|
+
* Constrains effort on reasoning for reasoning models
|
|
222
|
+
*/
|
|
57
223
|
export declare const Effort: {
|
|
58
224
|
readonly Xhigh: "xhigh";
|
|
59
225
|
readonly High: "high";
|
|
@@ -62,158 +228,318 @@ export declare const Effort: {
|
|
|
62
228
|
readonly Minimal: "minimal";
|
|
63
229
|
readonly None: "none";
|
|
64
230
|
};
|
|
231
|
+
/**
|
|
232
|
+
* Constrains effort on reasoning for reasoning models
|
|
233
|
+
*/
|
|
65
234
|
export type Effort = OpenEnum<typeof Effort>;
|
|
235
|
+
/**
|
|
236
|
+
* Configuration options for reasoning models
|
|
237
|
+
*/
|
|
66
238
|
export type Reasoning = {
|
|
239
|
+
/**
|
|
240
|
+
* Constrains effort on reasoning for reasoning models
|
|
241
|
+
*/
|
|
67
242
|
effort?: Effort | null | undefined;
|
|
68
|
-
summary?:
|
|
69
|
-
};
|
|
70
|
-
export type ResponseFormatPython = {
|
|
71
|
-
type: "python";
|
|
72
|
-
};
|
|
73
|
-
export type ResponseFormatJSONObject = {
|
|
74
|
-
type: "json_object";
|
|
75
|
-
};
|
|
76
|
-
export type ResponseFormatText = {
|
|
77
|
-
type: "text";
|
|
243
|
+
summary?: any | null | undefined;
|
|
78
244
|
};
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
245
|
+
/**
|
|
246
|
+
* Response format configuration
|
|
247
|
+
*/
|
|
248
|
+
export type ResponseFormat = ResponseFormatText | ResponseFormatJSONObject | ResponseFormatJSONSchema | ResponseFormatTextGrammar | ResponseFormatTextPython;
|
|
249
|
+
/**
|
|
250
|
+
* Stop sequences (up to 4)
|
|
251
|
+
*/
|
|
252
|
+
export type Stop = string | Array<string> | any;
|
|
253
|
+
export type ChatGenerationParamsImageConfig = string | number | Array<any | null>;
|
|
85
254
|
export declare const Modality: {
|
|
86
255
|
readonly Text: "text";
|
|
87
256
|
readonly Image: "image";
|
|
88
257
|
};
|
|
89
258
|
export type Modality = OpenEnum<typeof Modality>;
|
|
259
|
+
/**
|
|
260
|
+
* Chat completion request parameters
|
|
261
|
+
*/
|
|
90
262
|
export type ChatGenerationParams = {
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
263
|
+
/**
|
|
264
|
+
* When multiple model providers are available, optionally indicate your routing preference.
|
|
265
|
+
*/
|
|
266
|
+
provider?: ChatGenerationParamsProvider | null | undefined;
|
|
267
|
+
/**
|
|
268
|
+
* Plugins you want to enable for this request, including their settings.
|
|
269
|
+
*/
|
|
270
|
+
plugins?: Array<ChatGenerationParamsPluginAutoRouter | ChatGenerationParamsPluginModeration | ChatGenerationParamsPluginWeb | ChatGenerationParamsPluginFileParser | ChatGenerationParamsPluginResponseHealing> | undefined;
|
|
271
|
+
/**
|
|
272
|
+
* Unique user identifier
|
|
273
|
+
*/
|
|
94
274
|
user?: string | undefined;
|
|
275
|
+
/**
|
|
276
|
+
* A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 128 characters.
|
|
277
|
+
*/
|
|
95
278
|
sessionId?: string | undefined;
|
|
279
|
+
/**
|
|
280
|
+
* Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations.
|
|
281
|
+
*/
|
|
282
|
+
trace?: ChatGenerationParamsTrace | undefined;
|
|
283
|
+
/**
|
|
284
|
+
* List of messages for the conversation
|
|
285
|
+
*/
|
|
96
286
|
messages: Array<Message>;
|
|
287
|
+
/**
|
|
288
|
+
* Model to use for completion
|
|
289
|
+
*/
|
|
97
290
|
model?: string | undefined;
|
|
291
|
+
/**
|
|
292
|
+
* Models to use for completion
|
|
293
|
+
*/
|
|
98
294
|
models?: Array<string> | undefined;
|
|
295
|
+
/**
|
|
296
|
+
* Frequency penalty (-2.0 to 2.0)
|
|
297
|
+
*/
|
|
99
298
|
frequencyPenalty?: number | null | undefined;
|
|
299
|
+
/**
|
|
300
|
+
* Token logit bias adjustments
|
|
301
|
+
*/
|
|
100
302
|
logitBias?: {
|
|
101
303
|
[k: string]: number;
|
|
102
304
|
} | null | undefined;
|
|
305
|
+
/**
|
|
306
|
+
* Return log probabilities
|
|
307
|
+
*/
|
|
103
308
|
logprobs?: boolean | null | undefined;
|
|
309
|
+
/**
|
|
310
|
+
* Number of top log probabilities to return (0-20)
|
|
311
|
+
*/
|
|
104
312
|
topLogprobs?: number | null | undefined;
|
|
313
|
+
/**
|
|
314
|
+
* Maximum tokens in completion
|
|
315
|
+
*/
|
|
105
316
|
maxCompletionTokens?: number | null | undefined;
|
|
317
|
+
/**
|
|
318
|
+
* Maximum tokens (deprecated, use max_completion_tokens)
|
|
319
|
+
*/
|
|
106
320
|
maxTokens?: number | null | undefined;
|
|
321
|
+
/**
|
|
322
|
+
* Key-value pairs for additional object information (max 16 pairs, 64 char keys, 512 char values)
|
|
323
|
+
*/
|
|
107
324
|
metadata?: {
|
|
108
325
|
[k: string]: string;
|
|
109
326
|
} | undefined;
|
|
327
|
+
/**
|
|
328
|
+
* Presence penalty (-2.0 to 2.0)
|
|
329
|
+
*/
|
|
110
330
|
presencePenalty?: number | null | undefined;
|
|
331
|
+
/**
|
|
332
|
+
* Configuration options for reasoning models
|
|
333
|
+
*/
|
|
111
334
|
reasoning?: Reasoning | undefined;
|
|
112
|
-
|
|
335
|
+
/**
|
|
336
|
+
* Response format configuration
|
|
337
|
+
*/
|
|
338
|
+
responseFormat?: ResponseFormatText | ResponseFormatJSONObject | ResponseFormatJSONSchema | ResponseFormatTextGrammar | ResponseFormatTextPython | undefined;
|
|
339
|
+
/**
|
|
340
|
+
* Random seed for deterministic outputs
|
|
341
|
+
*/
|
|
113
342
|
seed?: number | null | undefined;
|
|
114
|
-
|
|
343
|
+
/**
|
|
344
|
+
* Stop sequences (up to 4)
|
|
345
|
+
*/
|
|
346
|
+
stop?: string | Array<string> | any | null | undefined;
|
|
347
|
+
/**
|
|
348
|
+
* Enable streaming response
|
|
349
|
+
*/
|
|
115
350
|
stream?: boolean | undefined;
|
|
351
|
+
/**
|
|
352
|
+
* Streaming configuration options
|
|
353
|
+
*/
|
|
116
354
|
streamOptions?: ChatStreamOptions | null | undefined;
|
|
355
|
+
/**
|
|
356
|
+
* Sampling temperature (0-2)
|
|
357
|
+
*/
|
|
117
358
|
temperature?: number | null | undefined;
|
|
118
|
-
|
|
359
|
+
parallelToolCalls?: boolean | null | undefined;
|
|
360
|
+
/**
|
|
361
|
+
* Tool choice configuration
|
|
362
|
+
*/
|
|
363
|
+
toolChoice?: ToolChoiceOption | undefined;
|
|
364
|
+
/**
|
|
365
|
+
* Available tools for function calling
|
|
366
|
+
*/
|
|
119
367
|
tools?: Array<ToolDefinitionJson> | undefined;
|
|
368
|
+
/**
|
|
369
|
+
* Nucleus sampling parameter (0-1)
|
|
370
|
+
*/
|
|
120
371
|
topP?: number | null | undefined;
|
|
121
|
-
|
|
372
|
+
/**
|
|
373
|
+
* Debug options for inspecting request transformations (streaming only)
|
|
374
|
+
*/
|
|
375
|
+
debug?: DebugOptions | undefined;
|
|
376
|
+
/**
|
|
377
|
+
* Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/guides/overview/multimodal/image-generation for more details.
|
|
378
|
+
*/
|
|
122
379
|
imageConfig?: {
|
|
123
|
-
[k: string]: string | number | Array<any>;
|
|
380
|
+
[k: string]: string | number | Array<any | null>;
|
|
124
381
|
} | undefined;
|
|
382
|
+
/**
|
|
383
|
+
* Output modalities for the response. Supported values are "text" and "image".
|
|
384
|
+
*/
|
|
125
385
|
modalities?: Array<Modality> | undefined;
|
|
126
386
|
};
|
|
127
387
|
/** @internal */
|
|
128
|
-
export
|
|
388
|
+
export type ChatGenerationParamsOrder$Outbound = string | string;
|
|
389
|
+
/** @internal */
|
|
390
|
+
export declare const ChatGenerationParamsOrder$outboundSchema: z.ZodType<ChatGenerationParamsOrder$Outbound, ChatGenerationParamsOrder>;
|
|
391
|
+
export declare function chatGenerationParamsOrderToJSON(chatGenerationParamsOrder: ChatGenerationParamsOrder): string;
|
|
392
|
+
/** @internal */
|
|
393
|
+
export type ChatGenerationParamsOnly$Outbound = string | string;
|
|
394
|
+
/** @internal */
|
|
395
|
+
export declare const ChatGenerationParamsOnly$outboundSchema: z.ZodType<ChatGenerationParamsOnly$Outbound, ChatGenerationParamsOnly>;
|
|
396
|
+
export declare function chatGenerationParamsOnlyToJSON(chatGenerationParamsOnly: ChatGenerationParamsOnly): string;
|
|
397
|
+
/** @internal */
|
|
398
|
+
export type ChatGenerationParamsIgnore$Outbound = string | string;
|
|
399
|
+
/** @internal */
|
|
400
|
+
export declare const ChatGenerationParamsIgnore$outboundSchema: z.ZodType<ChatGenerationParamsIgnore$Outbound, ChatGenerationParamsIgnore>;
|
|
401
|
+
export declare function chatGenerationParamsIgnoreToJSON(chatGenerationParamsIgnore: ChatGenerationParamsIgnore): string;
|
|
402
|
+
/** @internal */
|
|
403
|
+
export declare const ChatGenerationParamsSortEnum$outboundSchema: z.ZodType<string, ChatGenerationParamsSortEnum>;
|
|
129
404
|
/** @internal */
|
|
130
|
-
export declare const
|
|
405
|
+
export declare const ChatGenerationParamsProviderSortConfigEnum$outboundSchema: z.ZodEnum<typeof ChatGenerationParamsProviderSortConfigEnum>;
|
|
131
406
|
/** @internal */
|
|
132
|
-
export
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
407
|
+
export declare const ChatGenerationParamsBy$outboundSchema: z.ZodType<string, ChatGenerationParamsBy>;
|
|
408
|
+
/** @internal */
|
|
409
|
+
export declare const ChatGenerationParamsPartition$outboundSchema: z.ZodType<string, ChatGenerationParamsPartition>;
|
|
410
|
+
/** @internal */
|
|
411
|
+
export type ChatGenerationParamsProviderSortConfig$Outbound = {
|
|
412
|
+
by?: string | null | undefined;
|
|
413
|
+
partition?: string | null | undefined;
|
|
137
414
|
};
|
|
138
415
|
/** @internal */
|
|
139
|
-
export declare const
|
|
140
|
-
export declare function
|
|
416
|
+
export declare const ChatGenerationParamsProviderSortConfig$outboundSchema: z.ZodType<ChatGenerationParamsProviderSortConfig$Outbound, ChatGenerationParamsProviderSortConfig>;
|
|
417
|
+
export declare function chatGenerationParamsProviderSortConfigToJSON(chatGenerationParamsProviderSortConfig: ChatGenerationParamsProviderSortConfig): string;
|
|
418
|
+
/** @internal */
|
|
419
|
+
export type ChatGenerationParamsProviderSortConfigUnion$Outbound = ChatGenerationParamsProviderSortConfig$Outbound | string;
|
|
141
420
|
/** @internal */
|
|
142
|
-
export
|
|
421
|
+
export declare const ChatGenerationParamsProviderSortConfigUnion$outboundSchema: z.ZodType<ChatGenerationParamsProviderSortConfigUnion$Outbound, ChatGenerationParamsProviderSortConfigUnion>;
|
|
422
|
+
export declare function chatGenerationParamsProviderSortConfigUnionToJSON(chatGenerationParamsProviderSortConfigUnion: ChatGenerationParamsProviderSortConfigUnion): string;
|
|
143
423
|
/** @internal */
|
|
144
|
-
export declare const
|
|
145
|
-
export declare function schema15UnionToJSON(schema15Union: Schema15Union): string;
|
|
424
|
+
export declare const ChatGenerationParamsProviderSort$outboundSchema: z.ZodType<string, ChatGenerationParamsProviderSort>;
|
|
146
425
|
/** @internal */
|
|
147
|
-
export type
|
|
426
|
+
export type ChatGenerationParamsSortUnion$Outbound = string | ChatGenerationParamsProviderSortConfig$Outbound | string | string;
|
|
427
|
+
/** @internal */
|
|
428
|
+
export declare const ChatGenerationParamsSortUnion$outboundSchema: z.ZodType<ChatGenerationParamsSortUnion$Outbound, ChatGenerationParamsSortUnion>;
|
|
429
|
+
export declare function chatGenerationParamsSortUnionToJSON(chatGenerationParamsSortUnion: ChatGenerationParamsSortUnion): string;
|
|
430
|
+
/** @internal */
|
|
431
|
+
export type ChatGenerationParamsMaxPrice$Outbound = {
|
|
432
|
+
prompt?: string | undefined;
|
|
433
|
+
completion?: string | undefined;
|
|
434
|
+
image?: string | undefined;
|
|
435
|
+
audio?: string | undefined;
|
|
436
|
+
request?: string | undefined;
|
|
437
|
+
};
|
|
438
|
+
/** @internal */
|
|
439
|
+
export declare const ChatGenerationParamsMaxPrice$outboundSchema: z.ZodType<ChatGenerationParamsMaxPrice$Outbound, ChatGenerationParamsMaxPrice>;
|
|
440
|
+
export declare function chatGenerationParamsMaxPriceToJSON(chatGenerationParamsMaxPrice: ChatGenerationParamsMaxPrice): string;
|
|
441
|
+
/** @internal */
|
|
442
|
+
export type ChatGenerationParamsProvider$Outbound = {
|
|
148
443
|
allow_fallbacks?: boolean | null | undefined;
|
|
149
444
|
require_parameters?: boolean | null | undefined;
|
|
150
445
|
data_collection?: string | null | undefined;
|
|
151
446
|
zdr?: boolean | null | undefined;
|
|
152
447
|
enforce_distillable_text?: boolean | null | undefined;
|
|
153
|
-
order?: Array<
|
|
154
|
-
only?: Array<
|
|
155
|
-
ignore?: Array<
|
|
448
|
+
order?: Array<string | string> | null | undefined;
|
|
449
|
+
only?: Array<string | string> | null | undefined;
|
|
450
|
+
ignore?: Array<string | string> | null | undefined;
|
|
156
451
|
quantizations?: Array<string> | null | undefined;
|
|
157
|
-
sort?:
|
|
158
|
-
max_price?:
|
|
159
|
-
preferred_min_throughput?:
|
|
160
|
-
preferred_max_latency?:
|
|
452
|
+
sort?: string | ChatGenerationParamsProviderSortConfig$Outbound | string | string | null | undefined;
|
|
453
|
+
max_price?: ChatGenerationParamsMaxPrice$Outbound | undefined;
|
|
454
|
+
preferred_min_throughput?: PreferredMinThroughput$Outbound | null | undefined;
|
|
455
|
+
preferred_max_latency?: PreferredMaxLatency$Outbound | null | undefined;
|
|
161
456
|
};
|
|
162
457
|
/** @internal */
|
|
163
|
-
export declare const
|
|
164
|
-
export declare function
|
|
458
|
+
export declare const ChatGenerationParamsProvider$outboundSchema: z.ZodType<ChatGenerationParamsProvider$Outbound, ChatGenerationParamsProvider>;
|
|
459
|
+
export declare function chatGenerationParamsProviderToJSON(chatGenerationParamsProvider: ChatGenerationParamsProvider): string;
|
|
165
460
|
/** @internal */
|
|
166
|
-
export
|
|
461
|
+
export type ChatGenerationParamsPluginResponseHealing$Outbound = {
|
|
462
|
+
id: "response-healing";
|
|
463
|
+
enabled?: boolean | undefined;
|
|
464
|
+
};
|
|
167
465
|
/** @internal */
|
|
168
|
-
export declare const
|
|
466
|
+
export declare const ChatGenerationParamsPluginResponseHealing$outboundSchema: z.ZodType<ChatGenerationParamsPluginResponseHealing$Outbound, ChatGenerationParamsPluginResponseHealing>;
|
|
467
|
+
export declare function chatGenerationParamsPluginResponseHealingToJSON(chatGenerationParamsPluginResponseHealing: ChatGenerationParamsPluginResponseHealing): string;
|
|
169
468
|
/** @internal */
|
|
170
|
-
export type
|
|
171
|
-
|
|
172
|
-
|
|
469
|
+
export type ChatGenerationParamsPluginFileParser$Outbound = {
|
|
470
|
+
id: "file-parser";
|
|
471
|
+
enabled?: boolean | undefined;
|
|
472
|
+
pdf?: PDFParserOptions$Outbound | undefined;
|
|
173
473
|
};
|
|
174
474
|
/** @internal */
|
|
175
|
-
export declare const
|
|
176
|
-
export declare function
|
|
475
|
+
export declare const ChatGenerationParamsPluginFileParser$outboundSchema: z.ZodType<ChatGenerationParamsPluginFileParser$Outbound, ChatGenerationParamsPluginFileParser>;
|
|
476
|
+
export declare function chatGenerationParamsPluginFileParserToJSON(chatGenerationParamsPluginFileParser: ChatGenerationParamsPluginFileParser): string;
|
|
477
|
+
/** @internal */
|
|
478
|
+
export type ChatGenerationParamsPluginWeb$Outbound = {
|
|
479
|
+
id: "web";
|
|
480
|
+
enabled?: boolean | undefined;
|
|
481
|
+
max_results?: number | undefined;
|
|
482
|
+
search_prompt?: string | undefined;
|
|
483
|
+
engine?: string | undefined;
|
|
484
|
+
};
|
|
485
|
+
/** @internal */
|
|
486
|
+
export declare const ChatGenerationParamsPluginWeb$outboundSchema: z.ZodType<ChatGenerationParamsPluginWeb$Outbound, ChatGenerationParamsPluginWeb>;
|
|
487
|
+
export declare function chatGenerationParamsPluginWebToJSON(chatGenerationParamsPluginWeb: ChatGenerationParamsPluginWeb): string;
|
|
488
|
+
/** @internal */
|
|
489
|
+
export type ChatGenerationParamsPluginModeration$Outbound = {
|
|
490
|
+
id: "moderation";
|
|
491
|
+
};
|
|
177
492
|
/** @internal */
|
|
178
|
-
export
|
|
179
|
-
|
|
493
|
+
export declare const ChatGenerationParamsPluginModeration$outboundSchema: z.ZodType<ChatGenerationParamsPluginModeration$Outbound, ChatGenerationParamsPluginModeration>;
|
|
494
|
+
export declare function chatGenerationParamsPluginModerationToJSON(chatGenerationParamsPluginModeration: ChatGenerationParamsPluginModeration): string;
|
|
495
|
+
/** @internal */
|
|
496
|
+
export type ChatGenerationParamsPluginAutoRouter$Outbound = {
|
|
497
|
+
id: "auto-router";
|
|
498
|
+
enabled?: boolean | undefined;
|
|
499
|
+
allowed_models?: Array<string> | undefined;
|
|
180
500
|
};
|
|
181
501
|
/** @internal */
|
|
182
|
-
export declare const
|
|
183
|
-
export declare function
|
|
502
|
+
export declare const ChatGenerationParamsPluginAutoRouter$outboundSchema: z.ZodType<ChatGenerationParamsPluginAutoRouter$Outbound, ChatGenerationParamsPluginAutoRouter>;
|
|
503
|
+
export declare function chatGenerationParamsPluginAutoRouterToJSON(chatGenerationParamsPluginAutoRouter: ChatGenerationParamsPluginAutoRouter): string;
|
|
504
|
+
/** @internal */
|
|
505
|
+
export type ChatGenerationParamsPluginUnion$Outbound = ChatGenerationParamsPluginAutoRouter$Outbound | ChatGenerationParamsPluginModeration$Outbound | ChatGenerationParamsPluginWeb$Outbound | ChatGenerationParamsPluginFileParser$Outbound | ChatGenerationParamsPluginResponseHealing$Outbound;
|
|
184
506
|
/** @internal */
|
|
185
|
-
export
|
|
186
|
-
|
|
507
|
+
export declare const ChatGenerationParamsPluginUnion$outboundSchema: z.ZodType<ChatGenerationParamsPluginUnion$Outbound, ChatGenerationParamsPluginUnion>;
|
|
508
|
+
export declare function chatGenerationParamsPluginUnionToJSON(chatGenerationParamsPluginUnion: ChatGenerationParamsPluginUnion): string;
|
|
509
|
+
/** @internal */
|
|
510
|
+
export type ChatGenerationParamsTrace$Outbound = {
|
|
511
|
+
trace_id?: string | undefined;
|
|
512
|
+
trace_name?: string | undefined;
|
|
513
|
+
span_name?: string | undefined;
|
|
514
|
+
generation_name?: string | undefined;
|
|
515
|
+
parent_span_id?: string | undefined;
|
|
516
|
+
[additionalProperties: string]: unknown;
|
|
187
517
|
};
|
|
188
518
|
/** @internal */
|
|
189
|
-
export declare const
|
|
190
|
-
export declare function
|
|
519
|
+
export declare const ChatGenerationParamsTrace$outboundSchema: z.ZodType<ChatGenerationParamsTrace$Outbound, ChatGenerationParamsTrace>;
|
|
520
|
+
export declare function chatGenerationParamsTraceToJSON(chatGenerationParamsTrace: ChatGenerationParamsTrace): string;
|
|
191
521
|
/** @internal */
|
|
192
|
-
export
|
|
193
|
-
|
|
522
|
+
export declare const Effort$outboundSchema: z.ZodType<string, Effort>;
|
|
523
|
+
/** @internal */
|
|
524
|
+
export type Reasoning$Outbound = {
|
|
525
|
+
effort?: string | null | undefined;
|
|
526
|
+
summary?: any | null | undefined;
|
|
194
527
|
};
|
|
195
528
|
/** @internal */
|
|
196
|
-
export declare const
|
|
197
|
-
export declare function
|
|
529
|
+
export declare const Reasoning$outboundSchema: z.ZodType<Reasoning$Outbound, Reasoning>;
|
|
530
|
+
export declare function reasoningToJSON(reasoning: Reasoning): string;
|
|
198
531
|
/** @internal */
|
|
199
|
-
export type ResponseFormat$Outbound = ResponseFormatText$Outbound | ResponseFormatJSONObject$Outbound | ResponseFormatJSONSchema$Outbound | ResponseFormatTextGrammar$Outbound |
|
|
532
|
+
export type ResponseFormat$Outbound = ResponseFormatText$Outbound | ResponseFormatJSONObject$Outbound | ResponseFormatJSONSchema$Outbound | ResponseFormatTextGrammar$Outbound | ResponseFormatTextPython$Outbound;
|
|
200
533
|
/** @internal */
|
|
201
534
|
export declare const ResponseFormat$outboundSchema: z.ZodType<ResponseFormat$Outbound, ResponseFormat>;
|
|
202
535
|
export declare function responseFormatToJSON(responseFormat: ResponseFormat): string;
|
|
203
536
|
/** @internal */
|
|
204
|
-
export type Stop$Outbound = string | Array<string
|
|
537
|
+
export type Stop$Outbound = string | Array<string> | any;
|
|
205
538
|
/** @internal */
|
|
206
539
|
export declare const Stop$outboundSchema: z.ZodType<Stop$Outbound, Stop>;
|
|
207
540
|
export declare function stopToJSON(stop: Stop): string;
|
|
208
541
|
/** @internal */
|
|
209
|
-
export type
|
|
210
|
-
echo_upstream_body?: boolean | undefined;
|
|
211
|
-
};
|
|
212
|
-
/** @internal */
|
|
213
|
-
export declare const Debug$outboundSchema: z.ZodType<Debug$Outbound, Debug>;
|
|
214
|
-
export declare function debugToJSON(debug: Debug): string;
|
|
215
|
-
/** @internal */
|
|
216
|
-
export type ChatGenerationParamsImageConfig$Outbound = string | number | Array<any>;
|
|
542
|
+
export type ChatGenerationParamsImageConfig$Outbound = string | number | Array<any | null>;
|
|
217
543
|
/** @internal */
|
|
218
544
|
export declare const ChatGenerationParamsImageConfig$outboundSchema: z.ZodType<ChatGenerationParamsImageConfig$Outbound, ChatGenerationParamsImageConfig>;
|
|
219
545
|
export declare function chatGenerationParamsImageConfigToJSON(chatGenerationParamsImageConfig: ChatGenerationParamsImageConfig): string;
|
|
@@ -221,11 +547,11 @@ export declare function chatGenerationParamsImageConfigToJSON(chatGenerationPara
|
|
|
221
547
|
export declare const Modality$outboundSchema: z.ZodType<string, Modality>;
|
|
222
548
|
/** @internal */
|
|
223
549
|
export type ChatGenerationParams$Outbound = {
|
|
224
|
-
provider?:
|
|
225
|
-
plugins?: Array<
|
|
226
|
-
route?: string | null | undefined;
|
|
550
|
+
provider?: ChatGenerationParamsProvider$Outbound | null | undefined;
|
|
551
|
+
plugins?: Array<ChatGenerationParamsPluginAutoRouter$Outbound | ChatGenerationParamsPluginModeration$Outbound | ChatGenerationParamsPluginWeb$Outbound | ChatGenerationParamsPluginFileParser$Outbound | ChatGenerationParamsPluginResponseHealing$Outbound> | undefined;
|
|
227
552
|
user?: string | undefined;
|
|
228
553
|
session_id?: string | undefined;
|
|
554
|
+
trace?: ChatGenerationParamsTrace$Outbound | undefined;
|
|
229
555
|
messages: Array<Message$Outbound>;
|
|
230
556
|
model?: string | undefined;
|
|
231
557
|
models?: Array<string> | undefined;
|
|
@@ -242,18 +568,19 @@ export type ChatGenerationParams$Outbound = {
|
|
|
242
568
|
} | undefined;
|
|
243
569
|
presence_penalty?: number | null | undefined;
|
|
244
570
|
reasoning?: Reasoning$Outbound | undefined;
|
|
245
|
-
response_format?: ResponseFormatText$Outbound | ResponseFormatJSONObject$Outbound | ResponseFormatJSONSchema$Outbound | ResponseFormatTextGrammar$Outbound |
|
|
571
|
+
response_format?: ResponseFormatText$Outbound | ResponseFormatJSONObject$Outbound | ResponseFormatJSONSchema$Outbound | ResponseFormatTextGrammar$Outbound | ResponseFormatTextPython$Outbound | undefined;
|
|
246
572
|
seed?: number | null | undefined;
|
|
247
|
-
stop?: string | Array<string> | null | undefined;
|
|
573
|
+
stop?: string | Array<string> | any | null | undefined;
|
|
248
574
|
stream: boolean;
|
|
249
575
|
stream_options?: ChatStreamOptions$Outbound | null | undefined;
|
|
250
|
-
temperature
|
|
251
|
-
|
|
576
|
+
temperature: number | null;
|
|
577
|
+
parallel_tool_calls?: boolean | null | undefined;
|
|
578
|
+
tool_choice?: ToolChoiceOption$Outbound | undefined;
|
|
252
579
|
tools?: Array<ToolDefinitionJson$Outbound> | undefined;
|
|
253
|
-
top_p
|
|
254
|
-
debug?:
|
|
580
|
+
top_p: number | null;
|
|
581
|
+
debug?: DebugOptions$Outbound | undefined;
|
|
255
582
|
image_config?: {
|
|
256
|
-
[k: string]: string | number | Array<any>;
|
|
583
|
+
[k: string]: string | number | Array<any | null>;
|
|
257
584
|
} | undefined;
|
|
258
585
|
modalities?: Array<string> | undefined;
|
|
259
586
|
};
|