ai 7.0.92 → 7.0.94

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 (44) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/dist/index.d.ts +239 -214
  3. package/dist/index.js +391 -138
  4. package/dist/index.js.map +1 -1
  5. package/dist/internal/index.d.ts +3 -2
  6. package/dist/internal/index.js +8 -5
  7. package/dist/internal/index.js.map +1 -1
  8. package/docs/02-foundations/02-providers-and-models.mdx +1 -1
  9. package/docs/03-agents/04-loop-control.mdx +5 -3
  10. package/docs/03-agents/07-workflow-agent.mdx +27 -6
  11. package/docs/03-ai-sdk-core/10-generating-structured-data.mdx +15 -3
  12. package/docs/03-ai-sdk-core/16-mcp-tools.mdx +64 -1
  13. package/docs/03-ai-sdk-core/35-image-generation.mdx +9 -0
  14. package/docs/03-ai-sdk-core/36-transcription.mdx +36 -35
  15. package/docs/03-ai-sdk-core/37-speech.mdx +0 -17
  16. package/docs/03-ai-sdk-harnesses/02-harness-agent.mdx +36 -0
  17. package/docs/04-ai-sdk-ui/20-streaming-data.mdx +11 -6
  18. package/docs/07-reference/01-ai-sdk-core/01-generate-text.mdx +14 -0
  19. package/docs/07-reference/01-ai-sdk-core/02-stream-text.mdx +15 -1
  20. package/docs/07-reference/01-ai-sdk-core/10-generate-image.mdx +2 -1
  21. package/docs/07-reference/01-ai-sdk-core/28-output.mdx +27 -1
  22. package/docs/07-reference/02-ai-sdk-ui/01-use-chat.mdx +1 -1
  23. package/docs/07-reference/02-ai-sdk-ui/40-create-ui-message-stream.mdx +4 -0
  24. package/docs/07-reference/02-ai-sdk-ui/41-create-ui-message-stream-response.mdx +6 -1
  25. package/docs/07-reference/04-ai-sdk-workflow/01-workflow-agent.mdx +42 -28
  26. package/docs/07-reference/05-ai-sdk-errors/ai-no-image-generated-error.mdx +7 -0
  27. package/package.json +12 -12
  28. package/src/agent/tool-loop-agent-settings.ts +15 -0
  29. package/src/batch/batch-types.ts +76 -68
  30. package/src/batch/batch.ts +169 -101
  31. package/src/batch/index.ts +9 -7
  32. package/src/embed/embed-many.ts +27 -2
  33. package/src/error/no-image-generated-error.ts +9 -0
  34. package/src/generate-image/generate-image.ts +51 -10
  35. package/src/generate-text/output.ts +111 -1
  36. package/src/generate-text/stream-language-model-call.ts +82 -0
  37. package/src/generate-text/stream-text.ts +5 -1
  38. package/src/ui/chat.ts +1 -1
  39. package/src/ui/convert-to-model-messages.ts +8 -2
  40. package/src/ui/validate-ui-messages.ts +14 -0
  41. package/src/util/data-url.ts +1 -1
  42. package/src/util/merge-abort-signals.ts +1 -1
  43. package/src/util/prepare-retries.ts +7 -1
  44. package/src/util/retry-with-exponential-backoff.ts +9 -4
package/CHANGELOG.md CHANGED
@@ -1,5 +1,38 @@
1
1
  # ai
2
2
 
3
+ ## 7.0.94
4
+
5
+ ### Patch Changes
6
+
7
+ - a4ba394: feat: support per-request models in batch
8
+ - 36b3364: fix(ai): enforce tool choices in streamText
9
+ - 45099da: Retry unclassified empty image results, preserve retry-attempt accounting, add provider-independent result retryability classification, and mark Google and Google Vertex prompt blocks as terminal.
10
+ - Updated dependencies [a4ba394]
11
+ - Updated dependencies [e9bf5e3]
12
+ - Updated dependencies [45099da]
13
+ - Updated dependencies [56c004c]
14
+ - Updated dependencies [9e1d1b2]
15
+ - Updated dependencies [a495511]
16
+ - @ai-sdk/provider@4.0.11
17
+ - @ai-sdk/gateway@4.0.76
18
+ - @ai-sdk/provider-utils@5.0.37
19
+
20
+ ## 7.0.93
21
+
22
+ ### Patch Changes
23
+
24
+ - df6c009: fix(ai): use new message ID when replacing a message in `sendMessage`
25
+ - 6ee74a3: fix(ai): preserve tool part titles when validating UI messages
26
+ - f13d371: fix(ai): preserve provider metadata when converting failed tool calls
27
+ - d4485fe: feat(ai): support minItems and maxItems in array outputs
28
+ - 4f201cc: chore(ai): formally include already supported `onLanguageModelCallStart` and `onLanguageModelCallEnd` in `ToolLoopAgentSettings` type
29
+ - 8cdb2a7: fix(ai): decode text data URLs in Node.js
30
+ - 0f2281e: fix(ai): reject embedding responses whose count does not match the input values
31
+ - fc8e8ac: fix(ai): preserve image call diagnostics when no image is generated
32
+ - ee8391e: fix(ai): support abort signals when the global AbortSignal is not a constructor
33
+ - Updated dependencies [3cfc1fc]
34
+ - @ai-sdk/gateway@4.0.75
35
+
3
36
  ## 7.0.92
4
37
 
5
38
  ### Patch Changes