@ai-sdk/provider-utils 4.0.0-beta.39 → 4.0.0-beta.40

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/dist/index.mjs CHANGED
@@ -55,7 +55,7 @@ function createToolNameMapping({
55
55
  const customToolNameToProviderToolName = {};
56
56
  const providerToolNameToCustomToolName = {};
57
57
  for (const tool2 of tools) {
58
- if (tool2.type === "provider-defined" && tool2.id in providerToolNames) {
58
+ if (tool2.type === "provider" && tool2.id in providerToolNames) {
59
59
  const providerToolName = providerToolNames[tool2.id];
60
60
  customToolNameToProviderToolName[tool2.name] = providerToolName;
61
61
  providerToolNameToCustomToolName[providerToolName] = tool2.name;
@@ -289,7 +289,7 @@ function withUserAgentSuffix(headers, ...userAgentSuffixParts) {
289
289
  }
290
290
 
291
291
  // src/version.ts
292
- var VERSION = true ? "4.0.0-beta.39" : "0.0.0-test";
292
+ var VERSION = true ? "4.0.0-beta.40" : "0.0.0-test";
293
293
 
294
294
  // src/get-from-api.ts
295
295
  var getOriginalFetch = () => globalThis.fetch;
@@ -2168,8 +2168,8 @@ function dynamicTool(tool2) {
2168
2168
  return { ...tool2, type: "dynamic" };
2169
2169
  }
2170
2170
 
2171
- // src/provider-defined-tool-factory.ts
2172
- function createProviderDefinedToolFactory({
2171
+ // src/provider-tool-factory.ts
2172
+ function createProviderToolFactory({
2173
2173
  id,
2174
2174
  inputSchema
2175
2175
  }) {
@@ -2183,7 +2183,7 @@ function createProviderDefinedToolFactory({
2183
2183
  onInputAvailable,
2184
2184
  ...args
2185
2185
  }) => tool({
2186
- type: "provider-defined",
2186
+ type: "provider",
2187
2187
  id,
2188
2188
  args,
2189
2189
  inputSchema,
@@ -2196,7 +2196,7 @@ function createProviderDefinedToolFactory({
2196
2196
  onInputAvailable
2197
2197
  });
2198
2198
  }
2199
- function createProviderDefinedToolFactoryWithOutputSchema({
2199
+ function createProviderToolFactoryWithOutputSchema({
2200
2200
  id,
2201
2201
  inputSchema,
2202
2202
  outputSchema
@@ -2210,7 +2210,7 @@ function createProviderDefinedToolFactoryWithOutputSchema({
2210
2210
  onInputAvailable,
2211
2211
  ...args
2212
2212
  }) => tool({
2213
- type: "provider-defined",
2213
+ type: "provider",
2214
2214
  id,
2215
2215
  args,
2216
2216
  inputSchema,
@@ -2445,8 +2445,8 @@ export {
2445
2445
  createIdGenerator,
2446
2446
  createJsonErrorResponseHandler,
2447
2447
  createJsonResponseHandler,
2448
- createProviderDefinedToolFactory,
2449
- createProviderDefinedToolFactoryWithOutputSchema,
2448
+ createProviderToolFactory,
2449
+ createProviderToolFactoryWithOutputSchema,
2450
2450
  createStatusCodeErrorResponseHandler,
2451
2451
  createToolNameMapping,
2452
2452
  delay,