@ai-sdk/provider-utils 3.1.0-beta.4 → 3.1.0-beta.6
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 +17 -0
- package/dist/index.d.mts +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,22 @@
|
|
1
1
|
# @ai-sdk/provider-utils
|
2
2
|
|
3
|
+
## 3.1.0-beta.6
|
4
|
+
|
5
|
+
### Patch Changes
|
6
|
+
|
7
|
+
- 0adc679: feat(provider): shared spec v3
|
8
|
+
- Updated dependencies [0adc679]
|
9
|
+
- Updated dependencies [2b0caef]
|
10
|
+
- @ai-sdk/provider@2.1.0-beta.4
|
11
|
+
|
12
|
+
## 3.1.0-beta.5
|
13
|
+
|
14
|
+
### Patch Changes
|
15
|
+
|
16
|
+
- 8dac895: feat: `LanguageModelV3`
|
17
|
+
- Updated dependencies [8dac895]
|
18
|
+
- @ai-sdk/provider@2.1.0-beta.3
|
19
|
+
|
3
20
|
## 3.1.0-beta.4
|
4
21
|
|
5
22
|
### Patch Changes
|
package/dist/index.d.mts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import { JSONParseError, TypeValidationError, JSONValue, APICallError,
|
1
|
+
import { JSONParseError, TypeValidationError, JSONValue, APICallError, LanguageModelV3Prompt, JSONSchema7, SharedV3ProviderOptions, 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:
|
209
|
+
messages: LanguageModelV3Prompt;
|
210
210
|
schema?: JSONSchema7;
|
211
211
|
schemaPrefix?: string;
|
212
212
|
schemaSuffix?: string;
|
213
|
-
}):
|
213
|
+
}): LanguageModelV3Prompt;
|
214
214
|
|
215
215
|
declare function isAbortError(error: unknown): error is Error;
|
216
216
|
|
@@ -371,7 +371,7 @@ Additional provider-specific options.
|
|
371
371
|
They are passed through to the provider from the AI SDK and enable
|
372
372
|
provider-specific functionality that can be fully encapsulated in the provider.
|
373
373
|
*/
|
374
|
-
type ProviderOptions =
|
374
|
+
type ProviderOptions = SharedV3ProviderOptions;
|
375
375
|
|
376
376
|
/**
|
377
377
|
Data content. Can either be a base64-encoded string, a Uint8Array, an ArrayBuffer, or a Buffer.
|
@@ -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:
|
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>) =>
|
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) =>
|
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,
|
1
|
+
import { JSONParseError, TypeValidationError, JSONValue, APICallError, LanguageModelV3Prompt, JSONSchema7, SharedV3ProviderOptions, 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:
|
209
|
+
messages: LanguageModelV3Prompt;
|
210
210
|
schema?: JSONSchema7;
|
211
211
|
schemaPrefix?: string;
|
212
212
|
schemaSuffix?: string;
|
213
|
-
}):
|
213
|
+
}): LanguageModelV3Prompt;
|
214
214
|
|
215
215
|
declare function isAbortError(error: unknown): error is Error;
|
216
216
|
|
@@ -371,7 +371,7 @@ Additional provider-specific options.
|
|
371
371
|
They are passed through to the provider from the AI SDK and enable
|
372
372
|
provider-specific functionality that can be fully encapsulated in the provider.
|
373
373
|
*/
|
374
|
-
type ProviderOptions =
|
374
|
+
type ProviderOptions = SharedV3ProviderOptions;
|
375
375
|
|
376
376
|
/**
|
377
377
|
Data content. Can either be a base64-encoded string, a Uint8Array, an ArrayBuffer, or a Buffer.
|
@@ -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:
|
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>) =>
|
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) =>
|
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.
|
287
|
+
var VERSION = true ? "3.1.0-beta.6" : "0.0.0-test";
|
288
288
|
|
289
289
|
// src/get-from-api.ts
|
290
290
|
var getOriginalFetch = () => globalThis.fetch;
|