@ai-sdk/provider-utils 5.0.0-beta.5 → 5.0.0-beta.50

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.
Files changed (117) hide show
  1. package/CHANGELOG.md +369 -11
  2. package/dist/index.d.ts +1461 -571
  3. package/dist/index.js +1044 -361
  4. package/dist/index.js.map +1 -1
  5. package/dist/test/index.d.ts +2 -1
  6. package/dist/test/index.js +18 -37
  7. package/dist/test/index.js.map +1 -1
  8. package/package.json +16 -16
  9. package/src/add-additional-properties-to-json-schema.ts +1 -1
  10. package/src/as-array.ts +12 -0
  11. package/src/cancel-response-body.ts +19 -0
  12. package/src/convert-image-model-file-to-data-uri.ts +1 -1
  13. package/src/convert-inline-file-data-to-uint8-array.ts +30 -0
  14. package/src/create-tool-name-mapping.ts +1 -1
  15. package/src/detect-media-type.ts +312 -0
  16. package/src/download-blob.ts +8 -9
  17. package/src/extract-lines.ts +31 -0
  18. package/src/fetch-with-validated-redirects.ts +87 -0
  19. package/src/filter-nullable.ts +11 -0
  20. package/src/get-error-message.ts +1 -15
  21. package/src/get-from-api.ts +2 -2
  22. package/src/has-required-key.ts +6 -0
  23. package/src/index.ts +47 -12
  24. package/src/inject-json-instruction.ts +1 -1
  25. package/src/is-browser-runtime.ts +13 -0
  26. package/src/is-buffer.ts +9 -0
  27. package/src/is-json-serializable.ts +29 -0
  28. package/src/is-provider-reference.ts +21 -0
  29. package/src/is-same-origin.ts +19 -0
  30. package/src/is-url-supported.ts +17 -2
  31. package/src/load-api-key.ts +1 -1
  32. package/src/load-setting.ts +1 -1
  33. package/src/map-reasoning-to-provider.ts +108 -0
  34. package/src/maybe-promise-like.ts +3 -0
  35. package/src/parse-json-event-stream.ts +3 -3
  36. package/src/parse-json.ts +3 -3
  37. package/src/parse-provider-options.ts +1 -1
  38. package/src/post-to-api.ts +4 -4
  39. package/src/provider-defined-tool-factory.ts +129 -0
  40. package/src/provider-executed-tool-factory.ts +69 -0
  41. package/src/read-response-with-size-limit.ts +4 -0
  42. package/src/resolve-full-media-type.ts +49 -0
  43. package/src/resolve-provider-reference.ts +26 -0
  44. package/src/resolve.ts +16 -1
  45. package/src/response-handler.ts +3 -3
  46. package/src/schema.ts +11 -4
  47. package/src/secure-json-parse.ts +1 -1
  48. package/src/serialize-model-options.ts +63 -0
  49. package/src/streaming-tool-call-tracker.ts +241 -0
  50. package/src/test/convert-response-stream-to-array.ts +1 -1
  51. package/src/test/is-node-version.ts +22 -1
  52. package/src/to-json-schema/zod3-to-json-schema/options.ts +3 -3
  53. package/src/to-json-schema/zod3-to-json-schema/parse-def.ts +3 -3
  54. package/src/to-json-schema/zod3-to-json-schema/parse-types.ts +22 -22
  55. package/src/to-json-schema/zod3-to-json-schema/parsers/array.ts +3 -3
  56. package/src/to-json-schema/zod3-to-json-schema/parsers/bigint.ts +1 -1
  57. package/src/to-json-schema/zod3-to-json-schema/parsers/branded.ts +2 -2
  58. package/src/to-json-schema/zod3-to-json-schema/parsers/catch.ts +2 -2
  59. package/src/to-json-schema/zod3-to-json-schema/parsers/date.ts +4 -4
  60. package/src/to-json-schema/zod3-to-json-schema/parsers/default.ts +3 -3
  61. package/src/to-json-schema/zod3-to-json-schema/parsers/effects.ts +3 -3
  62. package/src/to-json-schema/zod3-to-json-schema/parsers/enum.ts +1 -1
  63. package/src/to-json-schema/zod3-to-json-schema/parsers/intersection.ts +5 -5
  64. package/src/to-json-schema/zod3-to-json-schema/parsers/literal.ts +1 -1
  65. package/src/to-json-schema/zod3-to-json-schema/parsers/map.ts +4 -5
  66. package/src/to-json-schema/zod3-to-json-schema/parsers/native-enum.ts +1 -1
  67. package/src/to-json-schema/zod3-to-json-schema/parsers/never.ts +1 -2
  68. package/src/to-json-schema/zod3-to-json-schema/parsers/nullable.ts +4 -4
  69. package/src/to-json-schema/zod3-to-json-schema/parsers/number.ts +1 -1
  70. package/src/to-json-schema/zod3-to-json-schema/parsers/object.ts +3 -3
  71. package/src/to-json-schema/zod3-to-json-schema/parsers/optional.ts +3 -3
  72. package/src/to-json-schema/zod3-to-json-schema/parsers/pipeline.ts +10 -8
  73. package/src/to-json-schema/zod3-to-json-schema/parsers/promise.ts +3 -3
  74. package/src/to-json-schema/zod3-to-json-schema/parsers/readonly.ts +2 -2
  75. package/src/to-json-schema/zod3-to-json-schema/parsers/record.ts +9 -10
  76. package/src/to-json-schema/zod3-to-json-schema/parsers/set.ts +3 -3
  77. package/src/to-json-schema/zod3-to-json-schema/parsers/string.ts +2 -2
  78. package/src/to-json-schema/zod3-to-json-schema/parsers/tuple.ts +3 -3
  79. package/src/to-json-schema/zod3-to-json-schema/parsers/undefined.ts +1 -2
  80. package/src/to-json-schema/zod3-to-json-schema/parsers/union.ts +3 -3
  81. package/src/to-json-schema/zod3-to-json-schema/parsers/unknown.ts +1 -2
  82. package/src/to-json-schema/zod3-to-json-schema/refs.ts +3 -3
  83. package/src/to-json-schema/zod3-to-json-schema/select-parser.ts +2 -2
  84. package/src/to-json-schema/zod3-to-json-schema/zod3-to-json-schema.ts +3 -3
  85. package/src/types/assistant-model-message.ts +3 -3
  86. package/src/types/content-part.ts +140 -21
  87. package/src/types/context.ts +4 -0
  88. package/src/types/executable-tool.ts +17 -0
  89. package/src/types/execute-tool.ts +29 -9
  90. package/src/types/file-data.ts +48 -0
  91. package/src/types/index.ts +28 -11
  92. package/src/types/infer-tool-context.ts +41 -0
  93. package/src/types/infer-tool-input.ts +7 -0
  94. package/src/types/infer-tool-output.ts +7 -0
  95. package/src/types/infer-tool-set-context.ts +44 -0
  96. package/src/types/model-message.ts +4 -4
  97. package/src/types/never-optional.ts +7 -0
  98. package/src/types/provider-options.ts +1 -1
  99. package/src/types/provider-reference.ts +10 -0
  100. package/src/types/sandbox.ts +217 -0
  101. package/src/types/system-model-message.ts +1 -1
  102. package/src/types/tool-approval-request.ts +13 -0
  103. package/src/types/tool-execute-function.ts +56 -0
  104. package/src/types/tool-model-message.ts +3 -3
  105. package/src/types/tool-needs-approval-function.ts +39 -0
  106. package/src/types/tool-set.ts +22 -0
  107. package/src/types/tool.ts +278 -225
  108. package/src/types/user-model-message.ts +2 -2
  109. package/src/validate-download-url.ts +120 -33
  110. package/src/validate-types.ts +5 -3
  111. package/dist/index.d.mts +0 -1472
  112. package/dist/index.mjs +0 -2754
  113. package/dist/index.mjs.map +0 -1
  114. package/dist/test/index.d.mts +0 -17
  115. package/dist/test/index.mjs +0 -77
  116. package/dist/test/index.mjs.map +0 -1
  117. package/src/provider-tool-factory.ts +0 -125
package/CHANGELOG.md CHANGED
@@ -1,5 +1,363 @@
1
1
  # @ai-sdk/provider-utils
2
2
 
3
+ ## 5.0.0-beta.50
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [0416e3e]
8
+ - @ai-sdk/provider@4.0.0-beta.20
9
+
10
+ ## 5.0.0-beta.49
11
+
12
+ ### Patch Changes
13
+
14
+ - b8396f0: trigger initial beta release
15
+ - Updated dependencies [b8396f0]
16
+ - @ai-sdk/provider@4.0.0-beta.19
17
+
18
+ ## 5.0.0-canary.48
19
+
20
+ ### Patch Changes
21
+
22
+ - aeda373: fix: only send provider credentials to same-origin response-supplied URLs
23
+
24
+ Several provider clients followed a URL taken from the provider's API response (a polling/status URL or a final media URL such as `polling_url`, `urls.get`, `result_url`, `result.sample`, or `video.uri`) and reused the authenticated headers — or appended `?key=<API_KEY>` — on that request. Because the host of the response-supplied URL was never validated, the long-lived API key was sent to whatever host the response named (a CDN in the benign case, or an attacker-chosen host if the provider response was tampered with), allowing credential exfiltration.
25
+
26
+ A new `isSameOrigin` helper is added to `@ai-sdk/provider-utils`, and the affected fetches in `@ai-sdk/black-forest-labs`, `@ai-sdk/fireworks`, `@ai-sdk/replicate`, `@ai-sdk/gladia`, `@ai-sdk/fal`, and `@ai-sdk/google` now attach credentials only when the followed URL is same-origin with the provider's configured API origin. Requests to a foreign origin are made without the credential.
27
+
28
+ - 375fdd7: fix: harden download URL SSRF guard against hostname and redirect bypasses
29
+
30
+ `validateDownloadUrl` and the file download helpers (`downloadBlob`, `download`) could be bypassed in several ways when handling untrusted URLs:
31
+
32
+ - A fully-qualified hostname with a trailing dot (e.g. `localhost.`, `myhost.local.`) skipped the localhost/`.local` blocklist.
33
+ - IPv6 addresses that embed an IPv4 address in their last 32 bits — IPv4-compatible (`::127.0.0.1`), IPv4-translated (`::ffff:0:127.0.0.1`), and NAT64 (`64:ff9b::127.0.0.1`, including the `64:ff9b:1::/48` local-use prefix) — were not decoded and checked against the private IPv4 ranges.
34
+ - Redirects were validated only _after_ `fetch` had already followed them, so the request to a redirect target (e.g. an internal/metadata address) had already been issued before the check ran.
35
+ - Several reserved/internal address ranges were not blocked: CGNAT (`100.64.0.0/10`, used by some cloud providers for internal traffic), benchmarking (`198.18.0.0/15`), IETF protocol assignments (`192.0.0.0/24`), the reserved `240.0.0.0/4` block (including the `255.255.255.255` broadcast address), and IPv6 site-local (`fec0::/10`) and multicast (`ff00::/8`).
36
+
37
+ The validator now strips trailing dots before the hostname checks and fully expands IPv6 addresses to detect embedded private IPv4 targets. The download helpers now follow redirects manually (`redirect: 'manual'`), re-validating each hop before requesting it, so an unsafe redirect target is never fetched. When a redirect cannot be inspected because the runtime returns an opaque response, the helpers fail closed (reject the redirect) on the server; only in a real browser — where SSRF is not reachable (fetch is constrained by CORS and cannot reach a server's internal network or cloud-metadata endpoints) — is the redirect followed natively so legitimate redirected downloads keep working.
38
+
39
+ - b4507d5: fix(provider-utils): cancel response body on download rejection to prevent socket leak
40
+
41
+ When a download was rejected early — because the `Content-Length` header exceeded the size limit, the response status was not ok, or a redirect resolved to a blocked URL — the fetch response body was left unconsumed and uncancelled. With WHATWG Fetch/undici this leaves the underlying TCP socket open instead of returning it to the connection pool, allowing an attacker-controlled origin to exhaust file descriptors and cause a denial of service. The body is now cancelled on all early-rejection paths in `readResponseWithSizeLimit`, `download`, and `downloadBlob`, and `fetchWithValidatedRedirects` cancels each redirect hop's body before following or rejecting the next hop.
42
+
43
+ ## 5.0.0-canary.47
44
+
45
+ ### Patch Changes
46
+
47
+ - bae5e2b: fix(security): re-validate tool approvals from client message history before execution
48
+
49
+ The approval-replay path in `generateText`/`streamText` (and `WorkflowAgent.stream`) reconstructed approved tool calls from the client-supplied messages array and executed them without re-validating input against the tool's schema or re-applying the approval policy. A client could forge an assistant message with a pre-approved tool-call part and have the server execute a tool with attacker-chosen arguments.
50
+
51
+ The replay path now validates HMAC signature (when `experimental_toolApprovalSecret` is configured), re-validates tool-call input against the tool's input schema, and re-resolves the approval policy before execution.
52
+
53
+ ## 5.0.0-canary.46
54
+
55
+ ### Patch Changes
56
+
57
+ - Updated dependencies [ce769dd]
58
+ - @ai-sdk/provider@4.0.0-canary.18
59
+
60
+ ## 5.0.0-canary.45
61
+
62
+ ### Patch Changes
63
+
64
+ - ee798eb: chore(provider-utils): rename `Experimental_Sandbox` to `Experimental_SandboxSession`
65
+ - daf6637: feat(provider-utils): add `env` option to `spawn` and `run` methods of `Experimental_SandboxSession`
66
+
67
+ ## 5.0.0-canary.44
68
+
69
+ ### Patch Changes
70
+
71
+ - 6c93e36: feat(provider-utils): add `spawnCommand` method to `Experimental_Sandbox` to allow for detached command execution
72
+ - f617ac2: feat(provider-utils): narrow `tool()` return type to `ExecutableTool<...>` when `execute` is provided
73
+
74
+ ## 5.0.0-canary.43
75
+
76
+ ### Patch Changes
77
+
78
+ - 7fc6bd6: Raise minimum supported Node.js version to 22. Supported versions: 22, 24, and 26.
79
+ - Updated dependencies [7fc6bd6]
80
+ - @ai-sdk/provider@4.0.0-canary.17
81
+
82
+ ## 5.0.0-canary.42
83
+
84
+ ### Patch Changes
85
+
86
+ - a6617c5: feat(provider-utils): add `readFile` and `writeFile` plus convenience wrappers to `Experimental_Sandbox` abstraction
87
+
88
+ ## 5.0.0-canary.41
89
+
90
+ ### Patch Changes
91
+
92
+ - 28dfa06: fix: support tools with optional context
93
+ - e93fa91: rename Sandbox.executeCommand to Sandbox.runCommand
94
+
95
+ ## 5.0.0-canary.40
96
+
97
+ ### Patch Changes
98
+
99
+ - a7de9c9: fix: make sandbox experimental
100
+
101
+ ## 5.0.0-canary.39
102
+
103
+ ### Patch Changes
104
+
105
+ - 105f95b: Ensure the default empty tool input schema includes `type: "object"` for OpenAI-compatible providers that require object schemas.
106
+
107
+ ## 5.0.0-canary.38
108
+
109
+ ### Patch Changes
110
+
111
+ - ca446f8: feat: flexible tool descriptions
112
+
113
+ ## 5.0.0-canary.37
114
+
115
+ ### Patch Changes
116
+
117
+ - d848405: feat: add optional `abortSignal` parameters to sandbox command execution
118
+
119
+ ## 5.0.0-canary.36
120
+
121
+ ### Patch Changes
122
+
123
+ - ca39020: Add an optional `workingDirectory` parameter to sandbox command execution.
124
+
125
+ ## 5.0.0-canary.35
126
+
127
+ ### Patch Changes
128
+
129
+ - f634bac: feat(mcp): add new McpProviderMetadata type
130
+
131
+ ## 5.0.0-canary.34
132
+
133
+ ### Patch Changes
134
+
135
+ - 69254e0: feat(ai): add toolMetadata for tool specific metdata
136
+ - 3015fc3: feat: sandbox shell execution abstraction
137
+
138
+ ## 5.0.0-canary.33
139
+
140
+ ### Patch Changes
141
+
142
+ - 2427d88: feat(ai): change Tool.sensitiveContext to telemetry.includeToolsContext and make it opt-in
143
+
144
+ ## 5.0.0-canary.32
145
+
146
+ ### Major Changes
147
+
148
+ - 5463d0d: feat(provider): align tool result output content file part types with top-level message file part types
149
+
150
+ ### Patch Changes
151
+
152
+ - Updated dependencies [5463d0d]
153
+ - @ai-sdk/provider@4.0.0-canary.16
154
+
155
+ ## 5.0.0-canary.31
156
+
157
+ ### Patch Changes
158
+
159
+ - 0c4c275: trigger initial canary release
160
+ - Updated dependencies [0c4c275]
161
+ - @ai-sdk/provider@4.0.0-canary.15
162
+
163
+ ## 5.0.0-beta.30
164
+
165
+ ### Patch Changes
166
+
167
+ - 08d2129: feat(mcp): propagate the server name through dynamic tool parts
168
+
169
+ ## 5.0.0-beta.29
170
+
171
+ ### Patch Changes
172
+
173
+ - 9bd6512: feat(provider): change file part data property to be tagged with a type and remove the image part type
174
+ - 258c093: chore: ensure consistent import handling and avoid import duplicates or cycles
175
+ - b6783da: refactoring: restructure Tool types
176
+ - Updated dependencies [9bd6512]
177
+ - Updated dependencies [258c093]
178
+ - @ai-sdk/provider@4.0.0-beta.14
179
+
180
+ ## 5.0.0-beta.28
181
+
182
+ ### Patch Changes
183
+
184
+ - 9f0e36c: trigger release for all packages after provenance setup
185
+ - Updated dependencies [9f0e36c]
186
+ - @ai-sdk/provider@4.0.0-beta.13
187
+
188
+ ## 5.0.0-beta.27
189
+
190
+ ### Patch Changes
191
+
192
+ - 785fe16: feat: distinguish provider-defined and provider-executed tools
193
+ - 67df0a0: feat: add sensitiveContext property to Tool
194
+ - befb78c: refactoring: remove real-time delays in unit tests
195
+ - 0458559: fix: deprecate needsApproval on Tool
196
+ - 5852c0a: refactoring(provider-utils): add controller as property to StreamingToolCallTracker
197
+ - fc92055: feat(ai): automatic tool approval
198
+
199
+ ## 5.0.0-beta.26
200
+
201
+ ### Patch Changes
202
+
203
+ - 2e98477: fix: retain stack traces on async errors
204
+
205
+ ## 5.0.0-beta.25
206
+
207
+ ### Patch Changes
208
+
209
+ - eea8d98: refactoring: rename tool execution events
210
+
211
+ ## 5.0.0-beta.24
212
+
213
+ ### Patch Changes
214
+
215
+ - f807e45: Extract shared `StreamingToolCallTracker` class into `@ai-sdk/provider-utils` to deduplicate streaming tool call handling across OpenAI-compatible providers. Also adds missing `generateId()` fallback for `toolCallId` in Alibaba's `doGenerate` path and ensures all providers finalize unfinished tool calls during stream flush.
216
+
217
+ ## 5.0.0-beta.23
218
+
219
+ ### Patch Changes
220
+
221
+ - 350ea38: refactoring: introduce Arrayable type
222
+
223
+ ## 5.0.0-beta.22
224
+
225
+ ### Patch Changes
226
+
227
+ - 083947b: feat(ai): separate toolsContext from context
228
+
229
+ ## 5.0.0-beta.21
230
+
231
+ ### Patch Changes
232
+
233
+ - add1126: refactoring: executeTool uses tool as parameter
234
+
235
+ ## 5.0.0-beta.20
236
+
237
+ ### Patch Changes
238
+
239
+ - b3976a2: Add workflow serialization support to all provider models.
240
+
241
+ **`@ai-sdk/provider-utils`:** New `serializeModel()` helper that extracts only serializable properties from a model instance, filtering out functions and objects containing functions. Third-party provider authors can use this to add workflow support to their own models.
242
+
243
+ **All providers:** `headers` is now optional in provider config types. This is non-breaking — existing code that passes `headers` continues to work. Custom provider implementations that construct model configs manually can now omit `headers`, which is useful when models are deserialized from a workflow step boundary where auth is provided separately.
244
+
245
+ All provider model classes now include `WORKFLOW_SERIALIZE` and `WORKFLOW_DESERIALIZE` static methods, enabling them to cross workflow step boundaries without serialization errors.
246
+
247
+ - ff5eba1: feat: roll `image-*` tool output types into their equivalent `file-*` types
248
+ - Updated dependencies [ff5eba1]
249
+ - @ai-sdk/provider@4.0.0-beta.12
250
+
251
+ ## 5.0.0-beta.19
252
+
253
+ ### Major Changes
254
+
255
+ - ef992f8: Remove CommonJS exports from all packages. All packages are now ESM-only (`"type": "module"`). Consumers using `require()` must switch to ESM `import` syntax.
256
+
257
+ ### Patch Changes
258
+
259
+ - Updated dependencies [ef992f8]
260
+ - @ai-sdk/provider@4.0.0-beta.11
261
+
262
+ ## 5.0.0-beta.18
263
+
264
+ ### Patch Changes
265
+
266
+ - 90e2d8a: chore: fix unused vars not being flagged by our lint tooling
267
+
268
+ ## 5.0.0-beta.17
269
+
270
+ ### Patch Changes
271
+
272
+ - 3ae1786: fix: better context type inference
273
+
274
+ ## 5.0.0-beta.16
275
+
276
+ ### Patch Changes
277
+
278
+ - Updated dependencies [176466a]
279
+ - @ai-sdk/provider@4.0.0-beta.10
280
+
281
+ ## 5.0.0-beta.15
282
+
283
+ ### Patch Changes
284
+
285
+ - Updated dependencies [e311194]
286
+ - @ai-sdk/provider@4.0.0-beta.9
287
+
288
+ ## 5.0.0-beta.14
289
+
290
+ ### Patch Changes
291
+
292
+ - Updated dependencies [34bd95d]
293
+ - Updated dependencies [008271d]
294
+ - @ai-sdk/provider@4.0.0-beta.8
295
+
296
+ ## 5.0.0-beta.13
297
+
298
+ ### Major Changes
299
+
300
+ - 7e26e81: chore: rename experimental_context to context
301
+
302
+ ### Patch Changes
303
+
304
+ - b0c2869: chore(ai): remove deprecated `media` type part from `ToolResultOutput`
305
+
306
+ ## 5.0.0-beta.12
307
+
308
+ ### Patch Changes
309
+
310
+ - 46d1149: chore(provider-utils,google): fix grammar errors in error and warning messages
311
+
312
+ ## 5.0.0-beta.11
313
+
314
+ ### Patch Changes
315
+
316
+ - 6fd51c0: fix(provider): preserve error type prefix in getErrorMessage
317
+ - Updated dependencies [6fd51c0]
318
+ - @ai-sdk/provider@4.0.0-beta.7
319
+
320
+ ## 5.0.0-beta.10
321
+
322
+ ### Patch Changes
323
+
324
+ - c29a26f: feat(provider): add support for provider references and uploading files as supported per provider
325
+ - Updated dependencies [c29a26f]
326
+ - @ai-sdk/provider@4.0.0-beta.6
327
+
328
+ ## 5.0.0-beta.9
329
+
330
+ ### Patch Changes
331
+
332
+ - 2e17091: fix(types): move shared tool set utility types into provider-utils
333
+
334
+ Moved `ToolSet`, `InferToolSetContext`, and `UnionToIntersection` into `@ai-sdk/provider-utils` and updated `ai` internals to import them directly from there. This keeps the shared tool typing utilities colocated with the core tool type definitions.
335
+
336
+ ## 5.0.0-beta.8
337
+
338
+ ### Major Changes
339
+
340
+ - 986c6fd: feat(ai): change type of experimental_context from unknown to generic
341
+ - 493295c: Remove the deprecated `ToolCallOptions` export.
342
+
343
+ Use `ToolExecutionOptions` instead.
344
+
345
+ ## 5.0.0-beta.7
346
+
347
+ ### Patch Changes
348
+
349
+ - 1f509d4: fix(ai): force template check on 'kind' param
350
+ - Updated dependencies [1f509d4]
351
+ - @ai-sdk/provider@4.0.0-beta.5
352
+
353
+ ## 5.0.0-beta.6
354
+
355
+ ### Patch Changes
356
+
357
+ - 3887c70: feat(provider): add new top-level reasoning parameter to spec and support it in `generateText` and `streamText`
358
+ - Updated dependencies [3887c70]
359
+ - @ai-sdk/provider@4.0.0-beta.4
360
+
3
361
  ## 5.0.0-beta.5
4
362
 
5
363
  ### Major Changes
@@ -50,18 +408,18 @@
50
408
  const toolNameMapping = createToolNameMapping({
51
409
  tools,
52
410
  providerToolNames: {
53
- 'openai.code_interpreter': 'code_interpreter',
54
- 'openai.file_search': 'file_search',
55
- 'openai.image_generation': 'image_generation',
56
- 'openai.local_shell': 'local_shell',
57
- 'openai.shell': 'shell',
58
- 'openai.web_search': 'web_search',
59
- 'openai.web_search_preview': 'web_search_preview',
60
- 'openai.mcp': 'mcp',
61
- 'openai.apply_patch': 'apply_patch',
411
+ "openai.code_interpreter": "code_interpreter",
412
+ "openai.file_search": "file_search",
413
+ "openai.image_generation": "image_generation",
414
+ "openai.local_shell": "local_shell",
415
+ "openai.shell": "shell",
416
+ "openai.web_search": "web_search",
417
+ "openai.web_search_preview": "web_search_preview",
418
+ "openai.mcp": "mcp",
419
+ "openai.apply_patch": "apply_patch",
62
420
  },
63
- resolveProviderToolName: tool =>
64
- tool.id === 'openai.custom'
421
+ resolveProviderToolName: (tool) =>
422
+ tool.id === "openai.custom"
65
423
  ? (tool.args as { name?: string }).name
66
424
  : undefined,
67
425
  });