@ai-sdk/provider 1.0.4 → 1.0.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 CHANGED
@@ -1,5 +1,17 @@
1
1
  # @ai-sdk/provider
2
2
 
3
+ ## 1.0.6
4
+
5
+ ### Patch Changes
6
+
7
+ - 3a58a2e: feat (ai/core): throw NoImageGeneratedError from generateImage when no predictions are returned.
8
+
9
+ ## 1.0.5
10
+
11
+ ### Patch Changes
12
+
13
+ - 0a699f1: feat: add reasoning token support
14
+
3
15
  ## 1.0.4
4
16
 
5
17
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -417,6 +417,23 @@ type ImageModelV1 = {
417
417
  Warnings for the call, e.g. unsupported settings.
418
418
  */
419
419
  warnings: Array<ImageModelV1CallWarning>;
420
+ /**
421
+ Response information for telemetry and debugging purposes.
422
+ */
423
+ response: {
424
+ /**
425
+ Timestamp for the start of the generated response.
426
+ */
427
+ timestamp: Date;
428
+ /**
429
+ The ID of the response model that was used to generate the response.
430
+ */
431
+ modelId: string;
432
+ /**
433
+ Response headers.
434
+ */
435
+ headers: Record<string, string> | undefined;
436
+ };
420
437
  }>;
421
438
  };
422
439
 
@@ -936,6 +953,11 @@ type LanguageModelV1 = {
936
953
  */
937
954
  text?: string;
938
955
  /**
956
+ Reasoning text that the model has generated. Can be undefined if the model
957
+ has only generated text.
958
+ */
959
+ reasoning?: string;
960
+ /**
939
961
  Tool calls that the model has generated. Can be undefined if the
940
962
  model has only generated text.
941
963
  */
@@ -1070,6 +1092,9 @@ type LanguageModelV1 = {
1070
1092
  type LanguageModelV1StreamPart = {
1071
1093
  type: 'text-delta';
1072
1094
  textDelta: string;
1095
+ } | {
1096
+ type: 'reasoning';
1097
+ textDelta: string;
1073
1098
  } | ({
1074
1099
  type: 'tool-call';
1075
1100
  } & LanguageModelV1FunctionToolCall) | {
package/dist/index.d.ts CHANGED
@@ -417,6 +417,23 @@ type ImageModelV1 = {
417
417
  Warnings for the call, e.g. unsupported settings.
418
418
  */
419
419
  warnings: Array<ImageModelV1CallWarning>;
420
+ /**
421
+ Response information for telemetry and debugging purposes.
422
+ */
423
+ response: {
424
+ /**
425
+ Timestamp for the start of the generated response.
426
+ */
427
+ timestamp: Date;
428
+ /**
429
+ The ID of the response model that was used to generate the response.
430
+ */
431
+ modelId: string;
432
+ /**
433
+ Response headers.
434
+ */
435
+ headers: Record<string, string> | undefined;
436
+ };
420
437
  }>;
421
438
  };
422
439
 
@@ -936,6 +953,11 @@ type LanguageModelV1 = {
936
953
  */
937
954
  text?: string;
938
955
  /**
956
+ Reasoning text that the model has generated. Can be undefined if the model
957
+ has only generated text.
958
+ */
959
+ reasoning?: string;
960
+ /**
939
961
  Tool calls that the model has generated. Can be undefined if the
940
962
  model has only generated text.
941
963
  */
@@ -1070,6 +1092,9 @@ type LanguageModelV1 = {
1070
1092
  type LanguageModelV1StreamPart = {
1071
1093
  type: 'text-delta';
1072
1094
  textDelta: string;
1095
+ } | {
1096
+ type: 'reasoning';
1097
+ textDelta: string;
1073
1098
  } | ({
1074
1099
  type: 'tool-call';
1075
1100
  } & LanguageModelV1FunctionToolCall) | {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-sdk/provider",
3
- "version": "1.0.4",
3
+ "version": "1.0.6",
4
4
  "license": "Apache-2.0",
5
5
  "sideEffects": false,
6
6
  "main": "./dist/index.js",