@ai-sdk/openai 3.0.0-beta.73 → 3.0.0-beta.75
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 +12 -0
- package/dist/index.d.mts +55 -2
- package/dist/index.d.ts +55 -2
- package/dist/index.js +967 -789
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +933 -751
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.d.mts +128 -2
- package/dist/internal/index.d.ts +128 -2
- package/dist/internal/index.js +910 -730
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +890 -711
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @ai-sdk/openai
|
|
2
2
|
|
|
3
|
+
## 3.0.0-beta.75
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 73d9883: chore(openai): enable strict json by default
|
|
8
|
+
|
|
9
|
+
## 3.0.0-beta.74
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 88fc415: feat(openai): add the new provider 'apply_patch' tool
|
|
14
|
+
|
|
3
15
|
## 3.0.0-beta.73
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/dist/index.d.mts
CHANGED
|
@@ -14,7 +14,6 @@ declare const openaiChatLanguageModelOptions: _ai_sdk_provider_utils.LazySchema<
|
|
|
14
14
|
store?: boolean | undefined;
|
|
15
15
|
metadata?: Record<string, string> | undefined;
|
|
16
16
|
prediction?: Record<string, any> | undefined;
|
|
17
|
-
structuredOutputs?: boolean | undefined;
|
|
18
17
|
serviceTier?: "default" | "auto" | "flex" | "priority" | undefined;
|
|
19
18
|
strictJsonSchema?: boolean | undefined;
|
|
20
19
|
textVerbosity?: "low" | "medium" | "high" | undefined;
|
|
@@ -160,7 +159,52 @@ type OpenAIResponsesFileSearchToolCompoundFilter = {
|
|
|
160
159
|
filters: Array<OpenAIResponsesFileSearchToolComparisonFilter | OpenAIResponsesFileSearchToolCompoundFilter>;
|
|
161
160
|
};
|
|
162
161
|
|
|
162
|
+
/**
|
|
163
|
+
* Type definitions for the apply_patch operations.
|
|
164
|
+
*/
|
|
165
|
+
type ApplyPatchOperation = {
|
|
166
|
+
type: 'create_file';
|
|
167
|
+
/**
|
|
168
|
+
* Path of the file to create relative to the workspace root.
|
|
169
|
+
*/
|
|
170
|
+
path: string;
|
|
171
|
+
/**
|
|
172
|
+
* Unified diff content to apply when creating the file.
|
|
173
|
+
*/
|
|
174
|
+
diff: string;
|
|
175
|
+
} | {
|
|
176
|
+
type: 'delete_file';
|
|
177
|
+
/**
|
|
178
|
+
* Path of the file to delete relative to the workspace root.
|
|
179
|
+
*/
|
|
180
|
+
path: string;
|
|
181
|
+
} | {
|
|
182
|
+
type: 'update_file';
|
|
183
|
+
/**
|
|
184
|
+
* Path of the file to update relative to the workspace root.
|
|
185
|
+
*/
|
|
186
|
+
path: string;
|
|
187
|
+
/**
|
|
188
|
+
* Unified diff content to apply to the existing file.
|
|
189
|
+
*/
|
|
190
|
+
diff: string;
|
|
191
|
+
};
|
|
192
|
+
|
|
163
193
|
declare const openaiTools: {
|
|
194
|
+
/**
|
|
195
|
+
* The apply_patch tool lets GPT-5.1 create, update, and delete files in your
|
|
196
|
+
* codebase using structured diffs. Instead of just suggesting edits, the model
|
|
197
|
+
* emits patch operations that your application applies and then reports back on,
|
|
198
|
+
* enabling iterative, multi-step code editing workflows.
|
|
199
|
+
*
|
|
200
|
+
*/
|
|
201
|
+
applyPatch: () => _ai_sdk_provider_utils.Tool<{
|
|
202
|
+
callId: string;
|
|
203
|
+
operation: ApplyPatchOperation;
|
|
204
|
+
}, {
|
|
205
|
+
status: "completed" | "failed";
|
|
206
|
+
output?: string;
|
|
207
|
+
}>;
|
|
164
208
|
/**
|
|
165
209
|
* The Code Interpreter tool allows models to write and run Python code in a
|
|
166
210
|
* sandboxed environment to solve complex problems in domains like data analysis,
|
|
@@ -289,7 +333,16 @@ declare const openaiTools: {
|
|
|
289
333
|
country?: string;
|
|
290
334
|
city?: string;
|
|
291
335
|
region?: string;
|
|
292
|
-
timezone
|
|
336
|
+
timezone
|
|
337
|
+
/**
|
|
338
|
+
* Web search allows models to access up-to-date information from the internet
|
|
339
|
+
* and provide answers with sourced citations.
|
|
340
|
+
*
|
|
341
|
+
* @param filters - The filters to use for the web search.
|
|
342
|
+
* @param searchContextSize - The search context size to use for the web search.
|
|
343
|
+
* @param userLocation - The user location to use for the web search.
|
|
344
|
+
*/
|
|
345
|
+
?: string;
|
|
293
346
|
};
|
|
294
347
|
}>;
|
|
295
348
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -14,7 +14,6 @@ declare const openaiChatLanguageModelOptions: _ai_sdk_provider_utils.LazySchema<
|
|
|
14
14
|
store?: boolean | undefined;
|
|
15
15
|
metadata?: Record<string, string> | undefined;
|
|
16
16
|
prediction?: Record<string, any> | undefined;
|
|
17
|
-
structuredOutputs?: boolean | undefined;
|
|
18
17
|
serviceTier?: "default" | "auto" | "flex" | "priority" | undefined;
|
|
19
18
|
strictJsonSchema?: boolean | undefined;
|
|
20
19
|
textVerbosity?: "low" | "medium" | "high" | undefined;
|
|
@@ -160,7 +159,52 @@ type OpenAIResponsesFileSearchToolCompoundFilter = {
|
|
|
160
159
|
filters: Array<OpenAIResponsesFileSearchToolComparisonFilter | OpenAIResponsesFileSearchToolCompoundFilter>;
|
|
161
160
|
};
|
|
162
161
|
|
|
162
|
+
/**
|
|
163
|
+
* Type definitions for the apply_patch operations.
|
|
164
|
+
*/
|
|
165
|
+
type ApplyPatchOperation = {
|
|
166
|
+
type: 'create_file';
|
|
167
|
+
/**
|
|
168
|
+
* Path of the file to create relative to the workspace root.
|
|
169
|
+
*/
|
|
170
|
+
path: string;
|
|
171
|
+
/**
|
|
172
|
+
* Unified diff content to apply when creating the file.
|
|
173
|
+
*/
|
|
174
|
+
diff: string;
|
|
175
|
+
} | {
|
|
176
|
+
type: 'delete_file';
|
|
177
|
+
/**
|
|
178
|
+
* Path of the file to delete relative to the workspace root.
|
|
179
|
+
*/
|
|
180
|
+
path: string;
|
|
181
|
+
} | {
|
|
182
|
+
type: 'update_file';
|
|
183
|
+
/**
|
|
184
|
+
* Path of the file to update relative to the workspace root.
|
|
185
|
+
*/
|
|
186
|
+
path: string;
|
|
187
|
+
/**
|
|
188
|
+
* Unified diff content to apply to the existing file.
|
|
189
|
+
*/
|
|
190
|
+
diff: string;
|
|
191
|
+
};
|
|
192
|
+
|
|
163
193
|
declare const openaiTools: {
|
|
194
|
+
/**
|
|
195
|
+
* The apply_patch tool lets GPT-5.1 create, update, and delete files in your
|
|
196
|
+
* codebase using structured diffs. Instead of just suggesting edits, the model
|
|
197
|
+
* emits patch operations that your application applies and then reports back on,
|
|
198
|
+
* enabling iterative, multi-step code editing workflows.
|
|
199
|
+
*
|
|
200
|
+
*/
|
|
201
|
+
applyPatch: () => _ai_sdk_provider_utils.Tool<{
|
|
202
|
+
callId: string;
|
|
203
|
+
operation: ApplyPatchOperation;
|
|
204
|
+
}, {
|
|
205
|
+
status: "completed" | "failed";
|
|
206
|
+
output?: string;
|
|
207
|
+
}>;
|
|
164
208
|
/**
|
|
165
209
|
* The Code Interpreter tool allows models to write and run Python code in a
|
|
166
210
|
* sandboxed environment to solve complex problems in domains like data analysis,
|
|
@@ -289,7 +333,16 @@ declare const openaiTools: {
|
|
|
289
333
|
country?: string;
|
|
290
334
|
city?: string;
|
|
291
335
|
region?: string;
|
|
292
|
-
timezone
|
|
336
|
+
timezone
|
|
337
|
+
/**
|
|
338
|
+
* Web search allows models to access up-to-date information from the internet
|
|
339
|
+
* and provide answers with sourced citations.
|
|
340
|
+
*
|
|
341
|
+
* @param filters - The filters to use for the web search.
|
|
342
|
+
* @param searchContextSize - The search context size to use for the web search.
|
|
343
|
+
* @param userLocation - The user location to use for the web search.
|
|
344
|
+
*/
|
|
345
|
+
?: string;
|
|
293
346
|
};
|
|
294
347
|
}>;
|
|
295
348
|
/**
|