@ai-sdk/provider 2.0.0-canary.11 → 2.0.0-canary.12

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/provider
2
2
 
3
+ ## 2.0.0-canary.12
4
+
5
+ ### Patch Changes
6
+
7
+ - 7b3ae3f: chore (provider): change getSupportedUrls to supportedUrls (language model v2)
8
+
3
9
  ## 2.0.0-canary.11
4
10
 
5
11
  ### Major Changes
package/dist/index.d.mts CHANGED
@@ -3,6 +3,10 @@ export { JSONSchema7, JSONSchema7Definition } from 'json-schema';
3
3
 
4
4
  type SharedV2Headers = Record<string, string>;
5
5
 
6
+ /**
7
+ A JSON value can be a string, number, boolean, object, array, or null.
8
+ JSON values can be serialized and deserialized by the JSON.stringify and JSON.parse methods.
9
+ */
6
10
  type JSONValue = null | string | number | boolean | JSONObject | JSONArray;
7
11
  type JSONObject = {
8
12
  [key: string]: JSONValue;
@@ -411,7 +415,7 @@ type ImageModelV2CallOptions = {
411
415
  }
412
416
  ```
413
417
  */
414
- providerOptions: Record<string, Record<string, JSONValue>>;
418
+ providerOptions: SharedV2ProviderOptions;
415
419
  /**
416
420
  Abort signal for cancelling the operation.
417
421
  */
@@ -437,7 +441,7 @@ type ImageModelV2CallWarning = {
437
441
  };
438
442
 
439
443
  /**
440
- Image generation model specification version 1.
444
+ Image generation model specification version 2.
441
445
  */
442
446
  type ImageModelV2 = {
443
447
  /**
@@ -447,7 +451,7 @@ type ImageModelV2 = {
447
451
  implementation versions can be handled as a discriminated union
448
452
  on our side.
449
453
  */
450
- readonly specificationVersion: 'v1';
454
+ readonly specificationVersion: 'v2';
451
455
  /**
452
456
  Name of the provider for logging purposes.
453
457
  */
@@ -1040,7 +1044,7 @@ type LanguageModelV2 = {
1040
1044
  *
1041
1045
  * @returns A promise resolving to a map of supported URL patterns.
1042
1046
  */
1043
- getSupportedUrls(): PromiseLike<Record<string, RegExp[]>>;
1047
+ supportedUrls: PromiseLike<Record<string, RegExp[]>> | Record<string, RegExp[]>;
1044
1048
  /**
1045
1049
  Generates a language model output (non-streaming).
1046
1050
 
package/dist/index.d.ts CHANGED
@@ -3,6 +3,10 @@ export { JSONSchema7, JSONSchema7Definition } from 'json-schema';
3
3
 
4
4
  type SharedV2Headers = Record<string, string>;
5
5
 
6
+ /**
7
+ A JSON value can be a string, number, boolean, object, array, or null.
8
+ JSON values can be serialized and deserialized by the JSON.stringify and JSON.parse methods.
9
+ */
6
10
  type JSONValue = null | string | number | boolean | JSONObject | JSONArray;
7
11
  type JSONObject = {
8
12
  [key: string]: JSONValue;
@@ -411,7 +415,7 @@ type ImageModelV2CallOptions = {
411
415
  }
412
416
  ```
413
417
  */
414
- providerOptions: Record<string, Record<string, JSONValue>>;
418
+ providerOptions: SharedV2ProviderOptions;
415
419
  /**
416
420
  Abort signal for cancelling the operation.
417
421
  */
@@ -437,7 +441,7 @@ type ImageModelV2CallWarning = {
437
441
  };
438
442
 
439
443
  /**
440
- Image generation model specification version 1.
444
+ Image generation model specification version 2.
441
445
  */
442
446
  type ImageModelV2 = {
443
447
  /**
@@ -447,7 +451,7 @@ type ImageModelV2 = {
447
451
  implementation versions can be handled as a discriminated union
448
452
  on our side.
449
453
  */
450
- readonly specificationVersion: 'v1';
454
+ readonly specificationVersion: 'v2';
451
455
  /**
452
456
  Name of the provider for logging purposes.
453
457
  */
@@ -1040,7 +1044,7 @@ type LanguageModelV2 = {
1040
1044
  *
1041
1045
  * @returns A promise resolving to a map of supported URL patterns.
1042
1046
  */
1043
- getSupportedUrls(): PromiseLike<Record<string, RegExp[]>>;
1047
+ supportedUrls: PromiseLike<Record<string, RegExp[]>> | Record<string, RegExp[]>;
1044
1048
  /**
1045
1049
  Generates a language model output (non-streaming).
1046
1050
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-sdk/provider",
3
- "version": "2.0.0-canary.11",
3
+ "version": "2.0.0-canary.12",
4
4
  "license": "Apache-2.0",
5
5
  "sideEffects": false,
6
6
  "main": "./dist/index.js",