@ai-sdk/openai 3.0.0-beta.73 → 3.0.0-beta.74

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