@ai-sdk/provider-utils 3.1.0-beta.4 → 3.1.0-beta.5

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,13 @@
1
1
  # @ai-sdk/provider-utils
2
2
 
3
+ ## 3.1.0-beta.5
4
+
5
+ ### Patch Changes
6
+
7
+ - 8dac895: feat: `LanguageModelV3`
8
+ - Updated dependencies [8dac895]
9
+ - @ai-sdk/provider@2.1.0-beta.3
10
+
3
11
  ## 3.1.0-beta.4
4
12
 
5
13
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { JSONParseError, TypeValidationError, JSONValue, APICallError, LanguageModelV2Prompt, JSONSchema7, SharedV2ProviderOptions, LanguageModelV2ToolResultOutput, LanguageModelV2ToolResultPart } from '@ai-sdk/provider';
1
+ import { JSONParseError, TypeValidationError, JSONValue, APICallError, LanguageModelV3Prompt, JSONSchema7, SharedV2ProviderOptions, LanguageModelV3ToolResultOutput, LanguageModelV3ToolResultPart } from '@ai-sdk/provider';
2
2
  import * as z4 from 'zod/v4';
3
3
  import { ZodType, z } from 'zod/v4';
4
4
  import * as z3 from 'zod/v3';
@@ -206,11 +206,11 @@ declare const getFromApi: <T>({ url, headers, successfulResponseHandler, failedR
206
206
  }>;
207
207
 
208
208
  declare function injectJsonInstructionIntoMessages({ messages, schema, schemaPrefix, schemaSuffix, }: {
209
- messages: LanguageModelV2Prompt;
209
+ messages: LanguageModelV3Prompt;
210
210
  schema?: JSONSchema7;
211
211
  schemaPrefix?: string;
212
212
  schemaSuffix?: string;
213
- }): LanguageModelV2Prompt;
213
+ }): LanguageModelV3Prompt;
214
214
 
215
215
  declare function isAbortError(error: unknown): error is Error;
216
216
 
@@ -508,7 +508,7 @@ interface ToolResultPart {
508
508
  /**
509
509
  Result of the tool call. This is a JSON-serializable object.
510
510
  */
511
- output: LanguageModelV2ToolResultOutput;
511
+ output: LanguageModelV3ToolResultOutput;
512
512
  /**
513
513
  Additional provider-specific metadata. They are passed through
514
514
  to the provider from the AI SDK and enable provider-specific
@@ -686,7 +686,7 @@ Optional conversion function that maps the tool result to an output that can be
686
686
 
687
687
  If not provided, the tool result will be sent as a JSON object.
688
688
  */
689
- toModelOutput?: (output: 0 extends 1 & OUTPUT ? any : [OUTPUT] extends [never] ? any : NoInfer<OUTPUT>) => LanguageModelV2ToolResultPart['output'];
689
+ toModelOutput?: (output: 0 extends 1 & OUTPUT ? any : [OUTPUT] extends [never] ? any : NoInfer<OUTPUT>) => LanguageModelV3ToolResultPart['output'];
690
690
  } & ({
691
691
  /**
692
692
  Tool with user-defined input and output schemas.
@@ -739,7 +739,7 @@ declare function dynamicTool(tool: {
739
739
  providerOptions?: ProviderOptions;
740
740
  inputSchema: FlexibleSchema<unknown>;
741
741
  execute: ToolExecuteFunction<unknown, unknown>;
742
- toModelOutput?: (output: unknown) => LanguageModelV2ToolResultPart['output'];
742
+ toModelOutput?: (output: unknown) => LanguageModelV3ToolResultPart['output'];
743
743
  }): Tool<unknown, unknown> & {
744
744
  type: 'dynamic';
745
745
  };
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { JSONParseError, TypeValidationError, JSONValue, APICallError, LanguageModelV2Prompt, JSONSchema7, SharedV2ProviderOptions, LanguageModelV2ToolResultOutput, LanguageModelV2ToolResultPart } from '@ai-sdk/provider';
1
+ import { JSONParseError, TypeValidationError, JSONValue, APICallError, LanguageModelV3Prompt, JSONSchema7, SharedV2ProviderOptions, LanguageModelV3ToolResultOutput, LanguageModelV3ToolResultPart } from '@ai-sdk/provider';
2
2
  import * as z4 from 'zod/v4';
3
3
  import { ZodType, z } from 'zod/v4';
4
4
  import * as z3 from 'zod/v3';
@@ -206,11 +206,11 @@ declare const getFromApi: <T>({ url, headers, successfulResponseHandler, failedR
206
206
  }>;
207
207
 
208
208
  declare function injectJsonInstructionIntoMessages({ messages, schema, schemaPrefix, schemaSuffix, }: {
209
- messages: LanguageModelV2Prompt;
209
+ messages: LanguageModelV3Prompt;
210
210
  schema?: JSONSchema7;
211
211
  schemaPrefix?: string;
212
212
  schemaSuffix?: string;
213
- }): LanguageModelV2Prompt;
213
+ }): LanguageModelV3Prompt;
214
214
 
215
215
  declare function isAbortError(error: unknown): error is Error;
216
216
 
@@ -508,7 +508,7 @@ interface ToolResultPart {
508
508
  /**
509
509
  Result of the tool call. This is a JSON-serializable object.
510
510
  */
511
- output: LanguageModelV2ToolResultOutput;
511
+ output: LanguageModelV3ToolResultOutput;
512
512
  /**
513
513
  Additional provider-specific metadata. They are passed through
514
514
  to the provider from the AI SDK and enable provider-specific
@@ -686,7 +686,7 @@ Optional conversion function that maps the tool result to an output that can be
686
686
 
687
687
  If not provided, the tool result will be sent as a JSON object.
688
688
  */
689
- toModelOutput?: (output: 0 extends 1 & OUTPUT ? any : [OUTPUT] extends [never] ? any : NoInfer<OUTPUT>) => LanguageModelV2ToolResultPart['output'];
689
+ toModelOutput?: (output: 0 extends 1 & OUTPUT ? any : [OUTPUT] extends [never] ? any : NoInfer<OUTPUT>) => LanguageModelV3ToolResultPart['output'];
690
690
  } & ({
691
691
  /**
692
692
  Tool with user-defined input and output schemas.
@@ -739,7 +739,7 @@ declare function dynamicTool(tool: {
739
739
  providerOptions?: ProviderOptions;
740
740
  inputSchema: FlexibleSchema<unknown>;
741
741
  execute: ToolExecuteFunction<unknown, unknown>;
742
- toModelOutput?: (output: unknown) => LanguageModelV2ToolResultPart['output'];
742
+ toModelOutput?: (output: unknown) => LanguageModelV3ToolResultPart['output'];
743
743
  }): Tool<unknown, unknown> & {
744
744
  type: 'dynamic';
745
745
  };
package/dist/index.js CHANGED
@@ -284,7 +284,7 @@ function handleFetchError({
284
284
  }
285
285
 
286
286
  // src/version.ts
287
- var VERSION = true ? "3.1.0-beta.4" : "0.0.0-test";
287
+ var VERSION = true ? "3.1.0-beta.5" : "0.0.0-test";
288
288
 
289
289
  // src/get-from-api.ts
290
290
  var getOriginalFetch = () => globalThis.fetch;