@ai-sdk/openai 2.0.10 → 2.0.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/CHANGELOG.md +18 -0
- package/dist/index.d.mts +4 -3
- package/dist/index.d.ts +4 -3
- package/dist/index.js +108 -11
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +108 -11
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.d.mts +15 -3
- package/dist/internal/index.d.ts +15 -3
- package/dist/internal/index.js +106 -10
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +106 -10
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -2,7 +2,7 @@ import { LanguageModelV2, EmbeddingModelV2, ImageModelV2, TranscriptionModelV2Ca
|
|
|
2
2
|
import { FetchFunction } from '@ai-sdk/provider-utils';
|
|
3
3
|
import { z } from 'zod/v4';
|
|
4
4
|
|
|
5
|
-
type OpenAIChatModelId = 'o1' | 'o1-2024-12-17' | 'o3-mini' | 'o3-mini-2025-01-31' | 'o3' | 'o3-2025-04-16' | '
|
|
5
|
+
type OpenAIChatModelId = 'o1' | 'o1-2024-12-17' | 'o3-mini' | 'o3-mini-2025-01-31' | 'o3' | 'o3-2025-04-16' | 'gpt-4.1' | 'gpt-4.1-2025-04-14' | 'gpt-4.1-mini' | 'gpt-4.1-mini-2025-04-14' | 'gpt-4.1-nano' | 'gpt-4.1-nano-2025-04-14' | 'gpt-4o' | 'gpt-4o-2024-05-13' | 'gpt-4o-2024-08-06' | 'gpt-4o-2024-11-20' | 'gpt-4o-mini' | 'gpt-4o-mini-2024-07-18' | 'gpt-4-turbo' | 'gpt-4-turbo-2024-04-09' | 'gpt-4' | 'gpt-4-0613' | 'gpt-4.5-preview' | 'gpt-4.5-preview-2025-02-27' | 'gpt-3.5-turbo-0125' | 'gpt-3.5-turbo' | 'gpt-3.5-turbo-1106' | 'chatgpt-4o-latest' | 'gpt-5' | 'gpt-5-2025-08-07' | 'gpt-5-mini' | 'gpt-5-mini-2025-08-07' | 'gpt-5-nano' | 'gpt-5-nano-2025-08-07' | 'gpt-5-chat-latest' | (string & {});
|
|
6
6
|
declare const openaiProviderOptions: z.ZodObject<{
|
|
7
7
|
logitBias: z.ZodOptional<z.ZodRecord<z.ZodCoercedNumber<string>, z.ZodNumber>>;
|
|
8
8
|
logprobs: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodNumber]>>;
|
|
@@ -30,6 +30,8 @@ declare const openaiProviderOptions: z.ZodObject<{
|
|
|
30
30
|
medium: "medium";
|
|
31
31
|
high: "high";
|
|
32
32
|
}>>;
|
|
33
|
+
promptCacheKey: z.ZodOptional<z.ZodString>;
|
|
34
|
+
safetyIdentifier: z.ZodOptional<z.ZodString>;
|
|
33
35
|
}, z.core.$strip>;
|
|
34
36
|
type OpenAIProviderOptions = z.infer<typeof openaiProviderOptions>;
|
|
35
37
|
|
|
@@ -97,6 +99,15 @@ type OpenAIConfig = {
|
|
|
97
99
|
headers: () => Record<string, string | undefined>;
|
|
98
100
|
fetch?: FetchFunction;
|
|
99
101
|
generateId?: () => string;
|
|
102
|
+
/**
|
|
103
|
+
* File ID prefixes used to identify file IDs in Responses API.
|
|
104
|
+
* When undefined, all file data is treated as base64 content.
|
|
105
|
+
*
|
|
106
|
+
* Examples:
|
|
107
|
+
* - OpenAI: ['file-'] for IDs like 'file-abc123'
|
|
108
|
+
* - Azure OpenAI: ['assistant-'] for IDs like 'assistant-abc123'
|
|
109
|
+
*/
|
|
110
|
+
fileIdPrefixes?: readonly string[];
|
|
100
111
|
};
|
|
101
112
|
|
|
102
113
|
type OpenAIEmbeddingModelId = 'text-embedding-3-small' | 'text-embedding-3-large' | 'text-embedding-ada-002' | (string & {});
|
|
@@ -191,8 +202,7 @@ declare class OpenAISpeechModel implements SpeechModelV2 {
|
|
|
191
202
|
doGenerate(options: Parameters<SpeechModelV2['doGenerate']>[0]): Promise<Awaited<ReturnType<SpeechModelV2['doGenerate']>>>;
|
|
192
203
|
}
|
|
193
204
|
|
|
194
|
-
|
|
195
|
-
type OpenAIResponsesModelId = (typeof openaiResponsesModelIds)[number] | (string & {});
|
|
205
|
+
type OpenAIResponsesModelId = 'o1' | 'o1-2024-12-17' | 'o3-mini' | 'o3-mini-2025-01-31' | 'o3' | 'o3-2025-04-16' | 'gpt-5' | 'gpt-5-2025-08-07' | 'gpt-5-mini' | 'gpt-5-mini-2025-08-07' | 'gpt-5-nano' | 'gpt-5-nano-2025-08-07' | 'gpt-5-chat-latest' | 'gpt-4.1' | 'gpt-4.1-2025-04-14' | 'gpt-4.1-mini' | 'gpt-4.1-mini-2025-04-14' | 'gpt-4.1-nano' | 'gpt-4.1-nano-2025-04-14' | 'gpt-4o' | 'gpt-4o-2024-05-13' | 'gpt-4o-2024-08-06' | 'gpt-4o-2024-11-20' | 'gpt-4o-mini' | 'gpt-4o-mini-2024-07-18' | 'gpt-4-turbo' | 'gpt-4-turbo-2024-04-09' | 'gpt-4' | 'gpt-4-0613' | 'gpt-3.5-turbo-0125' | 'gpt-3.5-turbo' | 'gpt-3.5-turbo-1106' | 'chatgpt-4o-latest' | (string & {});
|
|
196
206
|
|
|
197
207
|
declare class OpenAIResponsesLanguageModel implements LanguageModelV2 {
|
|
198
208
|
readonly specificationVersion = "v2";
|
|
@@ -229,6 +239,8 @@ declare const openaiResponsesProviderOptionsSchema: z.ZodObject<{
|
|
|
229
239
|
medium: "medium";
|
|
230
240
|
high: "high";
|
|
231
241
|
}>>>;
|
|
242
|
+
promptCacheKey: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
243
|
+
safetyIdentifier: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
232
244
|
}, z.core.$strip>;
|
|
233
245
|
type OpenAIResponsesProviderOptions = z.infer<typeof openaiResponsesProviderOptionsSchema>;
|
|
234
246
|
|
package/dist/internal/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { LanguageModelV2, EmbeddingModelV2, ImageModelV2, TranscriptionModelV2Ca
|
|
|
2
2
|
import { FetchFunction } from '@ai-sdk/provider-utils';
|
|
3
3
|
import { z } from 'zod/v4';
|
|
4
4
|
|
|
5
|
-
type OpenAIChatModelId = 'o1' | 'o1-2024-12-17' | 'o3-mini' | 'o3-mini-2025-01-31' | 'o3' | 'o3-2025-04-16' | '
|
|
5
|
+
type OpenAIChatModelId = 'o1' | 'o1-2024-12-17' | 'o3-mini' | 'o3-mini-2025-01-31' | 'o3' | 'o3-2025-04-16' | 'gpt-4.1' | 'gpt-4.1-2025-04-14' | 'gpt-4.1-mini' | 'gpt-4.1-mini-2025-04-14' | 'gpt-4.1-nano' | 'gpt-4.1-nano-2025-04-14' | 'gpt-4o' | 'gpt-4o-2024-05-13' | 'gpt-4o-2024-08-06' | 'gpt-4o-2024-11-20' | 'gpt-4o-mini' | 'gpt-4o-mini-2024-07-18' | 'gpt-4-turbo' | 'gpt-4-turbo-2024-04-09' | 'gpt-4' | 'gpt-4-0613' | 'gpt-4.5-preview' | 'gpt-4.5-preview-2025-02-27' | 'gpt-3.5-turbo-0125' | 'gpt-3.5-turbo' | 'gpt-3.5-turbo-1106' | 'chatgpt-4o-latest' | 'gpt-5' | 'gpt-5-2025-08-07' | 'gpt-5-mini' | 'gpt-5-mini-2025-08-07' | 'gpt-5-nano' | 'gpt-5-nano-2025-08-07' | 'gpt-5-chat-latest' | (string & {});
|
|
6
6
|
declare const openaiProviderOptions: z.ZodObject<{
|
|
7
7
|
logitBias: z.ZodOptional<z.ZodRecord<z.ZodCoercedNumber<string>, z.ZodNumber>>;
|
|
8
8
|
logprobs: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodNumber]>>;
|
|
@@ -30,6 +30,8 @@ declare const openaiProviderOptions: z.ZodObject<{
|
|
|
30
30
|
medium: "medium";
|
|
31
31
|
high: "high";
|
|
32
32
|
}>>;
|
|
33
|
+
promptCacheKey: z.ZodOptional<z.ZodString>;
|
|
34
|
+
safetyIdentifier: z.ZodOptional<z.ZodString>;
|
|
33
35
|
}, z.core.$strip>;
|
|
34
36
|
type OpenAIProviderOptions = z.infer<typeof openaiProviderOptions>;
|
|
35
37
|
|
|
@@ -97,6 +99,15 @@ type OpenAIConfig = {
|
|
|
97
99
|
headers: () => Record<string, string | undefined>;
|
|
98
100
|
fetch?: FetchFunction;
|
|
99
101
|
generateId?: () => string;
|
|
102
|
+
/**
|
|
103
|
+
* File ID prefixes used to identify file IDs in Responses API.
|
|
104
|
+
* When undefined, all file data is treated as base64 content.
|
|
105
|
+
*
|
|
106
|
+
* Examples:
|
|
107
|
+
* - OpenAI: ['file-'] for IDs like 'file-abc123'
|
|
108
|
+
* - Azure OpenAI: ['assistant-'] for IDs like 'assistant-abc123'
|
|
109
|
+
*/
|
|
110
|
+
fileIdPrefixes?: readonly string[];
|
|
100
111
|
};
|
|
101
112
|
|
|
102
113
|
type OpenAIEmbeddingModelId = 'text-embedding-3-small' | 'text-embedding-3-large' | 'text-embedding-ada-002' | (string & {});
|
|
@@ -191,8 +202,7 @@ declare class OpenAISpeechModel implements SpeechModelV2 {
|
|
|
191
202
|
doGenerate(options: Parameters<SpeechModelV2['doGenerate']>[0]): Promise<Awaited<ReturnType<SpeechModelV2['doGenerate']>>>;
|
|
192
203
|
}
|
|
193
204
|
|
|
194
|
-
|
|
195
|
-
type OpenAIResponsesModelId = (typeof openaiResponsesModelIds)[number] | (string & {});
|
|
205
|
+
type OpenAIResponsesModelId = 'o1' | 'o1-2024-12-17' | 'o3-mini' | 'o3-mini-2025-01-31' | 'o3' | 'o3-2025-04-16' | 'gpt-5' | 'gpt-5-2025-08-07' | 'gpt-5-mini' | 'gpt-5-mini-2025-08-07' | 'gpt-5-nano' | 'gpt-5-nano-2025-08-07' | 'gpt-5-chat-latest' | 'gpt-4.1' | 'gpt-4.1-2025-04-14' | 'gpt-4.1-mini' | 'gpt-4.1-mini-2025-04-14' | 'gpt-4.1-nano' | 'gpt-4.1-nano-2025-04-14' | 'gpt-4o' | 'gpt-4o-2024-05-13' | 'gpt-4o-2024-08-06' | 'gpt-4o-2024-11-20' | 'gpt-4o-mini' | 'gpt-4o-mini-2024-07-18' | 'gpt-4-turbo' | 'gpt-4-turbo-2024-04-09' | 'gpt-4' | 'gpt-4-0613' | 'gpt-3.5-turbo-0125' | 'gpt-3.5-turbo' | 'gpt-3.5-turbo-1106' | 'chatgpt-4o-latest' | (string & {});
|
|
196
206
|
|
|
197
207
|
declare class OpenAIResponsesLanguageModel implements LanguageModelV2 {
|
|
198
208
|
readonly specificationVersion = "v2";
|
|
@@ -229,6 +239,8 @@ declare const openaiResponsesProviderOptionsSchema: z.ZodObject<{
|
|
|
229
239
|
medium: "medium";
|
|
230
240
|
high: "high";
|
|
231
241
|
}>>>;
|
|
242
|
+
promptCacheKey: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
243
|
+
safetyIdentifier: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
232
244
|
}, z.core.$strip>;
|
|
233
245
|
type OpenAIResponsesProviderOptions = z.infer<typeof openaiResponsesProviderOptionsSchema>;
|
|
234
246
|
|
package/dist/internal/index.js
CHANGED
|
@@ -342,7 +342,20 @@ var openaiProviderOptions = import_v42.z.object({
|
|
|
342
342
|
* Controls the verbosity of the model's responses.
|
|
343
343
|
* Lower values will result in more concise responses, while higher values will result in more verbose responses.
|
|
344
344
|
*/
|
|
345
|
-
textVerbosity: import_v42.z.enum(["low", "medium", "high"]).optional()
|
|
345
|
+
textVerbosity: import_v42.z.enum(["low", "medium", "high"]).optional(),
|
|
346
|
+
/**
|
|
347
|
+
* A cache key for prompt caching. Allows manual control over prompt caching behavior.
|
|
348
|
+
* Useful for improving cache hit rates and working around automatic caching issues.
|
|
349
|
+
*/
|
|
350
|
+
promptCacheKey: import_v42.z.string().optional(),
|
|
351
|
+
/**
|
|
352
|
+
* A stable identifier used to help detect users of your application
|
|
353
|
+
* that may be violating OpenAI's usage policies. The IDs should be a
|
|
354
|
+
* string that uniquely identifies each user. We recommend hashing their
|
|
355
|
+
* username or email address, in order to avoid sending us any identifying
|
|
356
|
+
* information.
|
|
357
|
+
*/
|
|
358
|
+
safetyIdentifier: import_v42.z.string().optional()
|
|
346
359
|
});
|
|
347
360
|
|
|
348
361
|
// src/chat/openai-chat-prepare-tools.ts
|
|
@@ -613,6 +626,8 @@ var OpenAIChatLanguageModel = class {
|
|
|
613
626
|
prediction: openaiOptions.prediction,
|
|
614
627
|
reasoning_effort: openaiOptions.reasoningEffort,
|
|
615
628
|
service_tier: openaiOptions.serviceTier,
|
|
629
|
+
prompt_cache_key: openaiOptions.promptCacheKey,
|
|
630
|
+
safety_identifier: openaiOptions.safetyIdentifier,
|
|
616
631
|
// messages:
|
|
617
632
|
messages
|
|
618
633
|
};
|
|
@@ -2091,9 +2106,14 @@ var import_provider6 = require("@ai-sdk/provider");
|
|
|
2091
2106
|
var import_provider_utils11 = require("@ai-sdk/provider-utils");
|
|
2092
2107
|
var import_v414 = require("zod/v4");
|
|
2093
2108
|
var import_provider_utils12 = require("@ai-sdk/provider-utils");
|
|
2109
|
+
function isFileId(data, prefixes) {
|
|
2110
|
+
if (!prefixes) return false;
|
|
2111
|
+
return prefixes.some((prefix) => data.startsWith(prefix));
|
|
2112
|
+
}
|
|
2094
2113
|
async function convertToOpenAIResponsesMessages({
|
|
2095
2114
|
prompt,
|
|
2096
|
-
systemMessageMode
|
|
2115
|
+
systemMessageMode,
|
|
2116
|
+
fileIdPrefixes
|
|
2097
2117
|
}) {
|
|
2098
2118
|
var _a, _b, _c, _d, _e, _f;
|
|
2099
2119
|
const messages = [];
|
|
@@ -2140,7 +2160,7 @@ async function convertToOpenAIResponsesMessages({
|
|
|
2140
2160
|
const mediaType = part.mediaType === "image/*" ? "image/jpeg" : part.mediaType;
|
|
2141
2161
|
return {
|
|
2142
2162
|
type: "input_image",
|
|
2143
|
-
...part.data instanceof URL ? { image_url: part.data.toString() } : typeof part.data === "string" && part.data
|
|
2163
|
+
...part.data instanceof URL ? { image_url: part.data.toString() } : typeof part.data === "string" && isFileId(part.data, fileIdPrefixes) ? { file_id: part.data } : {
|
|
2144
2164
|
image_url: `data:${mediaType};base64,${(0, import_provider_utils12.convertToBase64)(part.data)}`
|
|
2145
2165
|
},
|
|
2146
2166
|
detail: (_b2 = (_a2 = part.providerOptions) == null ? void 0 : _a2.openai) == null ? void 0 : _b2.imageDetail
|
|
@@ -2153,7 +2173,7 @@ async function convertToOpenAIResponsesMessages({
|
|
|
2153
2173
|
}
|
|
2154
2174
|
return {
|
|
2155
2175
|
type: "input_file",
|
|
2156
|
-
...typeof part.data === "string" && part.data
|
|
2176
|
+
...typeof part.data === "string" && isFileId(part.data, fileIdPrefixes) ? { file_id: part.data } : {
|
|
2157
2177
|
filename: (_c2 = part.filename) != null ? _c2 : `part-${index}.pdf`,
|
|
2158
2178
|
file_data: `data:application/pdf;base64,${(0, import_provider_utils12.convertToBase64)(part.data)}`
|
|
2159
2179
|
}
|
|
@@ -2459,7 +2479,8 @@ var OpenAIResponsesLanguageModel = class {
|
|
|
2459
2479
|
}
|
|
2460
2480
|
const { messages, warnings: messageWarnings } = await convertToOpenAIResponsesMessages({
|
|
2461
2481
|
prompt,
|
|
2462
|
-
systemMessageMode: modelConfig.systemMessageMode
|
|
2482
|
+
systemMessageMode: modelConfig.systemMessageMode,
|
|
2483
|
+
fileIdPrefixes: this.config.fileIdPrefixes
|
|
2463
2484
|
});
|
|
2464
2485
|
warnings.push(...messageWarnings);
|
|
2465
2486
|
const openaiOptions = await (0, import_provider_utils14.parseProviderOptions)({
|
|
@@ -2499,6 +2520,8 @@ var OpenAIResponsesLanguageModel = class {
|
|
|
2499
2520
|
instructions: openaiOptions == null ? void 0 : openaiOptions.instructions,
|
|
2500
2521
|
service_tier: openaiOptions == null ? void 0 : openaiOptions.serviceTier,
|
|
2501
2522
|
include: openaiOptions == null ? void 0 : openaiOptions.include,
|
|
2523
|
+
prompt_cache_key: openaiOptions == null ? void 0 : openaiOptions.promptCacheKey,
|
|
2524
|
+
safety_identifier: openaiOptions == null ? void 0 : openaiOptions.safetyIdentifier,
|
|
2502
2525
|
// model-specific settings:
|
|
2503
2526
|
...modelConfig.isReasoningModel && ((openaiOptions == null ? void 0 : openaiOptions.reasoningEffort) != null || (openaiOptions == null ? void 0 : openaiOptions.reasoningSummary) != null) && {
|
|
2504
2527
|
reasoning: {
|
|
@@ -2648,7 +2671,18 @@ var OpenAIResponsesLanguageModel = class {
|
|
|
2648
2671
|
import_v416.z.object({
|
|
2649
2672
|
type: import_v416.z.literal("file_search_call"),
|
|
2650
2673
|
id: import_v416.z.string(),
|
|
2651
|
-
status: import_v416.z.string().optional()
|
|
2674
|
+
status: import_v416.z.string().optional(),
|
|
2675
|
+
queries: import_v416.z.array(import_v416.z.string()).nullish(),
|
|
2676
|
+
results: import_v416.z.array(
|
|
2677
|
+
import_v416.z.object({
|
|
2678
|
+
attributes: import_v416.z.object({
|
|
2679
|
+
file_id: import_v416.z.string(),
|
|
2680
|
+
filename: import_v416.z.string(),
|
|
2681
|
+
score: import_v416.z.number(),
|
|
2682
|
+
text: import_v416.z.string()
|
|
2683
|
+
})
|
|
2684
|
+
})
|
|
2685
|
+
).nullish()
|
|
2652
2686
|
}),
|
|
2653
2687
|
import_v416.z.object({
|
|
2654
2688
|
type: import_v416.z.literal("reasoning"),
|
|
@@ -2790,7 +2824,9 @@ var OpenAIResponsesLanguageModel = class {
|
|
|
2790
2824
|
toolName: "file_search",
|
|
2791
2825
|
result: {
|
|
2792
2826
|
type: "file_search_tool_result",
|
|
2793
|
-
status: part.status || "completed"
|
|
2827
|
+
status: part.status || "completed",
|
|
2828
|
+
...part.queries && { queries: part.queries },
|
|
2829
|
+
...part.results && { results: part.results }
|
|
2794
2830
|
},
|
|
2795
2831
|
providerExecuted: true
|
|
2796
2832
|
});
|
|
@@ -2905,6 +2941,16 @@ var OpenAIResponsesLanguageModel = class {
|
|
|
2905
2941
|
id: value.item.id,
|
|
2906
2942
|
toolName: "computer_use"
|
|
2907
2943
|
});
|
|
2944
|
+
} else if (value.item.type === "file_search_call") {
|
|
2945
|
+
ongoingToolCalls[value.output_index] = {
|
|
2946
|
+
toolName: "file_search",
|
|
2947
|
+
toolCallId: value.item.id
|
|
2948
|
+
};
|
|
2949
|
+
controller.enqueue({
|
|
2950
|
+
type: "tool-input-start",
|
|
2951
|
+
id: value.item.id,
|
|
2952
|
+
toolName: "file_search"
|
|
2953
|
+
});
|
|
2908
2954
|
} else if (value.item.type === "message") {
|
|
2909
2955
|
controller.enqueue({
|
|
2910
2956
|
type: "text-start",
|
|
@@ -2998,6 +3044,32 @@ var OpenAIResponsesLanguageModel = class {
|
|
|
2998
3044
|
},
|
|
2999
3045
|
providerExecuted: true
|
|
3000
3046
|
});
|
|
3047
|
+
} else if (value.item.type === "file_search_call") {
|
|
3048
|
+
ongoingToolCalls[value.output_index] = void 0;
|
|
3049
|
+
hasToolCalls = true;
|
|
3050
|
+
controller.enqueue({
|
|
3051
|
+
type: "tool-input-end",
|
|
3052
|
+
id: value.item.id
|
|
3053
|
+
});
|
|
3054
|
+
controller.enqueue({
|
|
3055
|
+
type: "tool-call",
|
|
3056
|
+
toolCallId: value.item.id,
|
|
3057
|
+
toolName: "file_search",
|
|
3058
|
+
input: "",
|
|
3059
|
+
providerExecuted: true
|
|
3060
|
+
});
|
|
3061
|
+
controller.enqueue({
|
|
3062
|
+
type: "tool-result",
|
|
3063
|
+
toolCallId: value.item.id,
|
|
3064
|
+
toolName: "file_search",
|
|
3065
|
+
result: {
|
|
3066
|
+
type: "file_search_tool_result",
|
|
3067
|
+
status: value.item.status || "completed",
|
|
3068
|
+
...value.item.queries && { queries: value.item.queries },
|
|
3069
|
+
...value.item.results && { results: value.item.results }
|
|
3070
|
+
},
|
|
3071
|
+
providerExecuted: true
|
|
3072
|
+
});
|
|
3001
3073
|
} else if (value.item.type === "message") {
|
|
3002
3074
|
controller.enqueue({
|
|
3003
3075
|
type: "text-end",
|
|
@@ -3176,7 +3248,18 @@ var responseOutputItemAddedSchema = import_v416.z.object({
|
|
|
3176
3248
|
import_v416.z.object({
|
|
3177
3249
|
type: import_v416.z.literal("file_search_call"),
|
|
3178
3250
|
id: import_v416.z.string(),
|
|
3179
|
-
status: import_v416.z.string()
|
|
3251
|
+
status: import_v416.z.string(),
|
|
3252
|
+
queries: import_v416.z.array(import_v416.z.string()).nullish(),
|
|
3253
|
+
results: import_v416.z.array(
|
|
3254
|
+
import_v416.z.object({
|
|
3255
|
+
attributes: import_v416.z.object({
|
|
3256
|
+
file_id: import_v416.z.string(),
|
|
3257
|
+
filename: import_v416.z.string(),
|
|
3258
|
+
score: import_v416.z.number(),
|
|
3259
|
+
text: import_v416.z.string()
|
|
3260
|
+
})
|
|
3261
|
+
})
|
|
3262
|
+
).optional()
|
|
3180
3263
|
})
|
|
3181
3264
|
])
|
|
3182
3265
|
});
|
|
@@ -3214,7 +3297,18 @@ var responseOutputItemDoneSchema = import_v416.z.object({
|
|
|
3214
3297
|
import_v416.z.object({
|
|
3215
3298
|
type: import_v416.z.literal("file_search_call"),
|
|
3216
3299
|
id: import_v416.z.string(),
|
|
3217
|
-
status: import_v416.z.literal("completed")
|
|
3300
|
+
status: import_v416.z.literal("completed"),
|
|
3301
|
+
queries: import_v416.z.array(import_v416.z.string()).nullish(),
|
|
3302
|
+
results: import_v416.z.array(
|
|
3303
|
+
import_v416.z.object({
|
|
3304
|
+
attributes: import_v416.z.object({
|
|
3305
|
+
file_id: import_v416.z.string(),
|
|
3306
|
+
filename: import_v416.z.string(),
|
|
3307
|
+
score: import_v416.z.number(),
|
|
3308
|
+
text: import_v416.z.string()
|
|
3309
|
+
})
|
|
3310
|
+
})
|
|
3311
|
+
).nullish()
|
|
3218
3312
|
})
|
|
3219
3313
|
])
|
|
3220
3314
|
});
|
|
@@ -3332,7 +3426,9 @@ var openaiResponsesProviderOptionsSchema = import_v416.z.object({
|
|
|
3332
3426
|
reasoningSummary: import_v416.z.string().nullish(),
|
|
3333
3427
|
serviceTier: import_v416.z.enum(["auto", "flex", "priority"]).nullish(),
|
|
3334
3428
|
include: import_v416.z.array(import_v416.z.enum(["reasoning.encrypted_content", "file_search_call.results"])).nullish(),
|
|
3335
|
-
textVerbosity: import_v416.z.enum(["low", "medium", "high"]).nullish()
|
|
3429
|
+
textVerbosity: import_v416.z.enum(["low", "medium", "high"]).nullish(),
|
|
3430
|
+
promptCacheKey: import_v416.z.string().nullish(),
|
|
3431
|
+
safetyIdentifier: import_v416.z.string().nullish()
|
|
3336
3432
|
});
|
|
3337
3433
|
// Annotate the CommonJS export names for ESM import in node:
|
|
3338
3434
|
0 && (module.exports = {
|