ai 7.0.146 → 7.0.147

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.
Files changed (39) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/index.d.ts +1 -1
  3. package/dist/index.js +3 -2
  4. package/dist/index.js.map +1 -1
  5. package/dist/internal/index.js +1 -1
  6. package/docs/02-foundations/01-overview.mdx +1 -1
  7. package/docs/02-foundations/02-providers-and-models.mdx +2 -2
  8. package/docs/02-foundations/03-prompts.mdx +3 -3
  9. package/docs/02-foundations/04-tools.mdx +2 -2
  10. package/docs/02-getting-started/00-choosing-a-provider.mdx +1 -1
  11. package/docs/02-getting-started/02-nextjs-app-router.mdx +4 -4
  12. package/docs/02-getting-started/03-nextjs-pages-router.mdx +4 -4
  13. package/docs/02-getting-started/04-svelte.mdx +3 -3
  14. package/docs/02-getting-started/05-nuxt.mdx +3 -3
  15. package/docs/02-getting-started/06-nodejs.mdx +2 -2
  16. package/docs/02-getting-started/07-expo.mdx +4 -4
  17. package/docs/02-getting-started/08-tanstack-start.mdx +4 -4
  18. package/docs/03-ai-sdk-core/10-generating-structured-data.mdx +1 -1
  19. package/docs/03-ai-sdk-core/18-tools.mdx +5 -5
  20. package/docs/03-ai-sdk-core/37-speech.mdx +1 -1
  21. package/docs/03-ai-sdk-core/41-skill-uploads.mdx +24 -10
  22. package/docs/03-ai-sdk-harnesses/02-harness-agent.mdx +1 -1
  23. package/docs/03-ai-sdk-harnesses/05-harness-adapters.mdx +5 -5
  24. package/docs/03-ai-sdk-harnesses/06-workflow-utilities.mdx +12 -0
  25. package/docs/03-ai-sdk-harnesses/07-ui.mdx +2 -2
  26. package/docs/04-ai-sdk-ui/03-chatbot-tool-usage.mdx +2 -2
  27. package/docs/05-ai-sdk-rsc/01-overview.mdx +1 -1
  28. package/docs/05-ai-sdk-rsc/10-migrating-to-ui.mdx +1 -1
  29. package/docs/06-advanced/01-prompt-engineering.mdx +1 -1
  30. package/docs/06-advanced/03-backpressure.mdx +1 -1
  31. package/docs/06-advanced/10-vercel-deployment-guide.mdx +1 -1
  32. package/docs/07-reference/01-ai-sdk-core/01-generate-text.mdx +1 -1
  33. package/docs/07-reference/01-ai-sdk-core/14-upload-skill.mdx +3 -3
  34. package/docs/07-reference/01-ai-sdk-core/22-dynamic-tool.mdx +1 -1
  35. package/docs/08-migration-guides/index.mdx +12 -12
  36. package/docs/09-troubleshooting/05-tool-invocation-missing-result.mdx +1 -1
  37. package/package.json +2 -2
  38. package/src/generate-text/output.ts +1 -1
  39. package/src/ui/process-ui-message-stream.ts +1 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # ai
2
2
 
3
+ ## 7.0.147
4
+
5
+ ### Patch Changes
6
+
7
+ - 66e74dc: fix(ai): preserve repaired tool names in streamed UI message parts
8
+ - Updated dependencies [9bec2c3]
9
+ - @ai-sdk/gateway@4.0.120
10
+
3
11
  ## 7.0.146
4
12
 
5
13
  ### Patch Changes
package/dist/index.d.ts CHANGED
@@ -4186,7 +4186,7 @@ declare const array$1: <ELEMENT>({ element: inputElementSchema, minItems, maxIte
4186
4186
  }) => Output<Array<ELEMENT>, Array<ELEMENT>, ELEMENT>;
4187
4187
  /**
4188
4188
  * Output specification for choice generation.
4189
- * When the model generates a text response, it will return a one of the choice options.
4189
+ * When the model generates a text response, it will return one of the choice options.
4190
4190
  *
4191
4191
  * @param options - The available choices.
4192
4192
  * @param name - Optional name of the output that should be generated. Used by some providers for additional LLM guidance, e.g. via tool or schema name.
package/dist/index.js CHANGED
@@ -1174,7 +1174,7 @@ function cloneValue(value) {
1174
1174
  }
1175
1175
  //#endregion
1176
1176
  //#region src/version.ts
1177
- const VERSION = "7.0.146";
1177
+ const VERSION = "7.0.147";
1178
1178
  //#endregion
1179
1179
  //#region src/util/download/download.ts
1180
1180
  /**
@@ -3950,7 +3950,7 @@ function getArrayLengthValidationError({ value, minItems, maxItems }) {
3950
3950
  }
3951
3951
  /**
3952
3952
  * Output specification for choice generation.
3953
- * When the model generates a text response, it will return a one of the choice options.
3953
+ * When the model generates a text response, it will return one of the choice options.
3954
3954
  *
3955
3955
  * @param options - The available choices.
3956
3956
  * @param name - Optional name of the output that should be generated. Used by some providers for additional LLM guidance, e.g. via tool or schema name.
@@ -6723,6 +6723,7 @@ function processUIMessageStream({ stream, messageMetadataSchema, dataPartSchemas
6723
6723
  const anyPart = part;
6724
6724
  if (part != null) {
6725
6725
  part.state = options.state;
6726
+ anyPart.type = `tool-${options.toolName}`;
6726
6727
  anyPart.input = anyOptions.input;
6727
6728
  anyPart.output = anyOptions.output;
6728
6729
  anyPart.errorText = anyOptions.errorText;