@openrouter/sdk 0.3.12 → 0.3.15
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/analyticsGetUserActivity.d.ts +1 -1
- package/esm/funcs/analyticsGetUserActivity.js +1 -1
- package/esm/funcs/apiKeysCreate.d.ts +3 -0
- package/esm/funcs/apiKeysCreate.js +3 -0
- package/esm/funcs/apiKeysDelete.d.ts +3 -0
- package/esm/funcs/apiKeysDelete.js +3 -0
- package/esm/funcs/apiKeysGet.d.ts +3 -0
- package/esm/funcs/apiKeysGet.js +3 -0
- package/esm/funcs/apiKeysList.d.ts +3 -0
- package/esm/funcs/apiKeysList.js +3 -0
- package/esm/funcs/apiKeysUpdate.d.ts +3 -0
- package/esm/funcs/apiKeysUpdate.js +3 -0
- package/esm/funcs/call-model.js +9 -6
- package/esm/funcs/creditsGetCredits.d.ts +1 -1
- package/esm/funcs/creditsGetCredits.js +1 -1
- package/esm/funcs/guardrailsBulkAssignKeys.d.ts +18 -0
- package/esm/funcs/guardrailsBulkAssignKeys.js +89 -0
- package/esm/funcs/guardrailsBulkAssignMembers.d.ts +18 -0
- package/esm/funcs/guardrailsBulkAssignMembers.js +89 -0
- package/esm/funcs/guardrailsBulkUnassignKeys.d.ts +18 -0
- package/esm/funcs/guardrailsBulkUnassignKeys.js +89 -0
- package/esm/funcs/guardrailsBulkUnassignMembers.d.ts +18 -0
- package/esm/funcs/guardrailsBulkUnassignMembers.js +89 -0
- package/esm/funcs/guardrailsCreate.d.ts +18 -0
- package/esm/funcs/guardrailsCreate.js +83 -0
- package/esm/funcs/guardrailsDelete.d.ts +18 -0
- package/esm/funcs/guardrailsDelete.js +88 -0
- package/esm/funcs/{parametersGetParameters.d.ts → guardrailsGet.d.ts} +6 -3
- package/esm/funcs/guardrailsGet.js +88 -0
- package/esm/funcs/guardrailsList.d.ts +18 -0
- package/esm/funcs/guardrailsList.js +87 -0
- package/esm/funcs/guardrailsListGuardrailKeyAssignments.d.ts +18 -0
- package/esm/funcs/guardrailsListGuardrailKeyAssignments.js +93 -0
- package/esm/funcs/guardrailsListGuardrailMemberAssignments.d.ts +18 -0
- package/esm/funcs/guardrailsListGuardrailMemberAssignments.js +93 -0
- package/esm/funcs/guardrailsListKeyAssignments.d.ts +18 -0
- package/esm/funcs/guardrailsListKeyAssignments.js +87 -0
- package/esm/funcs/guardrailsListMemberAssignments.d.ts +18 -0
- package/esm/funcs/guardrailsListMemberAssignments.js +87 -0
- package/esm/funcs/guardrailsUpdate.d.ts +18 -0
- package/esm/funcs/{parametersGetParameters.js → guardrailsUpdate.js} +24 -32
- package/esm/index.d.ts +4 -3
- package/esm/index.js +3 -1
- package/esm/lib/anthropic-compat.test.js +3 -0
- package/esm/lib/async-params.d.ts +46 -6
- package/esm/lib/async-params.js +10 -2
- package/esm/lib/chat-compat.test.js +3 -0
- package/esm/lib/config.d.ts +2 -4
- package/esm/lib/config.js +2 -2
- package/esm/lib/conversation-state.d.ts +61 -0
- package/esm/lib/conversation-state.js +207 -0
- package/esm/lib/model-result.d.ts +175 -2
- package/esm/lib/model-result.js +678 -181
- package/esm/lib/tool-types.d.ts +109 -1
- package/esm/lib/tool-types.js +13 -0
- package/esm/lib/tool.d.ts +21 -1
- package/esm/lib/tool.js +7 -0
- package/esm/models/assistantmessage.d.ts +31 -0
- package/esm/models/assistantmessage.js +43 -0
- package/esm/models/chatgenerationparams.d.ts +93 -12
- package/esm/models/chatgenerationparams.js +75 -6
- package/esm/models/chatgenerationtokenusage.d.ts +1 -0
- package/esm/models/chatgenerationtokenusage.js +2 -0
- package/esm/models/chatmessagecontentitemimage.d.ts +8 -8
- package/esm/models/chatmessagecontentitemimage.js +8 -9
- package/esm/models/chatmessagetokenlogprob.d.ts +4 -4
- package/esm/models/chatmessagetokenlogprob.js +4 -5
- package/esm/models/chatresponsechoice.d.ts +0 -2
- package/esm/models/chatresponsechoice.js +0 -3
- package/esm/models/chatstreamingmessagechunk.d.ts +2 -2
- package/esm/models/chatstreamingmessagechunk.js +2 -2
- package/esm/models/index.d.ts +8 -1
- package/esm/models/index.js +8 -1
- package/esm/models/model.d.ts +4 -0
- package/esm/models/model.js +2 -0
- package/esm/models/openairesponsesinputunion.d.ts +15 -5
- package/esm/models/openairesponsesinputunion.js +5 -5
- package/esm/models/openresponseseasyinputmessage.d.ts +41 -16
- package/esm/models/openresponseseasyinputmessage.js +38 -13
- package/esm/models/openresponsesinputmessageitem.d.ts +37 -12
- package/esm/models/openresponsesinputmessageitem.js +33 -9
- package/esm/models/openresponsesnonstreamingresponse.d.ts +5 -2
- package/esm/models/openresponsesnonstreamingresponse.js +8 -2
- package/esm/models/openresponsesreasoning.d.ts +1 -0
- package/esm/models/openresponsesreasoning.js +1 -0
- package/esm/models/openresponsesrequest.d.ts +61 -24
- package/esm/models/openresponsesrequest.js +39 -6
- package/esm/models/operations/bulkassignkeystoguardrail.d.ts +44 -0
- package/esm/models/operations/bulkassignkeystoguardrail.js +42 -0
- package/esm/models/operations/bulkassignmemberstoguardrail.d.ts +44 -0
- package/esm/models/operations/bulkassignmemberstoguardrail.js +42 -0
- package/esm/models/operations/bulkunassignkeysfromguardrail.d.ts +44 -0
- package/esm/models/operations/bulkunassignkeysfromguardrail.js +42 -0
- package/esm/models/operations/bulkunassignmembersfromguardrail.d.ts +44 -0
- package/esm/models/operations/bulkunassignmembersfromguardrail.js +42 -0
- package/esm/models/operations/createguardrail.d.ts +136 -0
- package/esm/models/operations/createguardrail.js +85 -0
- package/esm/models/operations/deleteguardrail.d.ts +29 -0
- package/esm/models/operations/deleteguardrail.js +21 -0
- package/esm/models/operations/getgeneration.d.ts +4 -0
- package/esm/models/operations/getgeneration.js +1 -0
- package/esm/models/operations/getguardrail.d.ts +92 -0
- package/esm/models/operations/getguardrail.js +60 -0
- package/esm/models/operations/getmodels.d.ts +28 -1
- package/esm/models/operations/getmodels.js +22 -1
- package/esm/models/operations/index.d.ts +13 -1
- package/esm/models/operations/index.js +13 -1
- package/esm/models/operations/listguardrailkeyassignments.d.ts +76 -0
- package/esm/models/operations/listguardrailkeyassignments.js +51 -0
- package/esm/models/operations/listguardrailmemberassignments.d.ts +72 -0
- package/esm/models/operations/listguardrailmemberassignments.js +49 -0
- package/esm/models/operations/listguardrails.d.ts +98 -0
- package/esm/models/operations/listguardrails.js +66 -0
- package/esm/models/operations/listkeyassignments.d.ts +71 -0
- package/esm/models/operations/listkeyassignments.js +50 -0
- package/esm/models/operations/listmemberassignments.d.ts +67 -0
- package/esm/models/operations/listmemberassignments.js +48 -0
- package/esm/models/operations/updateguardrail.d.ts +151 -0
- package/esm/models/operations/updateguardrail.js +97 -0
- package/esm/models/percentilelatencycutoffs.d.ts +33 -0
- package/esm/models/percentilelatencycutoffs.js +16 -0
- package/esm/models/percentilestats.d.ts +28 -0
- package/esm/models/percentilestats.js +17 -0
- package/esm/models/percentilethroughputcutoffs.d.ts +33 -0
- package/esm/models/percentilethroughputcutoffs.js +16 -0
- package/esm/models/preferredmaxlatency.d.ts +12 -0
- package/esm/models/preferredmaxlatency.js +12 -0
- package/esm/models/preferredminthroughput.d.ts +12 -0
- package/esm/models/preferredminthroughput.js +12 -0
- package/esm/models/providername.d.ts +3 -2
- package/esm/models/providername.js +3 -2
- package/esm/models/providerpreferences.d.ts +8 -20
- package/esm/models/providerpreferences.js +6 -6
- package/esm/models/publicendpoint.d.ts +6 -0
- package/esm/models/publicendpoint.js +5 -0
- package/esm/models/responseinputimage.d.ts +11 -3
- package/esm/models/responseinputimage.js +9 -2
- package/esm/models/responseinputvideo.d.ts +20 -0
- package/esm/models/responseinputvideo.js +19 -0
- package/esm/models/responseoutputtext.d.ts +38 -0
- package/esm/models/responseoutputtext.js +50 -0
- package/esm/models/responsesoutputitemreasoning.d.ts +30 -1
- package/esm/models/responsesoutputitemreasoning.js +22 -0
- package/esm/models/responsesoutputmodality.d.ts +10 -0
- package/esm/models/responsesoutputmodality.js +12 -0
- package/esm/models/schema0.d.ts +3 -2
- package/esm/models/schema0.js +3 -2
- package/esm/models/schema2.d.ts +92 -0
- package/esm/models/schema2.js +109 -0
- package/esm/sdk/analytics.d.ts +1 -1
- package/esm/sdk/analytics.js +1 -1
- package/esm/sdk/apikeys.d.ts +15 -0
- package/esm/sdk/apikeys.js +15 -0
- package/esm/sdk/credits.d.ts +1 -1
- package/esm/sdk/credits.js +1 -1
- package/esm/sdk/guardrails.d.ts +96 -0
- package/esm/sdk/guardrails.js +139 -0
- package/esm/sdk/sdk.d.ts +3 -3
- package/esm/sdk/sdk.js +4 -4
- package/esm/types/index.d.ts +2 -0
- package/esm/types/index.js +1 -0
- package/esm/types/models.d.ts +25 -0
- package/esm/types/models.js +10 -0
- package/jsr.json +1 -1
- package/package.json +12 -10
- package/scripts/check-types.js +127 -0
- package/esm/models/operations/getparameters.d.ts +0 -87
- package/esm/models/operations/getparameters.js +0 -73
- package/esm/models/schema3.d.ts +0 -50
- package/esm/models/schema3.js +0 -61
- package/esm/sdk/parameters.d.ts +0 -9
- package/esm/sdk/parameters.js +0 -16
|
@@ -49,6 +49,10 @@ export const Effort = {
|
|
|
49
49
|
Minimal: "minimal",
|
|
50
50
|
None: "none",
|
|
51
51
|
};
|
|
52
|
+
export const Modality = {
|
|
53
|
+
Text: "text",
|
|
54
|
+
Image: "image",
|
|
55
|
+
};
|
|
52
56
|
/** @internal */
|
|
53
57
|
export const ChatGenerationParamsDataCollection$outboundSchema = openEnums.outboundSchema(ChatGenerationParamsDataCollection);
|
|
54
58
|
/** @internal */
|
|
@@ -65,6 +69,42 @@ export function chatGenerationParamsMaxPriceToJSON(chatGenerationParamsMaxPrice)
|
|
|
65
69
|
return JSON.stringify(ChatGenerationParamsMaxPrice$outboundSchema.parse(chatGenerationParamsMaxPrice));
|
|
66
70
|
}
|
|
67
71
|
/** @internal */
|
|
72
|
+
export const ChatGenerationParamsPreferredMinThroughput$outboundSchema = z.object({
|
|
73
|
+
p50: z.nullable(z.number()).optional(),
|
|
74
|
+
p75: z.nullable(z.number()).optional(),
|
|
75
|
+
p90: z.nullable(z.number()).optional(),
|
|
76
|
+
p99: z.nullable(z.number()).optional(),
|
|
77
|
+
});
|
|
78
|
+
export function chatGenerationParamsPreferredMinThroughputToJSON(chatGenerationParamsPreferredMinThroughput) {
|
|
79
|
+
return JSON.stringify(ChatGenerationParamsPreferredMinThroughput$outboundSchema.parse(chatGenerationParamsPreferredMinThroughput));
|
|
80
|
+
}
|
|
81
|
+
/** @internal */
|
|
82
|
+
export const ChatGenerationParamsPreferredMinThroughputUnion$outboundSchema = z.union([
|
|
83
|
+
z.number(),
|
|
84
|
+
z.lazy(() => ChatGenerationParamsPreferredMinThroughput$outboundSchema),
|
|
85
|
+
]);
|
|
86
|
+
export function chatGenerationParamsPreferredMinThroughputUnionToJSON(chatGenerationParamsPreferredMinThroughputUnion) {
|
|
87
|
+
return JSON.stringify(ChatGenerationParamsPreferredMinThroughputUnion$outboundSchema.parse(chatGenerationParamsPreferredMinThroughputUnion));
|
|
88
|
+
}
|
|
89
|
+
/** @internal */
|
|
90
|
+
export const ChatGenerationParamsPreferredMaxLatency$outboundSchema = z.object({
|
|
91
|
+
p50: z.nullable(z.number()).optional(),
|
|
92
|
+
p75: z.nullable(z.number()).optional(),
|
|
93
|
+
p90: z.nullable(z.number()).optional(),
|
|
94
|
+
p99: z.nullable(z.number()).optional(),
|
|
95
|
+
});
|
|
96
|
+
export function chatGenerationParamsPreferredMaxLatencyToJSON(chatGenerationParamsPreferredMaxLatency) {
|
|
97
|
+
return JSON.stringify(ChatGenerationParamsPreferredMaxLatency$outboundSchema.parse(chatGenerationParamsPreferredMaxLatency));
|
|
98
|
+
}
|
|
99
|
+
/** @internal */
|
|
100
|
+
export const ChatGenerationParamsPreferredMaxLatencyUnion$outboundSchema = z.union([
|
|
101
|
+
z.number(),
|
|
102
|
+
z.lazy(() => ChatGenerationParamsPreferredMaxLatency$outboundSchema),
|
|
103
|
+
]);
|
|
104
|
+
export function chatGenerationParamsPreferredMaxLatencyUnionToJSON(chatGenerationParamsPreferredMaxLatencyUnion) {
|
|
105
|
+
return JSON.stringify(ChatGenerationParamsPreferredMaxLatencyUnion$outboundSchema.parse(chatGenerationParamsPreferredMaxLatencyUnion));
|
|
106
|
+
}
|
|
107
|
+
/** @internal */
|
|
68
108
|
export const ChatGenerationParamsProvider$outboundSchema = z.object({
|
|
69
109
|
allowFallbacks: z.nullable(z.boolean()).optional(),
|
|
70
110
|
requireParameters: z.nullable(z.boolean()).optional(),
|
|
@@ -79,10 +119,14 @@ export const ChatGenerationParamsProvider$outboundSchema = z.object({
|
|
|
79
119
|
sort: z.nullable(ProviderSortUnion$outboundSchema).optional(),
|
|
80
120
|
maxPrice: z.lazy(() => ChatGenerationParamsMaxPrice$outboundSchema)
|
|
81
121
|
.optional(),
|
|
82
|
-
preferredMinThroughput: z.nullable(z.
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
122
|
+
preferredMinThroughput: z.nullable(z.union([
|
|
123
|
+
z.number(),
|
|
124
|
+
z.lazy(() => ChatGenerationParamsPreferredMinThroughput$outboundSchema),
|
|
125
|
+
])).optional(),
|
|
126
|
+
preferredMaxLatency: z.nullable(z.union([
|
|
127
|
+
z.number(),
|
|
128
|
+
z.lazy(() => ChatGenerationParamsPreferredMaxLatency$outboundSchema),
|
|
129
|
+
])).optional(),
|
|
86
130
|
}).transform((v) => {
|
|
87
131
|
return remap$(v, {
|
|
88
132
|
allowFallbacks: "allow_fallbacks",
|
|
@@ -92,8 +136,6 @@ export const ChatGenerationParamsProvider$outboundSchema = z.object({
|
|
|
92
136
|
maxPrice: "max_price",
|
|
93
137
|
preferredMinThroughput: "preferred_min_throughput",
|
|
94
138
|
preferredMaxLatency: "preferred_max_latency",
|
|
95
|
-
minThroughput: "min_throughput",
|
|
96
|
-
maxLatency: "max_latency",
|
|
97
139
|
});
|
|
98
140
|
});
|
|
99
141
|
export function chatGenerationParamsProviderToJSON(chatGenerationParamsProvider) {
|
|
@@ -153,7 +195,21 @@ export function chatGenerationParamsPluginModerationToJSON(chatGenerationParamsP
|
|
|
153
195
|
return JSON.stringify(ChatGenerationParamsPluginModeration$outboundSchema.parse(chatGenerationParamsPluginModeration));
|
|
154
196
|
}
|
|
155
197
|
/** @internal */
|
|
198
|
+
export const ChatGenerationParamsPluginAutoRouter$outboundSchema = z.object({
|
|
199
|
+
id: z.literal("auto-router"),
|
|
200
|
+
enabled: z.boolean().optional(),
|
|
201
|
+
allowedModels: z.array(z.string()).optional(),
|
|
202
|
+
}).transform((v) => {
|
|
203
|
+
return remap$(v, {
|
|
204
|
+
allowedModels: "allowed_models",
|
|
205
|
+
});
|
|
206
|
+
});
|
|
207
|
+
export function chatGenerationParamsPluginAutoRouterToJSON(chatGenerationParamsPluginAutoRouter) {
|
|
208
|
+
return JSON.stringify(ChatGenerationParamsPluginAutoRouter$outboundSchema.parse(chatGenerationParamsPluginAutoRouter));
|
|
209
|
+
}
|
|
210
|
+
/** @internal */
|
|
156
211
|
export const ChatGenerationParamsPluginUnion$outboundSchema = z.union([
|
|
212
|
+
z.lazy(() => ChatGenerationParamsPluginAutoRouter$outboundSchema),
|
|
157
213
|
z.lazy(() => ChatGenerationParamsPluginModeration$outboundSchema),
|
|
158
214
|
z.lazy(() => ChatGenerationParamsPluginWeb$outboundSchema),
|
|
159
215
|
z.lazy(() => ChatGenerationParamsPluginFileParser$outboundSchema),
|
|
@@ -225,9 +281,18 @@ export function debugToJSON(debug) {
|
|
|
225
281
|
return JSON.stringify(Debug$outboundSchema.parse(debug));
|
|
226
282
|
}
|
|
227
283
|
/** @internal */
|
|
284
|
+
export const ChatGenerationParamsImageConfig$outboundSchema = z.union([z.string(), z.number()]);
|
|
285
|
+
export function chatGenerationParamsImageConfigToJSON(chatGenerationParamsImageConfig) {
|
|
286
|
+
return JSON.stringify(ChatGenerationParamsImageConfig$outboundSchema.parse(chatGenerationParamsImageConfig));
|
|
287
|
+
}
|
|
288
|
+
/** @internal */
|
|
289
|
+
export const Modality$outboundSchema = openEnums
|
|
290
|
+
.outboundSchema(Modality);
|
|
291
|
+
/** @internal */
|
|
228
292
|
export const ChatGenerationParams$outboundSchema = z.object({
|
|
229
293
|
provider: z.nullable(z.lazy(() => ChatGenerationParamsProvider$outboundSchema)).optional(),
|
|
230
294
|
plugins: z.array(z.union([
|
|
295
|
+
z.lazy(() => ChatGenerationParamsPluginAutoRouter$outboundSchema),
|
|
231
296
|
z.lazy(() => ChatGenerationParamsPluginModeration$outboundSchema),
|
|
232
297
|
z.lazy(() => ChatGenerationParamsPluginWeb$outboundSchema),
|
|
233
298
|
z.lazy(() => ChatGenerationParamsPluginFileParser$outboundSchema),
|
|
@@ -264,6 +329,9 @@ export const ChatGenerationParams$outboundSchema = z.object({
|
|
|
264
329
|
tools: z.array(ToolDefinitionJson$outboundSchema).optional(),
|
|
265
330
|
topP: z.nullable(z.number()).optional(),
|
|
266
331
|
debug: z.lazy(() => Debug$outboundSchema).optional(),
|
|
332
|
+
imageConfig: z.record(z.string(), z.union([z.string(), z.number()]))
|
|
333
|
+
.optional(),
|
|
334
|
+
modalities: z.array(Modality$outboundSchema).optional(),
|
|
267
335
|
}).transform((v) => {
|
|
268
336
|
return remap$(v, {
|
|
269
337
|
sessionId: "session_id",
|
|
@@ -277,6 +345,7 @@ export const ChatGenerationParams$outboundSchema = z.object({
|
|
|
277
345
|
streamOptions: "stream_options",
|
|
278
346
|
toolChoice: "tool_choice",
|
|
279
347
|
topP: "top_p",
|
|
348
|
+
imageConfig: "image_config",
|
|
280
349
|
});
|
|
281
350
|
});
|
|
282
351
|
export function chatGenerationParamsToJSON(chatGenerationParams) {
|
|
@@ -25,11 +25,13 @@ export function completionTokensDetailsFromJSON(jsonString) {
|
|
|
25
25
|
/** @internal */
|
|
26
26
|
export const PromptTokensDetails$inboundSchema = z.object({
|
|
27
27
|
cached_tokens: z.number().optional(),
|
|
28
|
+
cache_write_tokens: z.number().optional(),
|
|
28
29
|
audio_tokens: z.number().optional(),
|
|
29
30
|
video_tokens: z.number().optional(),
|
|
30
31
|
}).transform((v) => {
|
|
31
32
|
return remap$(v, {
|
|
32
33
|
"cached_tokens": "cachedTokens",
|
|
34
|
+
"cache_write_tokens": "cacheWriteTokens",
|
|
33
35
|
"audio_tokens": "audioTokens",
|
|
34
36
|
"video_tokens": "videoTokens",
|
|
35
37
|
});
|
|
@@ -8,35 +8,35 @@ export declare const ChatMessageContentItemImageDetail: {
|
|
|
8
8
|
readonly High: "high";
|
|
9
9
|
};
|
|
10
10
|
export type ChatMessageContentItemImageDetail = OpenEnum<typeof ChatMessageContentItemImageDetail>;
|
|
11
|
-
export type
|
|
11
|
+
export type ChatMessageContentItemImageImageUrl = {
|
|
12
12
|
url: string;
|
|
13
13
|
detail?: ChatMessageContentItemImageDetail | undefined;
|
|
14
14
|
};
|
|
15
15
|
export type ChatMessageContentItemImage = {
|
|
16
16
|
type: "image_url";
|
|
17
|
-
imageUrl:
|
|
17
|
+
imageUrl: ChatMessageContentItemImageImageUrl;
|
|
18
18
|
};
|
|
19
19
|
/** @internal */
|
|
20
20
|
export declare const ChatMessageContentItemImageDetail$inboundSchema: z.ZodType<ChatMessageContentItemImageDetail, unknown>;
|
|
21
21
|
/** @internal */
|
|
22
22
|
export declare const ChatMessageContentItemImageDetail$outboundSchema: z.ZodType<string, ChatMessageContentItemImageDetail>;
|
|
23
23
|
/** @internal */
|
|
24
|
-
export declare const
|
|
24
|
+
export declare const ChatMessageContentItemImageImageUrl$inboundSchema: z.ZodType<ChatMessageContentItemImageImageUrl, unknown>;
|
|
25
25
|
/** @internal */
|
|
26
|
-
export type
|
|
26
|
+
export type ChatMessageContentItemImageImageUrl$Outbound = {
|
|
27
27
|
url: string;
|
|
28
28
|
detail?: string | undefined;
|
|
29
29
|
};
|
|
30
30
|
/** @internal */
|
|
31
|
-
export declare const
|
|
32
|
-
export declare function
|
|
33
|
-
export declare function
|
|
31
|
+
export declare const ChatMessageContentItemImageImageUrl$outboundSchema: z.ZodType<ChatMessageContentItemImageImageUrl$Outbound, ChatMessageContentItemImageImageUrl>;
|
|
32
|
+
export declare function chatMessageContentItemImageImageUrlToJSON(chatMessageContentItemImageImageUrl: ChatMessageContentItemImageImageUrl): string;
|
|
33
|
+
export declare function chatMessageContentItemImageImageUrlFromJSON(jsonString: string): SafeParseResult<ChatMessageContentItemImageImageUrl, SDKValidationError>;
|
|
34
34
|
/** @internal */
|
|
35
35
|
export declare const ChatMessageContentItemImage$inboundSchema: z.ZodType<ChatMessageContentItemImage, unknown>;
|
|
36
36
|
/** @internal */
|
|
37
37
|
export type ChatMessageContentItemImage$Outbound = {
|
|
38
38
|
type: "image_url";
|
|
39
|
-
image_url:
|
|
39
|
+
image_url: ChatMessageContentItemImageImageUrl$Outbound;
|
|
40
40
|
};
|
|
41
41
|
/** @internal */
|
|
42
42
|
export declare const ChatMessageContentItemImage$outboundSchema: z.ZodType<ChatMessageContentItemImage$Outbound, ChatMessageContentItemImage>;
|
|
@@ -16,26 +16,25 @@ export const ChatMessageContentItemImageDetail$inboundSchema = openEnums.inbound
|
|
|
16
16
|
/** @internal */
|
|
17
17
|
export const ChatMessageContentItemImageDetail$outboundSchema = openEnums.outboundSchema(ChatMessageContentItemImageDetail);
|
|
18
18
|
/** @internal */
|
|
19
|
-
export const
|
|
19
|
+
export const ChatMessageContentItemImageImageUrl$inboundSchema = z.object({
|
|
20
20
|
url: z.string(),
|
|
21
21
|
detail: ChatMessageContentItemImageDetail$inboundSchema.optional(),
|
|
22
22
|
});
|
|
23
23
|
/** @internal */
|
|
24
|
-
export const
|
|
25
|
-
.object({
|
|
24
|
+
export const ChatMessageContentItemImageImageUrl$outboundSchema = z.object({
|
|
26
25
|
url: z.string(),
|
|
27
26
|
detail: ChatMessageContentItemImageDetail$outboundSchema.optional(),
|
|
28
27
|
});
|
|
29
|
-
export function
|
|
30
|
-
return JSON.stringify(
|
|
28
|
+
export function chatMessageContentItemImageImageUrlToJSON(chatMessageContentItemImageImageUrl) {
|
|
29
|
+
return JSON.stringify(ChatMessageContentItemImageImageUrl$outboundSchema.parse(chatMessageContentItemImageImageUrl));
|
|
31
30
|
}
|
|
32
|
-
export function
|
|
33
|
-
return safeParse(jsonString, (x) =>
|
|
31
|
+
export function chatMessageContentItemImageImageUrlFromJSON(jsonString) {
|
|
32
|
+
return safeParse(jsonString, (x) => ChatMessageContentItemImageImageUrl$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ChatMessageContentItemImageImageUrl' from JSON`);
|
|
34
33
|
}
|
|
35
34
|
/** @internal */
|
|
36
35
|
export const ChatMessageContentItemImage$inboundSchema = z.object({
|
|
37
36
|
type: z.literal("image_url"),
|
|
38
|
-
image_url: z.lazy(() =>
|
|
37
|
+
image_url: z.lazy(() => ChatMessageContentItemImageImageUrl$inboundSchema),
|
|
39
38
|
}).transform((v) => {
|
|
40
39
|
return remap$(v, {
|
|
41
40
|
"image_url": "imageUrl",
|
|
@@ -44,7 +43,7 @@ export const ChatMessageContentItemImage$inboundSchema = z.object({
|
|
|
44
43
|
/** @internal */
|
|
45
44
|
export const ChatMessageContentItemImage$outboundSchema = z.object({
|
|
46
45
|
type: z.literal("image_url"),
|
|
47
|
-
imageUrl: z.lazy(() =>
|
|
46
|
+
imageUrl: z.lazy(() => ChatMessageContentItemImageImageUrl$outboundSchema),
|
|
48
47
|
}).transform((v) => {
|
|
49
48
|
return remap$(v, {
|
|
50
49
|
imageUrl: "image_url",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as z from "zod/v4";
|
|
2
2
|
import { Result as SafeParseResult } from "../types/fp.js";
|
|
3
3
|
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
4
|
-
export type
|
|
4
|
+
export type ChatMessageTokenLogprobTopLogprob = {
|
|
5
5
|
token: string;
|
|
6
6
|
logprob: number;
|
|
7
7
|
bytes: Array<number> | null;
|
|
@@ -10,11 +10,11 @@ export type ChatMessageTokenLogprob = {
|
|
|
10
10
|
token: string;
|
|
11
11
|
logprob: number;
|
|
12
12
|
bytes: Array<number> | null;
|
|
13
|
-
topLogprobs: Array<
|
|
13
|
+
topLogprobs: Array<ChatMessageTokenLogprobTopLogprob>;
|
|
14
14
|
};
|
|
15
15
|
/** @internal */
|
|
16
|
-
export declare const
|
|
17
|
-
export declare function
|
|
16
|
+
export declare const ChatMessageTokenLogprobTopLogprob$inboundSchema: z.ZodType<ChatMessageTokenLogprobTopLogprob, unknown>;
|
|
17
|
+
export declare function chatMessageTokenLogprobTopLogprobFromJSON(jsonString: string): SafeParseResult<ChatMessageTokenLogprobTopLogprob, SDKValidationError>;
|
|
18
18
|
/** @internal */
|
|
19
19
|
export declare const ChatMessageTokenLogprob$inboundSchema: z.ZodType<ChatMessageTokenLogprob, unknown>;
|
|
20
20
|
export declare function chatMessageTokenLogprobFromJSON(jsonString: string): SafeParseResult<ChatMessageTokenLogprob, SDKValidationError>;
|
|
@@ -6,21 +6,20 @@ import * as z from "zod/v4";
|
|
|
6
6
|
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
7
|
import { safeParse } from "../lib/schemas.js";
|
|
8
8
|
/** @internal */
|
|
9
|
-
export const
|
|
10
|
-
.object({
|
|
9
|
+
export const ChatMessageTokenLogprobTopLogprob$inboundSchema = z.object({
|
|
11
10
|
token: z.string(),
|
|
12
11
|
logprob: z.number(),
|
|
13
12
|
bytes: z.nullable(z.array(z.number())),
|
|
14
13
|
});
|
|
15
|
-
export function
|
|
16
|
-
return safeParse(jsonString, (x) =>
|
|
14
|
+
export function chatMessageTokenLogprobTopLogprobFromJSON(jsonString) {
|
|
15
|
+
return safeParse(jsonString, (x) => ChatMessageTokenLogprobTopLogprob$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ChatMessageTokenLogprobTopLogprob' from JSON`);
|
|
17
16
|
}
|
|
18
17
|
/** @internal */
|
|
19
18
|
export const ChatMessageTokenLogprob$inboundSchema = z.object({
|
|
20
19
|
token: z.string(),
|
|
21
20
|
logprob: z.number(),
|
|
22
21
|
bytes: z.nullable(z.array(z.number())),
|
|
23
|
-
top_logprobs: z.array(z.lazy(() =>
|
|
22
|
+
top_logprobs: z.array(z.lazy(() => ChatMessageTokenLogprobTopLogprob$inboundSchema)),
|
|
24
23
|
}).transform((v) => {
|
|
25
24
|
return remap$(v, {
|
|
26
25
|
"top_logprobs": "topLogprobs",
|
|
@@ -4,12 +4,10 @@ import { AssistantMessage } from "./assistantmessage.js";
|
|
|
4
4
|
import { ChatCompletionFinishReason } from "./chatcompletionfinishreason.js";
|
|
5
5
|
import { ChatMessageTokenLogprobs } from "./chatmessagetokenlogprobs.js";
|
|
6
6
|
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
7
|
-
import { Schema3 } from "./schema3.js";
|
|
8
7
|
export type ChatResponseChoice = {
|
|
9
8
|
finishReason: ChatCompletionFinishReason | null;
|
|
10
9
|
index: number;
|
|
11
10
|
message: AssistantMessage;
|
|
12
|
-
reasoningDetails?: Array<Schema3> | undefined;
|
|
13
11
|
logprobs?: ChatMessageTokenLogprobs | null | undefined;
|
|
14
12
|
};
|
|
15
13
|
/** @internal */
|
|
@@ -8,18 +8,15 @@ import { safeParse } from "../lib/schemas.js";
|
|
|
8
8
|
import { AssistantMessage$inboundSchema, } from "./assistantmessage.js";
|
|
9
9
|
import { ChatCompletionFinishReason$inboundSchema, } from "./chatcompletionfinishreason.js";
|
|
10
10
|
import { ChatMessageTokenLogprobs$inboundSchema, } from "./chatmessagetokenlogprobs.js";
|
|
11
|
-
import { Schema3$inboundSchema } from "./schema3.js";
|
|
12
11
|
/** @internal */
|
|
13
12
|
export const ChatResponseChoice$inboundSchema = z.object({
|
|
14
13
|
finish_reason: z.nullable(ChatCompletionFinishReason$inboundSchema),
|
|
15
14
|
index: z.number(),
|
|
16
15
|
message: AssistantMessage$inboundSchema,
|
|
17
|
-
reasoning_details: z.array(Schema3$inboundSchema).optional(),
|
|
18
16
|
logprobs: z.nullable(ChatMessageTokenLogprobs$inboundSchema).optional(),
|
|
19
17
|
}).transform((v) => {
|
|
20
18
|
return remap$(v, {
|
|
21
19
|
"finish_reason": "finishReason",
|
|
22
|
-
"reasoning_details": "reasoningDetails",
|
|
23
20
|
});
|
|
24
21
|
});
|
|
25
22
|
export function chatResponseChoiceFromJSON(jsonString) {
|
|
@@ -3,7 +3,7 @@ import { ClosedEnum } from "../types/enums.js";
|
|
|
3
3
|
import { Result as SafeParseResult } from "../types/fp.js";
|
|
4
4
|
import { ChatStreamingMessageToolCall } from "./chatstreamingmessagetoolcall.js";
|
|
5
5
|
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
6
|
-
import {
|
|
6
|
+
import { Schema2 } from "./schema2.js";
|
|
7
7
|
export declare const ChatStreamingMessageChunkRole: {
|
|
8
8
|
readonly Assistant: "assistant";
|
|
9
9
|
};
|
|
@@ -14,7 +14,7 @@ export type ChatStreamingMessageChunk = {
|
|
|
14
14
|
reasoning?: string | null | undefined;
|
|
15
15
|
refusal?: string | null | undefined;
|
|
16
16
|
toolCalls?: Array<ChatStreamingMessageToolCall> | undefined;
|
|
17
|
-
reasoningDetails?: Array<
|
|
17
|
+
reasoningDetails?: Array<Schema2> | undefined;
|
|
18
18
|
};
|
|
19
19
|
/** @internal */
|
|
20
20
|
export declare const ChatStreamingMessageChunkRole$inboundSchema: z.ZodEnum<typeof ChatStreamingMessageChunkRole>;
|
|
@@ -6,7 +6,7 @@ import * as z from "zod/v4";
|
|
|
6
6
|
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
7
|
import { safeParse } from "../lib/schemas.js";
|
|
8
8
|
import { ChatStreamingMessageToolCall$inboundSchema, } from "./chatstreamingmessagetoolcall.js";
|
|
9
|
-
import {
|
|
9
|
+
import { Schema2$inboundSchema } from "./schema2.js";
|
|
10
10
|
export const ChatStreamingMessageChunkRole = {
|
|
11
11
|
Assistant: "assistant",
|
|
12
12
|
};
|
|
@@ -19,7 +19,7 @@ export const ChatStreamingMessageChunk$inboundSchema = z.object({
|
|
|
19
19
|
reasoning: z.nullable(z.string()).optional(),
|
|
20
20
|
refusal: z.nullable(z.string()).optional(),
|
|
21
21
|
tool_calls: z.array(ChatStreamingMessageToolCall$inboundSchema).optional(),
|
|
22
|
-
reasoning_details: z.array(
|
|
22
|
+
reasoning_details: z.array(Schema2$inboundSchema).optional(),
|
|
23
23
|
}).transform((v) => {
|
|
24
24
|
return remap$(v, {
|
|
25
25
|
"tool_calls": "toolCalls",
|
package/esm/models/index.d.ts
CHANGED
|
@@ -97,7 +97,12 @@ export * from "./payloadtoolargeresponseerrordata.js";
|
|
|
97
97
|
export * from "./paymentrequiredresponseerrordata.js";
|
|
98
98
|
export * from "./pdfparserengine.js";
|
|
99
99
|
export * from "./pdfparseroptions.js";
|
|
100
|
+
export * from "./percentilelatencycutoffs.js";
|
|
101
|
+
export * from "./percentilestats.js";
|
|
102
|
+
export * from "./percentilethroughputcutoffs.js";
|
|
100
103
|
export * from "./perrequestlimits.js";
|
|
104
|
+
export * from "./preferredmaxlatency.js";
|
|
105
|
+
export * from "./preferredminthroughput.js";
|
|
101
106
|
export * from "./providername.js";
|
|
102
107
|
export * from "./provideroverloadedresponseerrordata.js";
|
|
103
108
|
export * from "./providerpreferences.js";
|
|
@@ -118,6 +123,7 @@ export * from "./responseinputaudio.js";
|
|
|
118
123
|
export * from "./responseinputfile.js";
|
|
119
124
|
export * from "./responseinputimage.js";
|
|
120
125
|
export * from "./responseinputtext.js";
|
|
126
|
+
export * from "./responseinputvideo.js";
|
|
121
127
|
export * from "./responseoutputtext.js";
|
|
122
128
|
export * from "./responseserrorfield.js";
|
|
123
129
|
export * from "./responsesformatjsonobject.js";
|
|
@@ -129,12 +135,13 @@ export * from "./responsesoutputitemfilesearchcall.js";
|
|
|
129
135
|
export * from "./responsesoutputitemfunctioncall.js";
|
|
130
136
|
export * from "./responsesoutputitemreasoning.js";
|
|
131
137
|
export * from "./responsesoutputmessage.js";
|
|
138
|
+
export * from "./responsesoutputmodality.js";
|
|
132
139
|
export * from "./responsessearchcontextsize.js";
|
|
133
140
|
export * from "./responseswebsearchcalloutput.js";
|
|
134
141
|
export * from "./responseswebsearchuserlocation.js";
|
|
135
142
|
export * from "./responsetextconfig.js";
|
|
136
143
|
export * from "./schema0.js";
|
|
137
|
-
export * from "./
|
|
144
|
+
export * from "./schema2.js";
|
|
138
145
|
export * from "./security.js";
|
|
139
146
|
export * from "./serviceunavailableresponseerrordata.js";
|
|
140
147
|
export * from "./systemmessage.js";
|
package/esm/models/index.js
CHANGED
|
@@ -101,7 +101,12 @@ export * from "./payloadtoolargeresponseerrordata.js";
|
|
|
101
101
|
export * from "./paymentrequiredresponseerrordata.js";
|
|
102
102
|
export * from "./pdfparserengine.js";
|
|
103
103
|
export * from "./pdfparseroptions.js";
|
|
104
|
+
export * from "./percentilelatencycutoffs.js";
|
|
105
|
+
export * from "./percentilestats.js";
|
|
106
|
+
export * from "./percentilethroughputcutoffs.js";
|
|
104
107
|
export * from "./perrequestlimits.js";
|
|
108
|
+
export * from "./preferredmaxlatency.js";
|
|
109
|
+
export * from "./preferredminthroughput.js";
|
|
105
110
|
export * from "./providername.js";
|
|
106
111
|
export * from "./provideroverloadedresponseerrordata.js";
|
|
107
112
|
export * from "./providerpreferences.js";
|
|
@@ -122,6 +127,7 @@ export * from "./responseinputaudio.js";
|
|
|
122
127
|
export * from "./responseinputfile.js";
|
|
123
128
|
export * from "./responseinputimage.js";
|
|
124
129
|
export * from "./responseinputtext.js";
|
|
130
|
+
export * from "./responseinputvideo.js";
|
|
125
131
|
export * from "./responseoutputtext.js";
|
|
126
132
|
export * from "./responseserrorfield.js";
|
|
127
133
|
export * from "./responsesformatjsonobject.js";
|
|
@@ -133,12 +139,13 @@ export * from "./responsesoutputitemfilesearchcall.js";
|
|
|
133
139
|
export * from "./responsesoutputitemfunctioncall.js";
|
|
134
140
|
export * from "./responsesoutputitemreasoning.js";
|
|
135
141
|
export * from "./responsesoutputmessage.js";
|
|
142
|
+
export * from "./responsesoutputmodality.js";
|
|
136
143
|
export * from "./responsessearchcontextsize.js";
|
|
137
144
|
export * from "./responseswebsearchcalloutput.js";
|
|
138
145
|
export * from "./responseswebsearchuserlocation.js";
|
|
139
146
|
export * from "./responsetextconfig.js";
|
|
140
147
|
export * from "./schema0.js";
|
|
141
|
-
export * from "./
|
|
148
|
+
export * from "./schema2.js";
|
|
142
149
|
export * from "./security.js";
|
|
143
150
|
export * from "./serviceunavailableresponseerrordata.js";
|
|
144
151
|
export * from "./systemmessage.js";
|
package/esm/models/model.d.ts
CHANGED
|
@@ -63,6 +63,10 @@ export type Model = {
|
|
|
63
63
|
* Default parameters for this model
|
|
64
64
|
*/
|
|
65
65
|
defaultParameters: DefaultParameters | null;
|
|
66
|
+
/**
|
|
67
|
+
* The date after which the model may be removed. ISO 8601 date string (YYYY-MM-DD) or null if no expiration.
|
|
68
|
+
*/
|
|
69
|
+
expirationDate?: string | null | undefined;
|
|
66
70
|
};
|
|
67
71
|
/** @internal */
|
|
68
72
|
export declare const Model$inboundSchema: z.ZodType<Model, unknown>;
|
package/esm/models/model.js
CHANGED
|
@@ -26,6 +26,7 @@ export const Model$inboundSchema = z.object({
|
|
|
26
26
|
per_request_limits: z.nullable(PerRequestLimits$inboundSchema),
|
|
27
27
|
supported_parameters: z.array(Parameter$inboundSchema),
|
|
28
28
|
default_parameters: z.nullable(DefaultParameters$inboundSchema),
|
|
29
|
+
expiration_date: z.nullable(z.string()).optional(),
|
|
29
30
|
}).transform((v) => {
|
|
30
31
|
return remap$(v, {
|
|
31
32
|
"canonical_slug": "canonicalSlug",
|
|
@@ -35,6 +36,7 @@ export const Model$inboundSchema = z.object({
|
|
|
35
36
|
"per_request_limits": "perRequestLimits",
|
|
36
37
|
"supported_parameters": "supportedParameters",
|
|
37
38
|
"default_parameters": "defaultParameters",
|
|
39
|
+
"expiration_date": "expirationDate",
|
|
38
40
|
});
|
|
39
41
|
});
|
|
40
42
|
export function modelFromJSON(jsonString) {
|
|
@@ -49,12 +49,16 @@ export declare const OpenAIResponsesInputRoleUser2: {
|
|
|
49
49
|
};
|
|
50
50
|
export type OpenAIResponsesInputRoleUser2 = ClosedEnum<typeof OpenAIResponsesInputRoleUser2>;
|
|
51
51
|
export type OpenAIResponsesInputRoleUnion2 = OpenAIResponsesInputRoleUser2 | OpenAIResponsesInputRoleSystem2 | OpenAIResponsesInputRoleDeveloper2;
|
|
52
|
-
export type OpenAIResponsesInputContent3 = ResponseInputText | ResponseInputImage
|
|
52
|
+
export type OpenAIResponsesInputContent3 = ResponseInputText | (ResponseInputImage & {
|
|
53
|
+
type: "input_image";
|
|
54
|
+
}) | ResponseInputFile | ResponseInputAudio;
|
|
53
55
|
export type OpenAIResponsesInputMessage2 = {
|
|
54
56
|
id: string;
|
|
55
57
|
type?: OpenAIResponsesInputTypeMessage2 | undefined;
|
|
56
58
|
role: OpenAIResponsesInputRoleUser2 | OpenAIResponsesInputRoleSystem2 | OpenAIResponsesInputRoleDeveloper2;
|
|
57
|
-
content: Array<ResponseInputText | ResponseInputImage
|
|
59
|
+
content: Array<ResponseInputText | (ResponseInputImage & {
|
|
60
|
+
type: "input_image";
|
|
61
|
+
}) | ResponseInputFile | ResponseInputAudio>;
|
|
58
62
|
};
|
|
59
63
|
export declare const OpenAIResponsesInputTypeMessage1: {
|
|
60
64
|
readonly Message: "message";
|
|
@@ -77,12 +81,18 @@ export declare const OpenAIResponsesInputRoleUser1: {
|
|
|
77
81
|
};
|
|
78
82
|
export type OpenAIResponsesInputRoleUser1 = ClosedEnum<typeof OpenAIResponsesInputRoleUser1>;
|
|
79
83
|
export type OpenAIResponsesInputRoleUnion1 = OpenAIResponsesInputRoleUser1 | OpenAIResponsesInputRoleSystem1 | OpenAIResponsesInputRoleAssistant | OpenAIResponsesInputRoleDeveloper1;
|
|
80
|
-
export type OpenAIResponsesInputContent1 = ResponseInputText | ResponseInputImage
|
|
81
|
-
|
|
84
|
+
export type OpenAIResponsesInputContent1 = ResponseInputText | (ResponseInputImage & {
|
|
85
|
+
type: "input_image";
|
|
86
|
+
}) | ResponseInputFile | ResponseInputAudio;
|
|
87
|
+
export type OpenAIResponsesInputContent2 = Array<ResponseInputText | (ResponseInputImage & {
|
|
88
|
+
type: "input_image";
|
|
89
|
+
}) | ResponseInputFile | ResponseInputAudio> | string;
|
|
82
90
|
export type OpenAIResponsesInputMessage1 = {
|
|
83
91
|
type?: OpenAIResponsesInputTypeMessage1 | undefined;
|
|
84
92
|
role: OpenAIResponsesInputRoleUser1 | OpenAIResponsesInputRoleSystem1 | OpenAIResponsesInputRoleAssistant | OpenAIResponsesInputRoleDeveloper1;
|
|
85
|
-
content: Array<ResponseInputText | ResponseInputImage
|
|
93
|
+
content: Array<ResponseInputText | (ResponseInputImage & {
|
|
94
|
+
type: "input_image";
|
|
95
|
+
}) | ResponseInputFile | ResponseInputAudio> | string;
|
|
86
96
|
};
|
|
87
97
|
export type OpenAIResponsesInputUnion1 = OpenAIResponsesInputFunctionCall | OutputMessage | OpenAIResponsesInputMessage2 | OpenAIResponsesInputFunctionCallOutput | OutputItemImageGenerationCall | OpenAIResponsesInputMessage1;
|
|
88
98
|
export type OpenAIResponsesInputUnion = string | Array<OpenAIResponsesInputFunctionCall | OutputMessage | OpenAIResponsesInputMessage2 | OpenAIResponsesInputFunctionCallOutput | OutputItemImageGenerationCall | OpenAIResponsesInputMessage1> | any;
|
|
@@ -100,7 +100,7 @@ export function openAIResponsesInputRoleUnion2FromJSON(jsonString) {
|
|
|
100
100
|
/** @internal */
|
|
101
101
|
export const OpenAIResponsesInputContent3$inboundSchema = z.union([
|
|
102
102
|
ResponseInputText$inboundSchema,
|
|
103
|
-
ResponseInputImage$inboundSchema,
|
|
103
|
+
ResponseInputImage$inboundSchema.and(z.object({ type: z.literal("input_image") })),
|
|
104
104
|
ResponseInputFile$inboundSchema,
|
|
105
105
|
ResponseInputAudio$inboundSchema,
|
|
106
106
|
]);
|
|
@@ -118,7 +118,7 @@ export const OpenAIResponsesInputMessage2$inboundSchema = z.object({
|
|
|
118
118
|
]),
|
|
119
119
|
content: z.array(z.union([
|
|
120
120
|
ResponseInputText$inboundSchema,
|
|
121
|
-
ResponseInputImage$inboundSchema,
|
|
121
|
+
ResponseInputImage$inboundSchema.and(z.object({ type: z.literal("input_image") })),
|
|
122
122
|
ResponseInputFile$inboundSchema,
|
|
123
123
|
ResponseInputAudio$inboundSchema,
|
|
124
124
|
])),
|
|
@@ -149,7 +149,7 @@ export function openAIResponsesInputRoleUnion1FromJSON(jsonString) {
|
|
|
149
149
|
/** @internal */
|
|
150
150
|
export const OpenAIResponsesInputContent1$inboundSchema = z.union([
|
|
151
151
|
ResponseInputText$inboundSchema,
|
|
152
|
-
ResponseInputImage$inboundSchema,
|
|
152
|
+
ResponseInputImage$inboundSchema.and(z.object({ type: z.literal("input_image") })),
|
|
153
153
|
ResponseInputFile$inboundSchema,
|
|
154
154
|
ResponseInputAudio$inboundSchema,
|
|
155
155
|
]);
|
|
@@ -160,7 +160,7 @@ export function openAIResponsesInputContent1FromJSON(jsonString) {
|
|
|
160
160
|
export const OpenAIResponsesInputContent2$inboundSchema = z.union([
|
|
161
161
|
z.array(z.union([
|
|
162
162
|
ResponseInputText$inboundSchema,
|
|
163
|
-
ResponseInputImage$inboundSchema,
|
|
163
|
+
ResponseInputImage$inboundSchema.and(z.object({ type: z.literal("input_image") })),
|
|
164
164
|
ResponseInputFile$inboundSchema,
|
|
165
165
|
ResponseInputAudio$inboundSchema,
|
|
166
166
|
])),
|
|
@@ -181,7 +181,7 @@ export const OpenAIResponsesInputMessage1$inboundSchema = z.object({
|
|
|
181
181
|
content: z.union([
|
|
182
182
|
z.array(z.union([
|
|
183
183
|
ResponseInputText$inboundSchema,
|
|
184
|
-
ResponseInputImage$inboundSchema,
|
|
184
|
+
ResponseInputImage$inboundSchema.and(z.object({ type: z.literal("input_image") })),
|
|
185
185
|
ResponseInputFile$inboundSchema,
|
|
186
186
|
ResponseInputAudio$inboundSchema,
|
|
187
187
|
])),
|