ai 5.0.233 → 5.0.234

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
2
2
 
3
+ ## 5.0.234
4
+
5
+ ### Patch Changes
6
+
7
+ - 412c15e: Preserve reasoning part IDs when processing UI message streams.
8
+ - Updated dependencies [1e632f7]
9
+ - @ai-sdk/gateway@2.0.132
10
+
3
11
  ## 5.0.233
4
12
 
5
13
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -1533,6 +1533,10 @@ type TextUIPart = {
1533
1533
  */
1534
1534
  type ReasoningUIPart = {
1535
1535
  type: 'reasoning';
1536
+ /**
1537
+ * The identifier of the reasoning part.
1538
+ */
1539
+ id?: string;
1536
1540
  /**
1537
1541
  * The reasoning text.
1538
1542
  */
package/dist/index.d.ts CHANGED
@@ -1533,6 +1533,10 @@ type TextUIPart = {
1533
1533
  */
1534
1534
  type ReasoningUIPart = {
1535
1535
  type: 'reasoning';
1536
+ /**
1537
+ * The identifier of the reasoning part.
1538
+ */
1539
+ id?: string;
1536
1540
  /**
1537
1541
  * The reasoning text.
1538
1542
  */
package/dist/index.js CHANGED
@@ -816,7 +816,7 @@ function detectMediaType({
816
816
  var import_provider_utils2 = require("@ai-sdk/provider-utils");
817
817
 
818
818
  // src/version.ts
819
- var VERSION = true ? "5.0.233" : "0.0.0-test";
819
+ var VERSION = true ? "5.0.234" : "0.0.0-test";
820
820
 
821
821
  // src/util/download/download.ts
822
822
  var download = async ({
@@ -3820,6 +3820,7 @@ function processUIMessageStream({
3820
3820
  case "reasoning-start": {
3821
3821
  const reasoningPart = {
3822
3822
  type: "reasoning",
3823
+ id: chunk.id,
3823
3824
  text: "",
3824
3825
  providerMetadata: chunk.providerMetadata,
3825
3826
  state: "streaming"
@@ -9849,6 +9850,7 @@ var uiMessagesSchema = (0, import_provider_utils32.lazyValidator)(
9849
9850
  }),
9850
9851
  import_v48.z.object({
9851
9852
  type: import_v48.z.literal("reasoning"),
9853
+ id: import_v48.z.string().optional(),
9852
9854
  text: import_v48.z.string(),
9853
9855
  state: import_v48.z.enum(["streaming", "done"]).optional(),
9854
9856
  providerMetadata: providerMetadataSchema.optional()