ai 7.0.0-beta.17 → 7.0.0-beta.178
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 +1460 -25
- package/README.md +9 -19
- package/dist/index.d.ts +4834 -2670
- package/dist/index.js +9374 -6407
- package/dist/index.js.map +1 -1
- package/dist/internal/index.d.ts +2589 -199
- package/dist/internal/index.js +2781 -532
- package/dist/internal/index.js.map +1 -1
- package/dist/test/index.d.ts +18 -18
- package/dist/test/index.js +60 -97
- package/dist/test/index.js.map +1 -1
- package/docs/00-introduction/index.mdx +8 -1
- package/docs/02-foundations/02-providers-and-models.mdx +10 -1
- package/docs/02-foundations/03-prompts.mdx +36 -27
- package/docs/02-foundations/04-tools.mdx +75 -13
- package/docs/02-foundations/06-provider-options.mdx +19 -6
- package/docs/02-getting-started/01-navigating-the-library.mdx +1 -0
- package/docs/02-getting-started/02-nextjs-app-router.mdx +45 -21
- package/docs/02-getting-started/03-nextjs-pages-router.mdx +42 -18
- package/docs/02-getting-started/04-svelte.mdx +32 -17
- package/docs/02-getting-started/05-nuxt.mdx +43 -28
- package/docs/02-getting-started/06-nodejs.mdx +10 -11
- package/docs/02-getting-started/07-expo.mdx +42 -24
- package/docs/02-getting-started/08-tanstack-start.mdx +42 -18
- package/docs/02-getting-started/09-coding-agents.mdx +11 -14
- package/docs/03-agents/01-overview.mdx +48 -3
- package/docs/03-agents/02-building-agents.mdx +163 -33
- package/docs/03-agents/03-workflows.mdx +10 -10
- package/docs/03-agents/04-loop-control.mdx +98 -17
- package/docs/03-agents/05-configuring-call-options.mdx +3 -3
- package/docs/03-agents/06-memory.mdx +50 -2
- package/docs/03-agents/06-policy-tool-approvals.mdx +412 -0
- package/docs/03-agents/06-subagents.mdx +6 -4
- package/docs/03-agents/06-tool-approvals.mdx +326 -0
- package/docs/03-agents/07-workflow-agent.mdx +670 -0
- package/docs/03-agents/08-terminal-ui.mdx +137 -0
- package/docs/03-agents/index.mdx +28 -2
- package/docs/03-ai-sdk-core/05-generating-text.mdx +197 -100
- package/docs/03-ai-sdk-core/10-generating-structured-data.mdx +2 -2
- package/docs/03-ai-sdk-core/15-tools-and-tool-calling.mdx +474 -100
- package/docs/03-ai-sdk-core/16-mcp-tools.mdx +44 -2
- package/docs/03-ai-sdk-core/17-mcp-apps.mdx +273 -0
- package/docs/03-ai-sdk-core/17-runtime-and-tool-context.mdx +228 -0
- package/docs/03-ai-sdk-core/20-prompt-engineering.mdx +17 -2
- package/docs/03-ai-sdk-core/25-settings.mdx +61 -2
- package/docs/03-ai-sdk-core/26-reasoning.mdx +190 -0
- package/docs/03-ai-sdk-core/30-embeddings.mdx +28 -35
- package/docs/03-ai-sdk-core/35-image-generation.mdx +28 -25
- package/docs/03-ai-sdk-core/36-realtime.mdx +218 -0
- package/docs/03-ai-sdk-core/36-transcription.mdx +38 -39
- package/docs/03-ai-sdk-core/37-speech.mdx +29 -26
- package/docs/03-ai-sdk-core/38-video-generation.mdx +39 -39
- package/docs/03-ai-sdk-core/39-file-uploads.mdx +155 -0
- package/docs/03-ai-sdk-core/40-middleware.mdx +13 -13
- package/docs/03-ai-sdk-core/41-skill-uploads.mdx +197 -0
- package/docs/03-ai-sdk-core/45-provider-management.mdx +121 -0
- package/docs/03-ai-sdk-core/50-error-handling.mdx +7 -7
- package/docs/03-ai-sdk-core/55-testing.mdx +10 -10
- package/docs/03-ai-sdk-core/60-telemetry.mdx +510 -94
- package/docs/03-ai-sdk-core/65-devtools.mdx +40 -17
- package/docs/03-ai-sdk-core/65-lifecycle-callbacks.mdx +1136 -0
- package/docs/03-ai-sdk-core/index.mdx +28 -0
- package/docs/03-ai-sdk-harnesses/01-overview.mdx +114 -0
- package/docs/03-ai-sdk-harnesses/02-harness-agent.mdx +262 -0
- package/docs/03-ai-sdk-harnesses/03-tools.mdx +184 -0
- package/docs/03-ai-sdk-harnesses/04-skills.mdx +65 -0
- package/docs/03-ai-sdk-harnesses/05-harness-adapters.mdx +35 -0
- package/docs/03-ai-sdk-harnesses/06-ui.mdx +232 -0
- package/docs/03-ai-sdk-harnesses/07-terminal-ui.mdx +109 -0
- package/docs/03-ai-sdk-harnesses/index.mdx +55 -0
- package/docs/04-ai-sdk-ui/01-overview.mdx +8 -8
- package/docs/04-ai-sdk-ui/02-chatbot.mdx +106 -52
- package/docs/04-ai-sdk-ui/03-chatbot-message-persistence.mdx +105 -45
- package/docs/04-ai-sdk-ui/03-chatbot-resume-streams.mdx +155 -12
- package/docs/04-ai-sdk-ui/03-chatbot-tool-usage.mdx +103 -16
- package/docs/04-ai-sdk-ui/04-generative-user-interfaces.mdx +27 -9
- package/docs/04-ai-sdk-ui/05-completion.mdx +8 -2
- package/docs/04-ai-sdk-ui/08-object-generation.mdx +8 -4
- package/docs/04-ai-sdk-ui/20-streaming-data.mdx +17 -13
- package/docs/04-ai-sdk-ui/21-transport.mdx +38 -0
- package/docs/04-ai-sdk-ui/24-reading-ui-message-streams.mdx +6 -6
- package/docs/04-ai-sdk-ui/25-message-metadata.mdx +30 -22
- package/docs/04-ai-sdk-ui/50-stream-protocol.mdx +92 -7
- package/docs/04-ai-sdk-ui/index.mdx +6 -0
- package/docs/05-ai-sdk-rsc/04-multistep-interfaces.mdx +1 -1
- package/docs/05-ai-sdk-rsc/10-migrating-to-ui.mdx +39 -19
- package/docs/06-advanced/02-stopping-streams.mdx +22 -15
- package/docs/06-advanced/04-caching.mdx +20 -12
- package/docs/06-advanced/06-rate-limiting.mdx +8 -2
- package/docs/06-advanced/07-rendering-ui-with-language-models.mdx +3 -3
- package/docs/06-advanced/08-model-as-router.mdx +1 -1
- package/docs/07-reference/01-ai-sdk-core/01-generate-text.mdx +728 -268
- package/docs/07-reference/01-ai-sdk-core/02-stream-text.mdx +781 -259
- package/docs/07-reference/01-ai-sdk-core/05-embed.mdx +119 -12
- package/docs/07-reference/01-ai-sdk-core/06-embed-many.mdx +123 -12
- package/docs/07-reference/01-ai-sdk-core/06-rerank.mdx +22 -14
- package/docs/07-reference/01-ai-sdk-core/10-generate-image.mdx +3 -2
- package/docs/07-reference/01-ai-sdk-core/11-transcribe.mdx +3 -8
- package/docs/07-reference/01-ai-sdk-core/12-generate-speech.mdx +7 -12
- package/docs/07-reference/01-ai-sdk-core/13-generate-video.mdx +3 -2
- package/docs/07-reference/01-ai-sdk-core/14-upload-file.mdx +92 -0
- package/docs/07-reference/01-ai-sdk-core/14-upload-skill.mdx +114 -0
- package/docs/07-reference/01-ai-sdk-core/15-agent.mdx +36 -14
- package/docs/07-reference/01-ai-sdk-core/16-tool-loop-agent.mdx +323 -203
- package/docs/07-reference/01-ai-sdk-core/17-create-agent-ui-stream.mdx +20 -3
- package/docs/07-reference/01-ai-sdk-core/18-create-agent-ui-stream-response.mdx +20 -3
- package/docs/07-reference/01-ai-sdk-core/18-pipe-agent-ui-stream-to-response.mdx +20 -3
- package/docs/07-reference/01-ai-sdk-core/20-tool.mdx +65 -26
- package/docs/07-reference/01-ai-sdk-core/22-dynamic-tool.mdx +21 -15
- package/docs/07-reference/01-ai-sdk-core/23-create-mcp-client.mdx +122 -3
- package/docs/07-reference/01-ai-sdk-core/23-get-realtime-tool-definitions.mdx +117 -0
- package/docs/07-reference/01-ai-sdk-core/24-mcp-apps.mdx +183 -0
- package/docs/07-reference/01-ai-sdk-core/29-filter-active-tools.mdx +83 -0
- package/docs/07-reference/01-ai-sdk-core/30-model-message.mdx +98 -12
- package/docs/07-reference/01-ai-sdk-core/31-ui-message.mdx +18 -0
- package/docs/07-reference/01-ai-sdk-core/34-sandbox.mdx +137 -0
- package/docs/07-reference/01-ai-sdk-core/40-provider-registry.mdx +102 -0
- package/docs/07-reference/01-ai-sdk-core/42-custom-provider.mdx +56 -10
- package/docs/07-reference/01-ai-sdk-core/60-wrap-language-model.mdx +4 -4
- package/docs/07-reference/01-ai-sdk-core/61-wrap-image-model.mdx +4 -4
- package/docs/07-reference/01-ai-sdk-core/65-language-model-v2-middleware.mdx +9 -9
- package/docs/07-reference/01-ai-sdk-core/66-extract-reasoning-middleware.mdx +1 -1
- package/docs/07-reference/01-ai-sdk-core/67-simulate-streaming-middleware.mdx +1 -1
- package/docs/07-reference/01-ai-sdk-core/68-default-settings-middleware.mdx +1 -1
- package/docs/07-reference/01-ai-sdk-core/69-add-tool-input-examples-middleware.mdx +0 -1
- package/docs/07-reference/01-ai-sdk-core/{70-step-count-is.mdx → 70-is-step-count.mdx} +14 -14
- package/docs/07-reference/01-ai-sdk-core/71-has-tool-call.mdx +27 -9
- package/docs/07-reference/01-ai-sdk-core/72-loop-finished.mdx +83 -0
- package/docs/07-reference/01-ai-sdk-core/index.mdx +52 -2
- package/docs/07-reference/02-ai-sdk-ui/01-use-chat.mdx +1 -1
- package/docs/07-reference/02-ai-sdk-ui/02-use-completion.mdx +1 -1
- package/docs/07-reference/02-ai-sdk-ui/05-use-realtime.mdx +243 -0
- package/docs/07-reference/02-ai-sdk-ui/31-convert-to-model-messages.mdx +30 -5
- package/docs/07-reference/02-ai-sdk-ui/32-prune-messages.mdx +9 -2
- package/docs/07-reference/02-ai-sdk-ui/40-create-ui-message-stream.mdx +1 -1
- package/docs/07-reference/02-ai-sdk-ui/41-create-ui-message-stream-response.mdx +2 -1
- package/docs/07-reference/02-ai-sdk-ui/48-mcp-app-renderer.mdx +301 -0
- package/docs/07-reference/02-ai-sdk-ui/index.mdx +17 -7
- package/docs/07-reference/03-ai-sdk-rsc/01-stream-ui.mdx +10 -3
- package/docs/07-reference/04-ai-sdk-workflow/01-workflow-agent.mdx +926 -0
- package/docs/07-reference/04-ai-sdk-workflow/02-workflow-chat-transport.mdx +347 -0
- package/docs/07-reference/04-ai-sdk-workflow/index.mdx +26 -0
- package/docs/07-reference/05-ai-sdk-errors/ai-invalid-tool-approval-signature-error.mdx +31 -0
- package/docs/07-reference/05-ai-sdk-errors/ai-no-such-provider-reference-error.mdx +27 -0
- package/docs/07-reference/05-ai-sdk-errors/index.mdx +1 -0
- package/docs/07-reference/06-ai-sdk-tui/01-run-agent-tui.mdx +175 -0
- package/docs/07-reference/06-ai-sdk-tui/index.mdx +21 -0
- package/docs/07-reference/index.mdx +10 -0
- package/docs/08-migration-guides/23-migration-guide-7-0.mdx +1768 -0
- package/docs/08-migration-guides/24-migration-guide-6-0.mdx +4 -4
- package/docs/08-migration-guides/26-migration-guide-5-0.mdx +11 -8
- package/docs/09-troubleshooting/04-strange-stream-output.mdx +3 -1
- package/docs/09-troubleshooting/06-streaming-not-working-when-deployed.mdx +2 -1
- package/docs/09-troubleshooting/06-streaming-not-working-when-proxied.mdx +2 -1
- package/docs/09-troubleshooting/10-use-chat-tools-no-response.mdx +10 -3
- package/docs/09-troubleshooting/12-use-chat-an-error-occurred.mdx +7 -4
- package/docs/09-troubleshooting/13-repeated-assistant-messages.mdx +14 -9
- package/docs/09-troubleshooting/14-stream-abort-handling.mdx +36 -26
- package/docs/09-troubleshooting/14-tool-calling-with-structured-outputs.mdx +1 -1
- package/docs/09-troubleshooting/15-abort-breaks-resumable-streams.mdx +28 -14
- package/docs/09-troubleshooting/17-use-chat-stale-body-data.mdx +3 -1
- package/docs/09-troubleshooting/30-model-is-not-assignable-to-type.mdx +1 -1
- package/docs/09-troubleshooting/70-high-memory-usage-with-images.mdx +13 -10
- package/package.json +30 -28
- package/src/agent/agent.ts +78 -32
- package/src/agent/create-agent-ui-stream-response.ts +28 -15
- package/src/agent/create-agent-ui-stream.ts +67 -33
- package/src/agent/index.ts +0 -6
- package/src/agent/infer-agent-tools.ts +1 -1
- package/src/agent/infer-agent-ui-message.ts +2 -2
- package/src/agent/pipe-agent-ui-stream-to-response.ts +29 -16
- package/src/agent/tool-loop-agent-settings.ts +339 -213
- package/src/agent/tool-loop-agent.ts +189 -89
- package/src/embed/embed-events.ts +132 -0
- package/src/embed/embed-many-result.ts +3 -4
- package/src/embed/embed-many.ts +285 -242
- package/src/embed/embed-result.ts +3 -4
- package/src/embed/embed.ts +179 -102
- package/src/embed/index.ts +1 -0
- package/src/error/index.ts +2 -0
- package/src/error/invalid-stream-part-error.ts +3 -3
- package/src/error/invalid-tool-approval-signature-error.ts +35 -0
- package/src/error/no-image-generated-error.ts +1 -1
- package/src/error/no-object-generated-error.ts +7 -5
- package/src/error/no-speech-generated-error.ts +1 -1
- package/src/error/no-transcript-generated-error.ts +1 -1
- package/src/error/no-video-generated-error.ts +1 -1
- package/src/error/tool-call-repair-error.ts +2 -2
- package/src/error/verify-no-object-generated-error.ts +2 -4
- package/src/generate-image/generate-image-result.ts +5 -5
- package/src/generate-image/generate-image.ts +30 -32
- package/src/generate-image/index.ts +0 -16
- package/src/generate-object/generate-object-result.ts +4 -9
- package/src/generate-object/generate-object.ts +273 -249
- package/src/generate-object/index.ts +6 -0
- package/src/generate-object/inject-json-instruction.ts +1 -1
- package/src/generate-object/output-strategy.ts +15 -13
- package/src/generate-object/parse-and-validate-object-result.ts +3 -3
- package/src/generate-object/repair-text.ts +1 -1
- package/src/generate-object/stream-object-result.ts +7 -7
- package/src/generate-object/stream-object.ts +420 -402
- package/src/generate-object/structured-output-events.ts +208 -0
- package/src/generate-object/validate-object-generation-input.ts +1 -1
- package/src/generate-speech/generate-speech-result.ts +4 -4
- package/src/generate-speech/generate-speech.ts +12 -13
- package/src/generate-speech/generated-audio-file.ts +1 -2
- package/src/generate-speech/index.ts +19 -2
- package/src/generate-text/active-tools.ts +12 -0
- package/src/generate-text/calculate-tokens-per-second.ts +17 -0
- package/src/generate-text/collect-tool-approvals.ts +4 -4
- package/src/generate-text/content-part.ts +19 -11
- package/src/generate-text/execute-tool-call.ts +174 -124
- package/src/generate-text/execute-tools-from-stream.ts +245 -0
- package/src/generate-text/extract-reasoning-content.ts +1 -1
- package/src/generate-text/extract-text-content.ts +4 -1
- package/src/generate-text/filter-active-tools.ts +38 -0
- package/src/generate-text/generate-text-events.ts +429 -0
- package/src/generate-text/generate-text-result.ts +62 -53
- package/src/generate-text/generate-text.ts +1267 -848
- package/src/generate-text/index.ts +67 -27
- package/src/generate-text/invoke-tool-callbacks-from-stream.ts +83 -0
- package/src/generate-text/language-model-events.ts +128 -0
- package/src/generate-text/output-utils.ts +1 -1
- package/src/generate-text/output.ts +14 -11
- package/src/generate-text/parse-tool-call.ts +50 -13
- package/src/generate-text/prepare-step.ts +97 -21
- package/src/generate-text/prune-messages.ts +1 -1
- package/src/generate-text/reasoning-output.ts +97 -1
- package/src/generate-text/reasoning.ts +5 -3
- package/src/generate-text/resolve-tool-approval.ts +134 -0
- package/src/generate-text/response-message.ts +1 -1
- package/src/generate-text/restricted-telemetry-dispatcher.ts +297 -0
- package/src/generate-text/smooth-stream.ts +6 -5
- package/src/generate-text/step-result.ts +198 -80
- package/src/generate-text/stop-condition.ts +59 -11
- package/src/generate-text/stream-language-model-call.ts +842 -0
- package/src/generate-text/stream-text-result.ts +276 -146
- package/src/generate-text/stream-text.ts +1136 -1098
- package/src/generate-text/sum-token-counts.ts +12 -0
- package/src/generate-text/to-response-messages.ts +55 -6
- package/src/generate-text/tool-approval-configuration.ts +128 -0
- package/src/generate-text/tool-approval-request-output.ts +14 -2
- package/src/generate-text/tool-approval-response-output.ts +35 -0
- package/src/generate-text/tool-approval-signature.ts +125 -0
- package/src/generate-text/tool-call-repair-function.ts +12 -7
- package/src/generate-text/tool-call.ts +18 -5
- package/src/generate-text/tool-error.ts +6 -4
- package/src/generate-text/tool-execution-events.ts +169 -0
- package/src/generate-text/tool-input-refinement.ts +18 -0
- package/src/generate-text/tool-order.ts +12 -0
- package/src/generate-text/tool-output-denied.ts +2 -2
- package/src/generate-text/tool-output.ts +3 -3
- package/src/generate-text/tool-result.ts +10 -4
- package/src/generate-text/tools-context-parameter.ts +22 -0
- package/src/generate-text/validate-tool-approvals.ts +118 -0
- package/src/generate-text/validate-tool-context.ts +33 -0
- package/src/generate-video/generate-video-result.ts +4 -4
- package/src/generate-video/generate-video.ts +23 -26
- package/src/global.ts +5 -5
- package/src/index.ts +11 -6
- package/src/logger/log-warnings.ts +34 -20
- package/src/middleware/add-tool-input-examples-middleware.ts +2 -2
- package/src/middleware/default-embedding-settings-middleware.ts +2 -2
- package/src/middleware/default-settings-middleware.ts +2 -2
- package/src/middleware/extract-json-middleware.ts +3 -2
- package/src/middleware/extract-reasoning-middleware.ts +3 -2
- package/src/middleware/simulate-streaming-middleware.ts +1 -1
- package/src/middleware/wrap-embedding-model.ts +8 -7
- package/src/middleware/wrap-image-model.ts +8 -7
- package/src/middleware/wrap-language-model.ts +16 -11
- package/src/middleware/wrap-provider.ts +2 -2
- package/src/model/as-embedding-model-v3.ts +1 -1
- package/src/model/as-embedding-model-v4.ts +1 -1
- package/src/model/as-image-model-v3.ts +1 -1
- package/src/model/as-image-model-v4.ts +5 -1
- package/src/model/as-language-model-v3.ts +1 -1
- package/src/model/as-language-model-v4.ts +1 -1
- package/src/model/as-provider-v3.ts +1 -1
- package/src/model/as-provider-v4.ts +1 -1
- package/src/model/as-reranking-model-v4.ts +1 -1
- package/src/model/as-speech-model-v3.ts +1 -1
- package/src/model/as-speech-model-v4.ts +5 -1
- package/src/model/as-transcription-model-v3.ts +4 -1
- package/src/model/as-transcription-model-v4.ts +1 -1
- package/src/model/as-video-model-v4.ts +1 -1
- package/src/model/resolve-model.ts +95 -83
- package/src/prompt/clone-model-message.ts +41 -0
- package/src/prompt/content-part.ts +96 -14
- package/src/prompt/convert-to-language-model-prompt.ts +457 -143
- package/src/prompt/create-tool-model-output.ts +2 -2
- package/src/prompt/data-content.ts +1 -78
- package/src/prompt/file-part-data.ts +125 -0
- package/src/prompt/index.ts +17 -2
- package/src/prompt/language-model-call-options.ts +78 -0
- package/src/prompt/message-conversion-error.ts +1 -1
- package/src/prompt/message.ts +5 -1
- package/src/prompt/{prepare-call-settings.ts → prepare-language-model-call-options.ts} +6 -7
- package/src/prompt/prepare-tool-choice.ts +15 -0
- package/src/prompt/prepare-tools.ts +127 -0
- package/src/prompt/prompt.ts +29 -4
- package/src/prompt/request-options.ts +109 -0
- package/src/prompt/split-data-url.ts +1 -1
- package/src/prompt/standardize-prompt.ts +46 -35
- package/src/realtime/audio-utils.ts +82 -0
- package/src/realtime/browser-realtime-audio.ts +168 -0
- package/src/realtime/browser-realtime-transport.ts +134 -0
- package/src/realtime/get-realtime-tool-definitions.ts +66 -0
- package/src/realtime/index.ts +23 -0
- package/src/realtime/realtime-event-reducer.ts +523 -0
- package/src/realtime/realtime-session.ts +382 -0
- package/src/realtime/realtime-types.ts +13 -0
- package/src/registry/custom-provider.ts +129 -82
- package/src/registry/index.ts +1 -1
- package/src/registry/no-such-provider-error.ts +2 -1
- package/src/registry/provider-registry.ts +124 -46
- package/src/rerank/index.ts +6 -0
- package/src/rerank/rerank-events.ts +140 -0
- package/src/rerank/rerank-result.ts +1 -1
- package/src/rerank/rerank.ts +236 -109
- package/src/telemetry/create-telemetry-dispatcher.ts +209 -0
- package/src/telemetry/index.ts +8 -4
- package/src/telemetry/telemetry-options.ts +76 -0
- package/src/telemetry/telemetry-registry.ts +15 -0
- package/src/telemetry/telemetry.ts +273 -0
- package/src/telemetry/tracing-channel-publisher.ts +220 -0
- package/src/telemetry/tracing-channel.ts +15 -0
- package/src/test/mock-embedding-model-v2.ts +1 -1
- package/src/test/mock-embedding-model-v3.ts +2 -2
- package/src/test/mock-embedding-model-v4.ts +2 -2
- package/src/test/mock-image-model-v2.ts +1 -1
- package/src/test/mock-image-model-v3.ts +1 -1
- package/src/test/mock-image-model-v4.ts +1 -1
- package/src/test/mock-language-model-v2.ts +6 -6
- package/src/test/mock-language-model-v3.ts +6 -6
- package/src/test/mock-language-model-v4.ts +6 -6
- package/src/test/mock-provider-v2.ts +6 -7
- package/src/test/mock-provider-v3.ts +7 -8
- package/src/test/mock-provider-v4.ts +7 -8
- package/src/test/mock-reranking-model-v3.ts +1 -1
- package/src/test/mock-reranking-model-v4.ts +1 -1
- package/src/test/mock-sandbox.ts +32 -0
- package/src/test/mock-server-response.ts +1 -1
- package/src/test/mock-speech-model-v2.ts +1 -1
- package/src/test/mock-speech-model-v3.ts +1 -1
- package/src/test/mock-speech-model-v4.ts +1 -1
- package/src/test/mock-transcription-model-v2.ts +1 -1
- package/src/test/mock-transcription-model-v3.ts +1 -1
- package/src/test/mock-transcription-model-v4.ts +1 -1
- package/src/test/mock-video-model-v3.ts +1 -1
- package/src/test/mock-video-model-v4.ts +1 -1
- package/src/text-stream/create-text-stream-response.ts +4 -4
- package/src/text-stream/index.ts +1 -0
- package/src/text-stream/pipe-text-stream-to-response.ts +5 -5
- package/src/text-stream/to-text-stream.ts +21 -0
- package/src/transcribe/index.ts +19 -2
- package/src/transcribe/transcribe-result.ts +3 -3
- package/src/transcribe/transcribe.ts +12 -12
- package/src/types/embedding-model-middleware.ts +1 -1
- package/src/types/embedding-model.ts +1 -1
- package/src/types/image-model-middleware.ts +1 -1
- package/src/types/image-model.ts +1 -1
- package/src/types/index.ts +1 -0
- package/src/types/json-value.ts +1 -1
- package/src/types/language-model-middleware.ts +1 -1
- package/src/types/language-model-request-metadata.ts +11 -1
- package/src/types/language-model-response-metadata.ts +21 -4
- package/src/types/language-model.ts +2 -2
- package/src/types/provider-metadata.ts +1 -1
- package/src/types/provider-reference.ts +3 -0
- package/src/types/provider.ts +4 -4
- package/src/types/realtime-model.ts +26 -0
- package/src/types/reranking-model.ts +2 -2
- package/src/types/speech-model.ts +5 -1
- package/src/types/transcription-model.ts +1 -1
- package/src/types/usage.ts +1 -21
- package/src/types/video-model.ts +1 -1
- package/src/types/warning.ts +1 -1
- package/src/ui/call-completion-api.ts +2 -2
- package/src/ui/chat-transport.ts +3 -3
- package/src/ui/chat.ts +10 -11
- package/src/ui/convert-file-list-to-file-ui-parts.ts +1 -1
- package/src/ui/convert-to-model-messages.ts +79 -21
- package/src/ui/default-chat-transport.ts +4 -4
- package/src/ui/direct-chat-transport.ts +40 -15
- package/src/ui/http-chat-transport.ts +8 -8
- package/src/ui/index.ts +5 -1
- package/src/ui/last-assistant-message-is-complete-with-approval-responses.ts +1 -3
- package/src/ui/last-assistant-message-is-complete-with-tool-calls.ts +0 -1
- package/src/ui/process-ui-message-stream.ts +120 -29
- package/src/ui/text-stream-chat-transport.ts +3 -3
- package/src/ui/transform-text-to-ui-message-stream.ts +1 -1
- package/src/ui/ui-messages.ts +108 -13
- package/src/ui/use-completion.ts +1 -1
- package/src/ui/validate-ui-messages.ts +74 -10
- package/src/ui-message-stream/create-ui-message-stream-response.ts +2 -2
- package/src/ui-message-stream/create-ui-message-stream.ts +23 -14
- package/src/ui-message-stream/get-response-ui-message-id.ts +2 -2
- package/src/ui-message-stream/handle-ui-message-stream-finish.ts +21 -10
- package/src/ui-message-stream/index.ts +6 -0
- package/src/ui-message-stream/pipe-ui-message-stream-to-response.ts +3 -3
- package/src/ui-message-stream/read-ui-message-stream.ts +4 -4
- package/src/ui-message-stream/to-ui-message-chunk.ts +385 -0
- package/src/ui-message-stream/to-ui-message-stream.ts +90 -0
- package/src/ui-message-stream/ui-message-chunks.ts +63 -4
- package/src/ui-message-stream/ui-message-stream-on-finish-callback.ts +2 -2
- package/src/ui-message-stream/ui-message-stream-on-step-end-callback.ts +25 -0
- package/src/ui-message-stream/ui-message-stream-on-step-finish-callback.ts +5 -19
- package/src/ui-message-stream/ui-message-stream-writer.ts +3 -3
- package/src/upload-file/index.ts +2 -0
- package/src/upload-file/upload-file-result.ts +11 -0
- package/src/upload-file/upload-file.ts +141 -0
- package/src/upload-skill/index.ts +2 -0
- package/src/upload-skill/upload-skill-result.ts +11 -0
- package/src/upload-skill/upload-skill.ts +53 -0
- package/src/util/callback.ts +4 -0
- package/src/util/create-id-map.ts +11 -0
- package/src/util/create-resolvable-promise.ts +1 -1
- package/src/util/create-stitchable-stream.ts +1 -1
- package/src/util/data-url.ts +1 -1
- package/src/util/deep-partial.ts +1 -1
- package/src/util/download/download-function.ts +1 -1
- package/src/util/download/download.ts +15 -16
- package/src/util/extract-literal-union.ts +18 -0
- package/src/util/is-node-runtime.ts +3 -0
- package/src/util/merge-abort-signals.ts +17 -35
- package/src/util/merge-callbacks.ts +22 -0
- package/src/util/merge-objects.ts +5 -0
- package/src/util/notify.ts +11 -14
- package/src/util/parse-partial-json.ts +1 -1
- package/src/util/prepare-retries.ts +1 -2
- package/src/util/retry-with-exponential-backoff.ts +10 -5
- package/src/util/serial-job-executor.ts +1 -1
- package/src/util/set-abort-timeout.ts +37 -0
- package/src/util/write-to-server-response.ts +1 -1
- package/dist/index.d.mts +0 -6577
- package/dist/index.mjs +0 -13829
- package/dist/index.mjs.map +0 -1
- package/dist/internal/index.d.mts +0 -314
- package/dist/internal/index.mjs +0 -1303
- package/dist/internal/index.mjs.map +0 -1
- package/dist/test/index.d.mts +0 -265
- package/dist/test/index.mjs +0 -472
- package/dist/test/index.mjs.map +0 -1
- package/docs/03-ai-sdk-core/65-event-listeners.mdx +0 -915
- package/src/generate-text/callback-events.ts +0 -388
- package/src/generate-text/is-approval-needed.ts +0 -29
- package/src/generate-text/run-tools-transformation.ts +0 -451
- package/src/generate-text/tool-set.ts +0 -14
- package/src/prompt/call-settings.ts +0 -148
- package/src/prompt/prepare-tools-and-tool-choice.ts +0 -86
- package/src/telemetry/assemble-operation-name.ts +0 -21
- package/src/telemetry/get-base-telemetry-attributes.ts +0 -55
- package/src/telemetry/get-global-telemetry-integration.ts +0 -110
- package/src/telemetry/get-tracer.ts +0 -20
- package/src/telemetry/noop-tracer.ts +0 -69
- package/src/telemetry/open-telemetry-integration.ts +0 -530
- package/src/telemetry/record-span.ts +0 -75
- package/src/telemetry/select-telemetry-attributes.ts +0 -78
- package/src/telemetry/stringify-for-telemetry.ts +0 -33
- package/src/telemetry/telemetry-integration-registry.ts +0 -22
- package/src/telemetry/telemetry-integration.ts +0 -100
- package/src/telemetry/telemetry-settings.ts +0 -55
- package/src/test/mock-tracer.ts +0 -156
- package/src/util/as-array.ts +0 -3
- package/src/util/detect-media-type.ts +0 -226
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,1441 @@
|
|
|
1
1
|
# ai
|
|
2
2
|
|
|
3
|
+
## 7.0.0-beta.178
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- b097c52: feat(ai): use tracing channels to track parent-child context
|
|
8
|
+
- Updated dependencies [15eb253]
|
|
9
|
+
- @ai-sdk/gateway@4.0.0-beta.109
|
|
10
|
+
|
|
11
|
+
## 7.0.0-beta.177
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- b8396f0: trigger initial beta release
|
|
16
|
+
- Updated dependencies [b8396f0]
|
|
17
|
+
- @ai-sdk/gateway@4.0.0-beta.108
|
|
18
|
+
- @ai-sdk/provider-utils@5.0.0-beta.49
|
|
19
|
+
- @ai-sdk/provider@4.0.0-beta.19
|
|
20
|
+
|
|
21
|
+
## 7.0.0-canary.176
|
|
22
|
+
|
|
23
|
+
### Patch Changes
|
|
24
|
+
|
|
25
|
+
- Updated dependencies [d5b8263]
|
|
26
|
+
- @ai-sdk/gateway@4.0.0-canary.107
|
|
27
|
+
|
|
28
|
+
## 7.0.0-canary.175
|
|
29
|
+
|
|
30
|
+
### Patch Changes
|
|
31
|
+
|
|
32
|
+
- 6ec57f5: feat(ai): make the experimental lifecycle callbacks stable
|
|
33
|
+
|
|
34
|
+
## 7.0.0-canary.174
|
|
35
|
+
|
|
36
|
+
### Patch Changes
|
|
37
|
+
|
|
38
|
+
- Updated dependencies [ca2cf45]
|
|
39
|
+
- @ai-sdk/gateway@4.0.0-canary.106
|
|
40
|
+
|
|
41
|
+
## 7.0.0-canary.173
|
|
42
|
+
|
|
43
|
+
### Patch Changes
|
|
44
|
+
|
|
45
|
+
- Updated dependencies [efec111]
|
|
46
|
+
- @ai-sdk/gateway@4.0.0-canary.105
|
|
47
|
+
|
|
48
|
+
## 7.0.0-canary.172
|
|
49
|
+
|
|
50
|
+
### Patch Changes
|
|
51
|
+
|
|
52
|
+
- 25a64f8: Remove deprecated experimental generateImage exports.
|
|
53
|
+
- 375fdd7: fix: harden download URL SSRF guard against hostname and redirect bypasses
|
|
54
|
+
|
|
55
|
+
`validateDownloadUrl` and the file download helpers (`downloadBlob`, `download`) could be bypassed in several ways when handling untrusted URLs:
|
|
56
|
+
|
|
57
|
+
- A fully-qualified hostname with a trailing dot (e.g. `localhost.`, `myhost.local.`) skipped the localhost/`.local` blocklist.
|
|
58
|
+
- IPv6 addresses that embed an IPv4 address in their last 32 bits — IPv4-compatible (`::127.0.0.1`), IPv4-translated (`::ffff:0:127.0.0.1`), and NAT64 (`64:ff9b::127.0.0.1`, including the `64:ff9b:1::/48` local-use prefix) — were not decoded and checked against the private IPv4 ranges.
|
|
59
|
+
- Redirects were validated only _after_ `fetch` had already followed them, so the request to a redirect target (e.g. an internal/metadata address) had already been issued before the check ran.
|
|
60
|
+
- Several reserved/internal address ranges were not blocked: CGNAT (`100.64.0.0/10`, used by some cloud providers for internal traffic), benchmarking (`198.18.0.0/15`), IETF protocol assignments (`192.0.0.0/24`), the reserved `240.0.0.0/4` block (including the `255.255.255.255` broadcast address), and IPv6 site-local (`fec0::/10`) and multicast (`ff00::/8`).
|
|
61
|
+
|
|
62
|
+
The validator now strips trailing dots before the hostname checks and fully expands IPv6 addresses to detect embedded private IPv4 targets. The download helpers now follow redirects manually (`redirect: 'manual'`), re-validating each hop before requesting it, so an unsafe redirect target is never fetched. When a redirect cannot be inspected because the runtime returns an opaque response, the helpers fail closed (reject the redirect) on the server; only in a real browser — where SSRF is not reachable (fetch is constrained by CORS and cannot reach a server's internal network or cloud-metadata endpoints) — is the redirect followed natively so legitimate redirected downloads keep working.
|
|
63
|
+
|
|
64
|
+
- f18b08f: fix: redact server error details from UI message streams by default
|
|
65
|
+
|
|
66
|
+
`toUIMessageStream`, `createUIMessageStream`, and `toUIMessageChunk` defaulted their `onError` callback to `getErrorMessage`, which serializes the raw error (`error.toString()` / `JSON.stringify(error)`) into the client-facing `{ type: 'error', errorText }` chunk — and also into `tool-output-error` parts. The documented default was `() => 'An error occurred.'`, so applications relying on the documented behavior were unknowingly streaming server exception details (internal hostnames, paths, provider request data, validation inputs) to end users.
|
|
67
|
+
|
|
68
|
+
The default `onError` now returns the documented generic `'An error occurred.'`. Raw error details are only emitted when the developer explicitly supplies an `onError` handler. This also redacts `tool-output-error` and invalid-tool-input error text by default; pass an `onError` to surface richer messages.
|
|
69
|
+
|
|
70
|
+
- b4507d5: fix(provider-utils): cancel response body on download rejection to prevent socket leak
|
|
71
|
+
|
|
72
|
+
When a download was rejected early — because the `Content-Length` header exceeded the size limit, the response status was not ok, or a redirect resolved to a blocked URL — the fetch response body was left unconsumed and uncancelled. With WHATWG Fetch/undici this leaves the underlying TCP socket open instead of returning it to the connection pool, allowing an attacker-controlled origin to exhaust file descriptors and cause a denial of service. The body is now cancelled on all early-rejection paths in `readResponseWithSizeLimit`, `download`, and `downloadBlob`, and `fetchWithValidatedRedirects` cancels each redirect hop's body before following or rejecting the next hop.
|
|
73
|
+
|
|
74
|
+
- Updated dependencies [8c17bf8]
|
|
75
|
+
- Updated dependencies [aeda373]
|
|
76
|
+
- Updated dependencies [558777f]
|
|
77
|
+
- Updated dependencies [375fdd7]
|
|
78
|
+
- Updated dependencies [b4507d5]
|
|
79
|
+
- @ai-sdk/gateway@4.0.0-canary.104
|
|
80
|
+
- @ai-sdk/provider-utils@5.0.0-canary.48
|
|
81
|
+
|
|
82
|
+
## 7.0.0-canary.171
|
|
83
|
+
|
|
84
|
+
### Patch Changes
|
|
85
|
+
|
|
86
|
+
- 89ad56f: Promote `generateSpeech` and `SpeechResult` to stable exports.
|
|
87
|
+
- f9a496f: Promote `transcribe` and `TranscriptionResult` to stable exports, with deprecated experimental aliases for backwards compatibility.
|
|
88
|
+
- 3295831: Harden stream text processing and middleware against prototype pollution from stream part IDs.
|
|
89
|
+
|
|
90
|
+
## 7.0.0-canary.170
|
|
91
|
+
|
|
92
|
+
### Patch Changes
|
|
93
|
+
|
|
94
|
+
- bae5e2b: fix(security): re-validate tool approvals from client message history before execution
|
|
95
|
+
|
|
96
|
+
The approval-replay path in `generateText`/`streamText` (and `WorkflowAgent.stream`) reconstructed approved tool calls from the client-supplied messages array and executed them without re-validating input against the tool's schema or re-applying the approval policy. A client could forge an assistant message with a pre-approved tool-call part and have the server execute a tool with attacker-chosen arguments.
|
|
97
|
+
|
|
98
|
+
The replay path now validates HMAC signature (when `experimental_toolApprovalSecret` is configured), re-validates tool-call input against the tool's input schema, and re-resolves the approval policy before execution.
|
|
99
|
+
|
|
100
|
+
- 69d7128: fix(workflow): reuse the core tool-approval validation in WorkflowAgent
|
|
101
|
+
|
|
102
|
+
`WorkflowAgent.stream` previously reconstructed approved tool calls with a copy of the core collection logic and validated them inline. Because the logic was duplicated, it could drift from the hardened `generateText`/`streamText` implementation. WorkflowAgent now collects approvals via the shared `collectToolApprovals` and re-validates each one through the shared `validateApprovedToolApprovals` (input-schema re-validation, HMAC signature verification when configured, and approval-policy re-resolution) in addition to its existing `needsApproval` guard, so a client-forged approval cannot execute a tool with unvalidated input. The duplicated collector was removed; `collectToolApprovals` and `validateApprovedToolApprovals` are now exported from `ai/internal`.
|
|
103
|
+
|
|
104
|
+
- Updated dependencies [bae5e2b]
|
|
105
|
+
- @ai-sdk/provider-utils@5.0.0-canary.47
|
|
106
|
+
- @ai-sdk/gateway@4.0.0-canary.103
|
|
107
|
+
|
|
108
|
+
## 7.0.0-canary.169
|
|
109
|
+
|
|
110
|
+
### Patch Changes
|
|
111
|
+
|
|
112
|
+
- a5018ab: fix(ai): return schema-transformed elements in array output mode
|
|
113
|
+
|
|
114
|
+
Previously final array output validation checked each element against the schema but returned the raw model output. Array output now returns the validated values so Zod transforms, coercions, defaults, and pipes are applied consistently with object output.
|
|
115
|
+
|
|
116
|
+
- 21d3d60: feat(harness): implement harness specification
|
|
117
|
+
- 426dbbb: fix(ai): reject `streamText` result promises with `NoOutputGeneratedError` when the model stream ends without producing any output. Previously such streams resolved with an empty step. Incomplete streams with partial output still resolve with the partial result.
|
|
118
|
+
- 7fd3360: Harden UI message stream processing against prototype pollution from chunk IDs.
|
|
119
|
+
|
|
120
|
+
## 7.0.0-canary.168
|
|
121
|
+
|
|
122
|
+
### Patch Changes
|
|
123
|
+
|
|
124
|
+
- 1e4b350: Honor `tool.toModelOutput` in `WorkflowAgent`.
|
|
125
|
+
|
|
126
|
+
`WorkflowAgent` now routes successful local, provider-executed, and approved tool results through each tool's optional `toModelOutput` hook, matching `generateText`, `streamText`, and `ToolLoopAgent`. Previously the hook was ignored and results were always serialized as `text` or `json`.
|
|
127
|
+
|
|
128
|
+
Internally exports the shared tool-result model-output helpers from `ai/internal`, and uses the shared `getErrorMessage` behavior for workflow tool error results.
|
|
129
|
+
|
|
130
|
+
- Updated dependencies [a3bb04a]
|
|
131
|
+
- @ai-sdk/gateway@4.0.0-canary.102
|
|
132
|
+
|
|
133
|
+
## 7.0.0-canary.167
|
|
134
|
+
|
|
135
|
+
### Patch Changes
|
|
136
|
+
|
|
137
|
+
- 4757690: feat(ai): rename onObjectStepFinish to onObjectStepEnd
|
|
138
|
+
- eeefc3f: fix(ai): enforce `timeout.stepMs` for the whole step in `streamText`
|
|
139
|
+
|
|
140
|
+
Previously `streamText`'s step timer was cleared synchronously right after the step's stream was registered, before the stream produced anything, so `stepMs` never aborted a step that stalled before emitting content. The step timer now survives until the step's stream finishes or aborts, matching `generateText`. `chunkMs`/`totalMs` and normal step-finish cleanup are unchanged.
|
|
141
|
+
|
|
142
|
+
- b79b6a8: fix(ai): add approval guard for denied tool outputs
|
|
143
|
+
- Updated dependencies [6b4d325]
|
|
144
|
+
- @ai-sdk/gateway@4.0.0-canary.101
|
|
145
|
+
|
|
146
|
+
## 7.0.0-canary.166
|
|
147
|
+
|
|
148
|
+
### Patch Changes
|
|
149
|
+
|
|
150
|
+
- 19736ee: feat(ai): rename onStepFinish to onStepEnd
|
|
151
|
+
- d66ae02: Return validated elements from generateText array output
|
|
152
|
+
- e4182bd: chore: rm export of OutputInterface
|
|
153
|
+
- Updated dependencies [24bb123]
|
|
154
|
+
- Updated dependencies [c44fcc8]
|
|
155
|
+
- Updated dependencies [97e480a]
|
|
156
|
+
- @ai-sdk/gateway@4.0.0-canary.100
|
|
157
|
+
|
|
158
|
+
## 7.0.0-canary.165
|
|
159
|
+
|
|
160
|
+
### Patch Changes
|
|
161
|
+
|
|
162
|
+
- ce769dd: feat(provider): add experimental Realtime API support for voice conversations
|
|
163
|
+
|
|
164
|
+
Adds first-class support for realtime (speech-to-speech) APIs:
|
|
165
|
+
|
|
166
|
+
- `Experimental_RealtimeModelV4` spec in `@ai-sdk/provider` with normalized event types and factory
|
|
167
|
+
- OpenAI, Google, and xAI realtime provider implementations
|
|
168
|
+
- `openai.experimental_realtime()` / `google.experimental_realtime()` / `xai.experimental_realtime()` work in both server and browser
|
|
169
|
+
- `.getToken()` static method on each provider for server-side ephemeral token creation
|
|
170
|
+
- `experimental_getRealtimeToolDefinitions` helper for provider session tool definitions
|
|
171
|
+
- `experimental_useRealtime` hook in `@ai-sdk/react` returning `UIMessage[]` (aligned with `useChat`), with `onToolCall` and `addToolOutput` for client-driven tool execution
|
|
172
|
+
- `inputAudioTranscription` session config for showing transcribed user audio messages when supported by the provider
|
|
173
|
+
|
|
174
|
+
- Updated dependencies [ce769dd]
|
|
175
|
+
- @ai-sdk/provider@4.0.0-canary.18
|
|
176
|
+
- @ai-sdk/gateway@4.0.0-canary.99
|
|
177
|
+
- @ai-sdk/provider-utils@5.0.0-canary.46
|
|
178
|
+
|
|
179
|
+
## 7.0.0-canary.164
|
|
180
|
+
|
|
181
|
+
### Patch Changes
|
|
182
|
+
|
|
183
|
+
- Updated dependencies [9876183]
|
|
184
|
+
- @ai-sdk/gateway@4.0.0-canary.98
|
|
185
|
+
|
|
186
|
+
## 7.0.0-canary.163
|
|
187
|
+
|
|
188
|
+
### Patch Changes
|
|
189
|
+
|
|
190
|
+
- ee798eb: chore(provider-utils): rename `Experimental_Sandbox` to `Experimental_SandboxSession`
|
|
191
|
+
- c907622: Add a `toolOrder` option to control the order in which tools are sent to provider APIs.
|
|
192
|
+
- Updated dependencies [ee798eb]
|
|
193
|
+
- Updated dependencies [daf6637]
|
|
194
|
+
- @ai-sdk/provider-utils@5.0.0-canary.45
|
|
195
|
+
- @ai-sdk/gateway@4.0.0-canary.97
|
|
196
|
+
|
|
197
|
+
## 7.0.0-canary.162
|
|
198
|
+
|
|
199
|
+
### Patch Changes
|
|
200
|
+
|
|
201
|
+
- Updated dependencies [83877a1]
|
|
202
|
+
- @ai-sdk/gateway@4.0.0-canary.96
|
|
203
|
+
|
|
204
|
+
## 7.0.0-canary.161
|
|
205
|
+
|
|
206
|
+
### Patch Changes
|
|
207
|
+
|
|
208
|
+
- Updated dependencies [a3261db]
|
|
209
|
+
- @ai-sdk/gateway@4.0.0-canary.95
|
|
210
|
+
|
|
211
|
+
## 7.0.0-canary.160
|
|
212
|
+
|
|
213
|
+
### Patch Changes
|
|
214
|
+
|
|
215
|
+
- Updated dependencies [712873e]
|
|
216
|
+
- @ai-sdk/gateway@4.0.0-canary.94
|
|
217
|
+
|
|
218
|
+
## 7.0.0-canary.159
|
|
219
|
+
|
|
220
|
+
### Patch Changes
|
|
221
|
+
|
|
222
|
+
- b5092f5: fix(ai): do not re-validate tool input for output-error parts in validateUIMessages
|
|
223
|
+
|
|
224
|
+
## 7.0.0-canary.158
|
|
225
|
+
|
|
226
|
+
### Patch Changes
|
|
227
|
+
|
|
228
|
+
- bcce2dd: feat(stream-text): expose standalone stream transformation helpers and deprecate the equivalent `streamText` result methods.
|
|
229
|
+
|
|
230
|
+
The new `toUIMessageChunk` and `toUIMessageStream` helpers let you convert a `streamText` `stream` (or any compatible `ReadableStream<TextStreamPart<TOOLS>>`) into UI message chunks without going through the result object — useful for custom transports, tests, and other producers of `TextStreamPart`.
|
|
231
|
+
|
|
232
|
+
`result.toUIMessageStreamResponse(options)` and `result.pipeUIMessageStreamToResponse(response, options)` can migrate by passing `toUIMessageStream({ stream: result.stream, ...options })` to `createUIMessageStreamResponse` or `pipeUIMessageStreamToResponse`.
|
|
233
|
+
|
|
234
|
+
The new `toTextStream` helper extracts text deltas from a `streamText` `stream`, so `result.toTextStreamResponse(options)` and `result.pipeTextStreamToResponse(response, options)` can migrate to `createTextStreamResponse({ stream: toTextStream({ stream: result.stream }), ...options })` and `pipeTextStreamToResponse({ response, stream: toTextStream({ stream: result.stream }), ...options })`.
|
|
235
|
+
|
|
236
|
+
`result.toUIMessageStream`, `result.toUIMessageStreamResponse`, `result.pipeUIMessageStreamToResponse`, `result.toTextStreamResponse`, and `result.pipeTextStreamToResponse` are now `@deprecated`. They still work in v7 and will be removed in the next major release. Migration snippets are in the v6 → v7 migration guide.
|
|
237
|
+
|
|
238
|
+
## 7.0.0-canary.157
|
|
239
|
+
|
|
240
|
+
### Patch Changes
|
|
241
|
+
|
|
242
|
+
- Updated dependencies [e02f041]
|
|
243
|
+
- @ai-sdk/gateway@4.0.0-canary.93
|
|
244
|
+
|
|
245
|
+
## 7.0.0-canary.156
|
|
246
|
+
|
|
247
|
+
### Patch Changes
|
|
248
|
+
|
|
249
|
+
- 023550e: Deprecate `streamText` result `fullStream` in favor of `stream`.
|
|
250
|
+
- e92fc45: feat(ai): introduce onAbort hook to close telemetry spans
|
|
251
|
+
|
|
252
|
+
## 7.0.0-canary.155
|
|
253
|
+
|
|
254
|
+
### Patch Changes
|
|
255
|
+
|
|
256
|
+
- e67d80e: fix: rename onFinish to onEnd
|
|
257
|
+
- 6cca112: feat: add timeBetweenOutputTokensMs stats
|
|
258
|
+
- 82fc0ab: fix(ai): pass all stream text parts to `onChunk`
|
|
259
|
+
- 76fd58c: fix: consider file outputs and tool calls for time to first output
|
|
260
|
+
|
|
261
|
+
## 7.0.0-canary.154
|
|
262
|
+
|
|
263
|
+
### Patch Changes
|
|
264
|
+
|
|
265
|
+
- 594029e: feat(ai): wrap the model call in telemetry context
|
|
266
|
+
|
|
267
|
+
## 7.0.0-canary.153
|
|
268
|
+
|
|
269
|
+
### Patch Changes
|
|
270
|
+
|
|
271
|
+
- 6c93e36: feat(provider-utils): add `spawnCommand` method to `Experimental_Sandbox` to allow for detached command execution
|
|
272
|
+
- Updated dependencies [6c93e36]
|
|
273
|
+
- Updated dependencies [f617ac2]
|
|
274
|
+
- @ai-sdk/provider-utils@5.0.0-canary.44
|
|
275
|
+
- @ai-sdk/gateway@4.0.0-canary.92
|
|
276
|
+
|
|
277
|
+
## 7.0.0-canary.152
|
|
278
|
+
|
|
279
|
+
### Patch Changes
|
|
280
|
+
|
|
281
|
+
- Updated dependencies [d4d4a5e]
|
|
282
|
+
- @ai-sdk/gateway@4.0.0-canary.91
|
|
283
|
+
|
|
284
|
+
## 7.0.0-canary.151
|
|
285
|
+
|
|
286
|
+
### Patch Changes
|
|
287
|
+
|
|
288
|
+
- Updated dependencies [8b811d8]
|
|
289
|
+
- @ai-sdk/gateway@4.0.0-canary.90
|
|
290
|
+
|
|
291
|
+
## 7.0.0-canary.150
|
|
292
|
+
|
|
293
|
+
### Patch Changes
|
|
294
|
+
|
|
295
|
+
- Updated dependencies [bba5250]
|
|
296
|
+
- Updated dependencies [94c6edc]
|
|
297
|
+
- @ai-sdk/gateway@4.0.0-canary.89
|
|
298
|
+
|
|
299
|
+
## 7.0.0-canary.149
|
|
300
|
+
|
|
301
|
+
### Patch Changes
|
|
302
|
+
|
|
303
|
+
- e3d9c0e: Add `allowSystemInMessages` option to `ToolLoopAgent`.
|
|
304
|
+
|
|
305
|
+
This exposes the same option that exists on `streamText` and `generateText`, whether `role: "system"` messages are allowed in the `prompt` or `messages` fields. When unset, system messages are rejected because they can create a prompt injection attack risk. Ideally, use the `instructions` option instead. Set to `true` to allow system messages, or `false` to explicitly reject them.
|
|
306
|
+
|
|
307
|
+
```ts
|
|
308
|
+
const agent = new ToolLoopAgent({
|
|
309
|
+
model,
|
|
310
|
+
allowSystemInMessages: true,
|
|
311
|
+
});
|
|
312
|
+
|
|
313
|
+
await agent.generate({
|
|
314
|
+
messages: [
|
|
315
|
+
{ role: "system", content: "Server context" },
|
|
316
|
+
{ role: "user", content: "Hello" },
|
|
317
|
+
],
|
|
318
|
+
});
|
|
319
|
+
```
|
|
320
|
+
|
|
321
|
+
The option can also be returned from `prepareCall` for dynamic per-call configuration.
|
|
322
|
+
|
|
323
|
+
## 7.0.0-canary.148
|
|
324
|
+
|
|
325
|
+
### Patch Changes
|
|
326
|
+
|
|
327
|
+
- 2852a84: fix(ai): make input optional on input-streaming UIMessagePart variants
|
|
328
|
+
|
|
329
|
+
## 7.0.0-canary.147
|
|
330
|
+
|
|
331
|
+
### Patch Changes
|
|
332
|
+
|
|
333
|
+
- Updated dependencies [accaca0]
|
|
334
|
+
- @ai-sdk/gateway@4.0.0-canary.88
|
|
335
|
+
|
|
336
|
+
## 7.0.0-canary.146
|
|
337
|
+
|
|
338
|
+
### Patch Changes
|
|
339
|
+
|
|
340
|
+
- Updated dependencies [bf837fe]
|
|
341
|
+
- @ai-sdk/gateway@4.0.0-canary.87
|
|
342
|
+
|
|
343
|
+
## 7.0.0-canary.145
|
|
344
|
+
|
|
345
|
+
### Patch Changes
|
|
346
|
+
|
|
347
|
+
- Updated dependencies [546cefe]
|
|
348
|
+
- @ai-sdk/gateway@4.0.0-canary.86
|
|
349
|
+
|
|
350
|
+
## 7.0.0-canary.144
|
|
351
|
+
|
|
352
|
+
### Patch Changes
|
|
353
|
+
|
|
354
|
+
- 7fc6bd6: Raise minimum supported Node.js version to 22. Supported versions: 22, 24, and 26.
|
|
355
|
+
- Updated dependencies [7fc6bd6]
|
|
356
|
+
- @ai-sdk/gateway@4.0.0-canary.85
|
|
357
|
+
- @ai-sdk/provider-utils@5.0.0-canary.43
|
|
358
|
+
- @ai-sdk/provider@4.0.0-canary.17
|
|
359
|
+
|
|
360
|
+
## 7.0.0-canary.143
|
|
361
|
+
|
|
362
|
+
### Patch Changes
|
|
363
|
+
|
|
364
|
+
- a6617c5: feat(provider-utils): add `readFile` and `writeFile` plus convenience wrappers to `Experimental_Sandbox` abstraction
|
|
365
|
+
- Updated dependencies [a6617c5]
|
|
366
|
+
- Updated dependencies [032c4a5]
|
|
367
|
+
- @ai-sdk/provider-utils@5.0.0-canary.42
|
|
368
|
+
- @ai-sdk/gateway@4.0.0-canary.84
|
|
369
|
+
|
|
370
|
+
## 7.0.0-canary.142
|
|
371
|
+
|
|
372
|
+
### Patch Changes
|
|
373
|
+
|
|
374
|
+
- 62d6481: Post-publish release notifications now link to each package’s GitHub release and npm page.
|
|
375
|
+
|
|
376
|
+
## 7.0.0-canary.141
|
|
377
|
+
|
|
378
|
+
### Patch Changes
|
|
379
|
+
|
|
380
|
+
- e3a0419: fix(ai): default missing embedding warnings to an empty array
|
|
381
|
+
|
|
382
|
+
## 7.0.0-canary.140
|
|
383
|
+
|
|
384
|
+
### Patch Changes
|
|
385
|
+
|
|
386
|
+
- Updated dependencies [1d6fb7f]
|
|
387
|
+
- @ai-sdk/gateway@4.0.0-canary.83
|
|
388
|
+
|
|
389
|
+
## 7.0.0-canary.139
|
|
390
|
+
|
|
391
|
+
### Patch Changes
|
|
392
|
+
|
|
393
|
+
- 334ae5d: Update step performance metrics with explicit effective, input, output, and total token throughput fields.
|
|
394
|
+
- 28dfa06: fix: support tools with optional context
|
|
395
|
+
- e93fa91: rename Sandbox.executeCommand to Sandbox.runCommand
|
|
396
|
+
- Updated dependencies [28dfa06]
|
|
397
|
+
- Updated dependencies [e93fa91]
|
|
398
|
+
- @ai-sdk/provider-utils@5.0.0-canary.41
|
|
399
|
+
- @ai-sdk/gateway@4.0.0-canary.82
|
|
400
|
+
|
|
401
|
+
## 7.0.0-canary.138
|
|
402
|
+
|
|
403
|
+
### Patch Changes
|
|
404
|
+
|
|
405
|
+
- Updated dependencies [67c4011]
|
|
406
|
+
- @ai-sdk/gateway@4.0.0-canary.81
|
|
407
|
+
|
|
408
|
+
## 7.0.0-canary.137
|
|
409
|
+
|
|
410
|
+
### Patch Changes
|
|
411
|
+
|
|
412
|
+
- 98627e5: feat(ai): remove onChunk event from telemetry
|
|
413
|
+
- 476e1ca: feat(ai): remove telemetry dependency on onChunk callback
|
|
414
|
+
|
|
415
|
+
## 7.0.0-canary.136
|
|
416
|
+
|
|
417
|
+
### Patch Changes
|
|
418
|
+
|
|
419
|
+
- a7de9c9: fix: make sandbox experimental
|
|
420
|
+
- Updated dependencies [a7de9c9]
|
|
421
|
+
- @ai-sdk/provider-utils@5.0.0-canary.40
|
|
422
|
+
- @ai-sdk/gateway@4.0.0-canary.80
|
|
423
|
+
|
|
424
|
+
## 7.0.0-canary.135
|
|
425
|
+
|
|
426
|
+
### Patch Changes
|
|
427
|
+
|
|
428
|
+
- Updated dependencies [105f95b]
|
|
429
|
+
- @ai-sdk/provider-utils@5.0.0-canary.39
|
|
430
|
+
- @ai-sdk/gateway@4.0.0-canary.79
|
|
431
|
+
|
|
432
|
+
## 7.0.0-canary.134
|
|
433
|
+
|
|
434
|
+
### Patch Changes
|
|
435
|
+
|
|
436
|
+
- ed74dae: fix(ui): make `input` optional on `output-error` tool and dynamic-tool UI message parts
|
|
437
|
+
|
|
438
|
+
`validateUIMessages` rejected persisted assistant messages whose `output-error` tool parts had no `input` key. This happened for any errored tool call where the SDK set `input: undefined` (e.g. `NoSuchToolError` / `InvalidToolInputError`): JSON serialization stripped the `undefined` value, and Zod 4.4+ treats a missing `z.unknown()` key as a validation failure (previously it was implicitly optional). The schema now matches the runtime shape produced by `process-ui-message-stream`, so reloading a thread that contains an errored tool call no longer throws `AI_TypeValidationError`.
|
|
439
|
+
|
|
440
|
+
- f4cc8eb: feat: add performance statistics
|
|
441
|
+
- e80ada0: fix(ai): download tool-result file URLs
|
|
442
|
+
- 1dca341: fix: rename telemetry onFinish to onEnd
|
|
443
|
+
- 2605e5f: fix test mocks to return the first array-backed result on the first call
|
|
444
|
+
|
|
445
|
+
## 7.0.0-canary.133
|
|
446
|
+
|
|
447
|
+
### Patch Changes
|
|
448
|
+
|
|
449
|
+
- 38ca8dc: fix(gateway): enable retry support for gateway errors
|
|
450
|
+
- 6d76710: fix URL of hero animation in README
|
|
451
|
+
- Updated dependencies [38ca8dc]
|
|
452
|
+
- Updated dependencies [8b7af75]
|
|
453
|
+
- @ai-sdk/gateway@4.0.0-canary.78
|
|
454
|
+
|
|
455
|
+
## 7.0.0-canary.132
|
|
456
|
+
|
|
457
|
+
### Patch Changes
|
|
458
|
+
|
|
459
|
+
- eaf849f: Rename rerank telemetry finish callback to `onRerankEnd`.
|
|
460
|
+
- 8565dcb: fix: rename onEmbedFinish to onEmbedEnd
|
|
461
|
+
|
|
462
|
+
## 7.0.0-canary.131
|
|
463
|
+
|
|
464
|
+
### Patch Changes
|
|
465
|
+
|
|
466
|
+
- b67525f: feat: instructions as prepareStep input
|
|
467
|
+
- ca446f8: feat: flexible tool descriptions
|
|
468
|
+
- bcacd48: fix(ai): accumulative properties on StreamTextResult, GenerateTextResult
|
|
469
|
+
- Updated dependencies [ca446f8]
|
|
470
|
+
- @ai-sdk/provider-utils@5.0.0-canary.38
|
|
471
|
+
- @ai-sdk/gateway@4.0.0-canary.77
|
|
472
|
+
|
|
473
|
+
## 7.0.0-canary.130
|
|
474
|
+
|
|
475
|
+
### Patch Changes
|
|
476
|
+
|
|
477
|
+
- Updated dependencies [5f380c0]
|
|
478
|
+
- @ai-sdk/gateway@4.0.0-canary.76
|
|
479
|
+
|
|
480
|
+
## 7.0.0-canary.129
|
|
481
|
+
|
|
482
|
+
### Patch Changes
|
|
483
|
+
|
|
484
|
+
- d1b3786: fix(ai): deprecate properties on result that have moved to finalStep
|
|
485
|
+
|
|
486
|
+
## 7.0.0-canary.128
|
|
487
|
+
|
|
488
|
+
### Patch Changes
|
|
489
|
+
|
|
490
|
+
- Updated dependencies [d848405]
|
|
491
|
+
- @ai-sdk/provider-utils@5.0.0-canary.37
|
|
492
|
+
- @ai-sdk/gateway@4.0.0-canary.75
|
|
493
|
+
|
|
494
|
+
## 7.0.0-canary.127
|
|
495
|
+
|
|
496
|
+
### Patch Changes
|
|
497
|
+
|
|
498
|
+
- e95e38d: fix: Make `generateText` and `streamText` result `usage` report total usage across all steps and deprecate `totalUsage`.
|
|
499
|
+
- 016e877: feat(ai): add `instructions` as the primary prompt option and deprecate `system`
|
|
500
|
+
- ca99fea: feat: expose `finalStep` on text generation results
|
|
501
|
+
- d775a57: feat: introduce Instructions type
|
|
502
|
+
- 538c12b: feat: use instructions on ToolCallRepairFunction, parseToolCall, and events
|
|
503
|
+
- Updated dependencies [ca39020]
|
|
504
|
+
- @ai-sdk/provider-utils@5.0.0-canary.36
|
|
505
|
+
- @ai-sdk/gateway@4.0.0-canary.74
|
|
506
|
+
|
|
507
|
+
## 7.0.0-canary.126
|
|
508
|
+
|
|
509
|
+
### Patch Changes
|
|
510
|
+
|
|
511
|
+
- Updated dependencies [f634bac]
|
|
512
|
+
- @ai-sdk/provider-utils@5.0.0-canary.35
|
|
513
|
+
- @ai-sdk/gateway@4.0.0-canary.73
|
|
514
|
+
|
|
515
|
+
## 7.0.0-canary.125
|
|
516
|
+
|
|
517
|
+
### Major Changes
|
|
518
|
+
|
|
519
|
+
- 31f69de: fix(ai): carry prepareStep message overrides forward across steps
|
|
520
|
+
- 7c71ac6: fix(ai): limit response messages in StepResult to messages created in that step
|
|
521
|
+
|
|
522
|
+
### Patch Changes
|
|
523
|
+
|
|
524
|
+
- fd4f578: fix(ai): exclude request and response bodies from text generation results by default to reduce memory usage.
|
|
525
|
+
- c0c8ca2: fix(ai): remove deprecated LanguageModelUsage properties
|
|
526
|
+
- 5faf71c: feat: introduce responseMessages on GenerateTextResult and StreamTextResult
|
|
527
|
+
- 69254e0: feat(ai): add toolMetadata for tool specific metdata
|
|
528
|
+
- 3015fc3: feat: sandbox shell execution abstraction
|
|
529
|
+
- eee1166: feat(ai): expose initial and response messages in prepareStep
|
|
530
|
+
- 7dbf992: feat(ai): allow prepareStep to override sandbox per step
|
|
531
|
+
- Updated dependencies [69254e0]
|
|
532
|
+
- Updated dependencies [3015fc3]
|
|
533
|
+
- @ai-sdk/provider-utils@5.0.0-canary.34
|
|
534
|
+
- @ai-sdk/gateway@4.0.0-canary.72
|
|
535
|
+
|
|
536
|
+
## 7.0.0-canary.124
|
|
537
|
+
|
|
538
|
+
### Patch Changes
|
|
539
|
+
|
|
540
|
+
- 69aeb0e: feat: add deprecated tool call lifecycle callback aliases for AI SDK 6 compatibility.
|
|
541
|
+
- 48e92f3: feat: make include stable
|
|
542
|
+
|
|
543
|
+
## 7.0.0-canary.123
|
|
544
|
+
|
|
545
|
+
### Patch Changes
|
|
546
|
+
|
|
547
|
+
- 7392266: feat: move includeRawChunks to include.rawChunks
|
|
548
|
+
- 4bb4dbc: feat: introduce include.requestMessage option for step request message storage opt-in
|
|
549
|
+
|
|
550
|
+
## 7.0.0-canary.122
|
|
551
|
+
|
|
552
|
+
### Patch Changes
|
|
553
|
+
|
|
554
|
+
- 79b2468: feat: add request.messages to StepResult
|
|
555
|
+
- c22750c: fix(ai): move onToolExecutionStart and onToolExecutionEnd to stable
|
|
556
|
+
|
|
557
|
+
## 7.0.0-canary.121
|
|
558
|
+
|
|
559
|
+
### Patch Changes
|
|
560
|
+
|
|
561
|
+
- 2427d88: feat(ai): change Tool.sensitiveContext to telemetry.includeToolsContext and make it opt-in
|
|
562
|
+
- 5588abd: feat(ai): add experimental_refineToolInput option to ToolLoopAgent, generateText, streamText
|
|
563
|
+
- 6dd6b83: feat(ai): change sensitiveRuntimeContext to telemetry.includeRuntimeContext and make it opt-in
|
|
564
|
+
- Updated dependencies [2427d88]
|
|
565
|
+
- @ai-sdk/provider-utils@5.0.0-canary.33
|
|
566
|
+
- @ai-sdk/gateway@4.0.0-canary.71
|
|
567
|
+
|
|
568
|
+
## 7.0.0-canary.120
|
|
569
|
+
|
|
570
|
+
### Major Changes
|
|
571
|
+
|
|
572
|
+
- 5463d0d: feat(provider): align tool result output content file part types with top-level message file part types
|
|
573
|
+
|
|
574
|
+
### Patch Changes
|
|
575
|
+
|
|
576
|
+
- Updated dependencies [5463d0d]
|
|
577
|
+
- @ai-sdk/provider-utils@5.0.0-canary.32
|
|
578
|
+
- @ai-sdk/provider@4.0.0-canary.16
|
|
579
|
+
- @ai-sdk/gateway@4.0.0-canary.70
|
|
580
|
+
|
|
581
|
+
## 7.0.0-canary.119
|
|
582
|
+
|
|
583
|
+
### Patch Changes
|
|
584
|
+
|
|
585
|
+
- Updated dependencies [8e53eb7]
|
|
586
|
+
- @ai-sdk/gateway@4.0.0-canary.69
|
|
587
|
+
|
|
588
|
+
## 7.0.0-canary.118
|
|
589
|
+
|
|
590
|
+
### Patch Changes
|
|
591
|
+
|
|
592
|
+
- 47e65d6: fix(ai): tag step/chunk timeout aborts with `TimeoutError` reason
|
|
593
|
+
|
|
594
|
+
When `timeout: { stepMs }` or `timeout: { chunkMs }` fires, the abort reason is now a `TimeoutError` `DOMException`, matching what `AbortSignal.timeout()` produces natively. Consumers can distinguish a framework timeout from a user-initiated cancel via `signal.reason.name === 'TimeoutError'`.
|
|
595
|
+
|
|
596
|
+
## 7.0.0-canary.117
|
|
597
|
+
|
|
598
|
+
### Patch Changes
|
|
599
|
+
|
|
600
|
+
- 0c4c275: trigger initial canary release
|
|
601
|
+
- Updated dependencies [0c4c275]
|
|
602
|
+
- @ai-sdk/provider-utils@5.0.0-canary.31
|
|
603
|
+
- @ai-sdk/provider@4.0.0-canary.15
|
|
604
|
+
- @ai-sdk/gateway@4.0.0-canary.68
|
|
605
|
+
|
|
606
|
+
## 7.0.0-beta.116
|
|
607
|
+
|
|
608
|
+
### Patch Changes
|
|
609
|
+
|
|
610
|
+
- Updated dependencies [e7e8f42]
|
|
611
|
+
- @ai-sdk/gateway@4.0.0-beta.67
|
|
612
|
+
|
|
613
|
+
## 7.0.0-beta.115
|
|
614
|
+
|
|
615
|
+
### Patch Changes
|
|
616
|
+
|
|
617
|
+
- 08d2129: feat(mcp): propagate the server name through dynamic tool parts
|
|
618
|
+
- 202f107: feat(ai): create a diagnostics channel to push event data
|
|
619
|
+
- Updated dependencies [08d2129]
|
|
620
|
+
- Updated dependencies [04e9009]
|
|
621
|
+
- Updated dependencies [be09425]
|
|
622
|
+
- @ai-sdk/provider-utils@5.0.0-beta.30
|
|
623
|
+
- @ai-sdk/gateway@4.0.0-beta.66
|
|
624
|
+
|
|
625
|
+
## 7.0.0-beta.114
|
|
626
|
+
|
|
627
|
+
### Major Changes
|
|
628
|
+
|
|
629
|
+
- 1f7db50: fix(ai): remove experimental_customProvider
|
|
630
|
+
- 9bd6512: feat(provider): change file part data property to be tagged with a type and remove the image part type
|
|
631
|
+
|
|
632
|
+
### Patch Changes
|
|
633
|
+
|
|
634
|
+
- 43a6750: fix(ai): preserve `allowSystemInMessages` across `streamText` retries
|
|
635
|
+
- 81caa5d: fix(ai): remove ExtractLiteralUnion export
|
|
636
|
+
- 258c093: chore: ensure consistent import handling and avoid import duplicates or cycles
|
|
637
|
+
- 6147cdf: fix(ai): fix auto-complete on provider registry and custom provider
|
|
638
|
+
- Updated dependencies [9bd6512]
|
|
639
|
+
- Updated dependencies [258c093]
|
|
640
|
+
- Updated dependencies [b6783da]
|
|
641
|
+
- @ai-sdk/provider-utils@5.0.0-beta.29
|
|
642
|
+
- @ai-sdk/provider@4.0.0-beta.14
|
|
643
|
+
- @ai-sdk/gateway@4.0.0-beta.65
|
|
644
|
+
|
|
645
|
+
## 7.0.0-beta.113
|
|
646
|
+
|
|
647
|
+
### Patch Changes
|
|
648
|
+
|
|
649
|
+
- 9f0e36c: trigger release for all packages after provenance setup
|
|
650
|
+
- Updated dependencies [9f0e36c]
|
|
651
|
+
- @ai-sdk/gateway@4.0.0-beta.64
|
|
652
|
+
- @ai-sdk/provider@4.0.0-beta.13
|
|
653
|
+
- @ai-sdk/provider-utils@5.0.0-beta.28
|
|
654
|
+
|
|
655
|
+
## 7.0.0-beta.112
|
|
656
|
+
|
|
657
|
+
### Major Changes
|
|
658
|
+
|
|
659
|
+
- cf93359: feat(ai): remove/refactor event data sent via callbacks
|
|
660
|
+
- 116c89f: feat(ai): remove telemetry data from the user-facing event data
|
|
661
|
+
- 4e095b0: fix(ai): reject system messages in messages or prompt by default (opt-in)
|
|
662
|
+
|
|
663
|
+
### Patch Changes
|
|
664
|
+
|
|
665
|
+
- 5f3749c: refactoring: rename toolNeedsApproval to toolApproval
|
|
666
|
+
- 0a51f7d: fix(ai): enforce `callOptionsSchema` at runtime in `ToolLoopAgent`
|
|
667
|
+
|
|
668
|
+
`ToolLoopAgentSettings.callOptionsSchema` was declared and documented as a runtime schema for `options`, but `tool-loop-agent.ts` never invoked it. Any invariant a developer encoded in the schema was silently bypassed at runtime, and unchecked `options` flowed straight into `prepareCall` and any `instructions` template that interpolated them.
|
|
669
|
+
|
|
670
|
+
`ToolLoopAgent.prepareCall` now validates caller-supplied `options` against `callOptionsSchema` (when set) via `safeValidateTypes`, throwing `InvalidArgumentError` on failure before forwarding to `prepareCall` / `generateText` / `streamText`.
|
|
671
|
+
|
|
672
|
+
- 71d3022: fix(ai): unify generate text event callbacks
|
|
673
|
+
- 67df0a0: feat: add sensitiveContext property to Tool
|
|
674
|
+
- 4181cfe: fix(ai): harden `getMediaTypeFromUrl` against prototype-property collisions
|
|
675
|
+
|
|
676
|
+
`getMediaTypeFromUrl` (used to infer media types for `file-url` / `image-url` parts) used `ext in URL_EXTENSION_TO_MEDIA_TYPE` against a plain object literal. A URL ending in `.constructor` therefore resolved through the prototype chain and returned the `Object` constructor function, violating the helper's `: string` return type and forwarding a non-string value to provider adapters.
|
|
677
|
+
|
|
678
|
+
Switch to `Object.hasOwn(...)` so attacker-controlled extensions like `.constructor` cannot resolve to inherited `Object.prototype` keys.
|
|
679
|
+
|
|
680
|
+
- 51ce232: feat(ai): add sensitiveRuntimeContext option
|
|
681
|
+
- befb78c: refactoring: remove real-time delays in unit tests
|
|
682
|
+
- 29d8cf4: feat(ai): rename the core-event types
|
|
683
|
+
- 58a2ad7: fix: more precise default message for tool execution denial
|
|
684
|
+
- 37d69b2: feat(ai): access runtime context in tool approval functions
|
|
685
|
+
- 1043274: feat(ai): add a ModelCall start/end event
|
|
686
|
+
- 7f59f04: feat(ai): add approval reason to automatic tool approvals
|
|
687
|
+
- 7677c1e: feat(ai): allow tool approval functions to return undefined
|
|
688
|
+
- f58f9bc: fix(ai): remove stopWhen from onStart event
|
|
689
|
+
- e1bfb9c: feat(ai): remove unnecessary data from events
|
|
690
|
+
- e87d71b: feat(ai): support automatic tool approval in ui messages
|
|
691
|
+
- 9d486aa: feat(ai): generic tool approval function
|
|
692
|
+
- 9b0bc8a: fix(mcp): prevent prototype pollution by using secureJsonParse
|
|
693
|
+
- fc92055: feat(ai): automatic tool approval
|
|
694
|
+
- Updated dependencies [785fe16]
|
|
695
|
+
- Updated dependencies [67df0a0]
|
|
696
|
+
- Updated dependencies [befb78c]
|
|
697
|
+
- Updated dependencies [0458559]
|
|
698
|
+
- Updated dependencies [5852c0a]
|
|
699
|
+
- Updated dependencies [baa5f20]
|
|
700
|
+
- Updated dependencies [fc92055]
|
|
701
|
+
- Updated dependencies [f9acbc0]
|
|
702
|
+
- @ai-sdk/provider-utils@5.0.0-beta.27
|
|
703
|
+
- @ai-sdk/gateway@4.0.0-beta.63
|
|
704
|
+
|
|
705
|
+
## 7.0.0-beta.111
|
|
706
|
+
|
|
707
|
+
### Major Changes
|
|
708
|
+
|
|
709
|
+
- 1949571: feat(ai): make experimental_telemetry stable
|
|
710
|
+
- 6542d93: feat(ai): change naming nomenclature for `*TelemetryIntegration` to `*Telemetry`
|
|
711
|
+
|
|
712
|
+
### Patch Changes
|
|
713
|
+
|
|
714
|
+
- f319fde: feat(ai): validate tool context against contextSchema at runtime
|
|
715
|
+
|
|
716
|
+
Tool execution and approval callbacks now validate each tool's `toolsContext` entry against its `contextSchema`. Invalid tool context now throws `TypeValidationError` with tool-context validation metadata in `error.context`.
|
|
717
|
+
|
|
718
|
+
- 511902c: skip validation for tool parts in terminal states when tool schema is no longer registered
|
|
719
|
+
- 2e98477: fix: retain stack traces on async errors
|
|
720
|
+
- 876fd3e: fix(ai): limit tool execution time duration to actual tool execution
|
|
721
|
+
- f32c750: refactoring(ai): simplify mergeAbortSignals
|
|
722
|
+
- Updated dependencies [2e98477]
|
|
723
|
+
- @ai-sdk/provider-utils@5.0.0-beta.26
|
|
724
|
+
- @ai-sdk/gateway@4.0.0-beta.62
|
|
725
|
+
|
|
726
|
+
## 7.0.0-beta.110
|
|
727
|
+
|
|
728
|
+
### Patch Changes
|
|
729
|
+
|
|
730
|
+
- 72cb801: feat(ai): concurrent event notification
|
|
731
|
+
|
|
732
|
+
## 7.0.0-beta.109
|
|
733
|
+
|
|
734
|
+
### Patch Changes
|
|
735
|
+
|
|
736
|
+
- ec98264: feat(ai): allow multiple integrations to be registered at once
|
|
737
|
+
- eea8d98: refactoring: rename tool execution events
|
|
738
|
+
- 75ef93e: remove the deprecated `experimental_output` alias and document the `output` migration for AI SDK 7
|
|
739
|
+
- Updated dependencies [eea8d98]
|
|
740
|
+
- @ai-sdk/provider-utils@5.0.0-beta.25
|
|
741
|
+
- @ai-sdk/gateway@4.0.0-beta.61
|
|
742
|
+
|
|
743
|
+
## 7.0.0-beta.108
|
|
744
|
+
|
|
745
|
+
### Patch Changes
|
|
746
|
+
|
|
747
|
+
- Updated dependencies [f807e45]
|
|
748
|
+
- @ai-sdk/provider-utils@5.0.0-beta.24
|
|
749
|
+
- @ai-sdk/gateway@4.0.0-beta.60
|
|
750
|
+
|
|
751
|
+
## 7.0.0-beta.107
|
|
752
|
+
|
|
753
|
+
### Patch Changes
|
|
754
|
+
|
|
755
|
+
- 350ea38: refactoring: introduce Arrayable type
|
|
756
|
+
- Updated dependencies [350ea38]
|
|
757
|
+
- @ai-sdk/provider-utils@5.0.0-beta.23
|
|
758
|
+
- @ai-sdk/gateway@4.0.0-beta.59
|
|
759
|
+
|
|
760
|
+
## 7.0.0-beta.106
|
|
761
|
+
|
|
762
|
+
### Patch Changes
|
|
763
|
+
|
|
764
|
+
- Updated dependencies [03dc15c]
|
|
765
|
+
- @ai-sdk/gateway@4.0.0-beta.58
|
|
766
|
+
|
|
767
|
+
## 7.0.0-beta.105
|
|
768
|
+
|
|
769
|
+
### Patch Changes
|
|
770
|
+
|
|
771
|
+
- 33d099c: fix(ai): omit reasoning-start/end when sendReasoning is false
|
|
772
|
+
|
|
773
|
+
## 7.0.0-beta.104
|
|
774
|
+
|
|
775
|
+
### Patch Changes
|
|
776
|
+
|
|
777
|
+
- 2a74d43: Remove the deprecated `experimental_prepareStep` option from `generateText`.
|
|
778
|
+
|
|
779
|
+
Use `prepareStep` instead.
|
|
780
|
+
|
|
781
|
+
## 7.0.0-beta.103
|
|
782
|
+
|
|
783
|
+
### Patch Changes
|
|
784
|
+
|
|
785
|
+
- 382d53b: refactoring: rename context to runtimeContext
|
|
786
|
+
- 7bf7d7f: feat(ai): enable:true for telemetry by default
|
|
787
|
+
- c3d4019: chore(ai): rename 'TelemetrySettings' to 'TelemetryOptions'
|
|
788
|
+
- 083947b: feat(ai): separate toolsContext from context
|
|
789
|
+
- Updated dependencies [083947b]
|
|
790
|
+
- @ai-sdk/provider-utils@5.0.0-beta.22
|
|
791
|
+
- @ai-sdk/gateway@4.0.0-beta.57
|
|
792
|
+
|
|
793
|
+
## 7.0.0-beta.102
|
|
794
|
+
|
|
795
|
+
### Patch Changes
|
|
796
|
+
|
|
797
|
+
- Updated dependencies [0d8f107]
|
|
798
|
+
- @ai-sdk/gateway@4.0.0-beta.56
|
|
799
|
+
|
|
800
|
+
## 7.0.0-beta.101
|
|
801
|
+
|
|
802
|
+
### Patch Changes
|
|
803
|
+
|
|
804
|
+
- 4873966: chore(ai): allow general usage of `logWarnings` and emit them via Node API when available
|
|
805
|
+
|
|
806
|
+
## 7.0.0-beta.100
|
|
807
|
+
|
|
808
|
+
### Patch Changes
|
|
809
|
+
|
|
810
|
+
- add1126: refactoring: executeTool uses tool as parameter
|
|
811
|
+
- Updated dependencies [add1126]
|
|
812
|
+
- @ai-sdk/provider-utils@5.0.0-beta.21
|
|
813
|
+
- @ai-sdk/gateway@4.0.0-beta.55
|
|
814
|
+
|
|
815
|
+
## 7.0.0-beta.99
|
|
816
|
+
|
|
817
|
+
### Patch Changes
|
|
818
|
+
|
|
819
|
+
- 2a9c144: feat(ai): add toolNeedsApproval option
|
|
820
|
+
|
|
821
|
+
## 7.0.0-beta.98
|
|
822
|
+
|
|
823
|
+
### Patch Changes
|
|
824
|
+
|
|
825
|
+
- Updated dependencies [5df9b6f]
|
|
826
|
+
- @ai-sdk/gateway@4.0.0-beta.54
|
|
827
|
+
|
|
828
|
+
## 7.0.0-beta.97
|
|
829
|
+
|
|
830
|
+
### Patch Changes
|
|
831
|
+
|
|
832
|
+
- 208d045: fix(ai): skip global telemetry registration when local integration defined
|
|
833
|
+
|
|
834
|
+
## 7.0.0-beta.96
|
|
835
|
+
|
|
836
|
+
### Patch Changes
|
|
837
|
+
|
|
838
|
+
- Updated dependencies [0457e45]
|
|
839
|
+
- @ai-sdk/gateway@4.0.0-beta.53
|
|
840
|
+
|
|
841
|
+
## 7.0.0-beta.95
|
|
842
|
+
|
|
843
|
+
### Patch Changes
|
|
844
|
+
|
|
845
|
+
- c4f4b5f: refactoring(ai): remove deprecated experimental_activeTools option
|
|
846
|
+
|
|
847
|
+
## 7.0.0-beta.94
|
|
848
|
+
|
|
849
|
+
### Patch Changes
|
|
850
|
+
|
|
851
|
+
- 1582efa: chore(ai): remove the metadata field from the telemetry settings
|
|
852
|
+
|
|
853
|
+
## 7.0.0-beta.93
|
|
854
|
+
|
|
855
|
+
### Patch Changes
|
|
856
|
+
|
|
857
|
+
- bc47739: chore(ai): cleanup telemetry event data
|
|
858
|
+
|
|
859
|
+
## 7.0.0-beta.92
|
|
860
|
+
|
|
861
|
+
### Patch Changes
|
|
862
|
+
|
|
863
|
+
- Updated dependencies [ba2e254]
|
|
864
|
+
- @ai-sdk/gateway@4.0.0-beta.52
|
|
865
|
+
|
|
866
|
+
## 7.0.0-beta.91
|
|
867
|
+
|
|
868
|
+
### Patch Changes
|
|
869
|
+
|
|
870
|
+
- Updated dependencies [cdcdec2]
|
|
871
|
+
- @ai-sdk/gateway@4.0.0-beta.51
|
|
872
|
+
|
|
873
|
+
## 7.0.0-beta.90
|
|
874
|
+
|
|
875
|
+
### Patch Changes
|
|
876
|
+
|
|
877
|
+
- 1db29c8: feat(ai): break `CallSettings` apart into `LanguageModelCallOptions` and `RequestOptions`
|
|
878
|
+
|
|
879
|
+
## 7.0.0-beta.89
|
|
880
|
+
|
|
881
|
+
### Patch Changes
|
|
882
|
+
|
|
883
|
+
- ff5eba1: feat: roll `image-*` tool output types into their equivalent `file-*` types
|
|
884
|
+
- Updated dependencies [b3976a2]
|
|
885
|
+
- Updated dependencies [ff5eba1]
|
|
886
|
+
- @ai-sdk/provider-utils@5.0.0-beta.20
|
|
887
|
+
- @ai-sdk/gateway@4.0.0-beta.50
|
|
888
|
+
- @ai-sdk/provider@4.0.0-beta.12
|
|
889
|
+
|
|
890
|
+
## 7.0.0-beta.88
|
|
891
|
+
|
|
892
|
+
### Major Changes
|
|
893
|
+
|
|
894
|
+
- ef992f8: Remove CommonJS exports from all packages. All packages are now ESM-only (`"type": "module"`). Consumers using `require()` must switch to ESM `import` syntax.
|
|
895
|
+
|
|
896
|
+
### Patch Changes
|
|
897
|
+
|
|
898
|
+
- Updated dependencies [ef992f8]
|
|
899
|
+
- @ai-sdk/gateway@4.0.0-beta.49
|
|
900
|
+
- @ai-sdk/provider@4.0.0-beta.11
|
|
901
|
+
- @ai-sdk/provider-utils@5.0.0-beta.19
|
|
902
|
+
|
|
903
|
+
## 7.0.0-beta.87
|
|
904
|
+
|
|
905
|
+
### Patch Changes
|
|
906
|
+
|
|
907
|
+
- Updated dependencies [bdbd322]
|
|
908
|
+
- Updated dependencies [8f53ccf]
|
|
909
|
+
- @ai-sdk/gateway@4.0.0-beta.48
|
|
910
|
+
|
|
911
|
+
## 7.0.0-beta.86
|
|
912
|
+
|
|
913
|
+
### Patch Changes
|
|
914
|
+
|
|
915
|
+
- 5a6f514: feat(ai): support several tools in hasToolCall stop condition
|
|
916
|
+
|
|
917
|
+
## 7.0.0-beta.85
|
|
918
|
+
|
|
919
|
+
### Major Changes
|
|
920
|
+
|
|
921
|
+
- 57bf606: chore(ai): simplify unified telemetry creation
|
|
922
|
+
|
|
923
|
+
## 7.0.0-beta.84
|
|
924
|
+
|
|
925
|
+
### Patch Changes
|
|
926
|
+
|
|
927
|
+
- 90e2d8a: chore: fix unused vars not being flagged by our lint tooling
|
|
928
|
+
- Updated dependencies [90e2d8a]
|
|
929
|
+
- @ai-sdk/provider-utils@5.0.0-beta.18
|
|
930
|
+
- @ai-sdk/gateway@4.0.0-beta.47
|
|
931
|
+
|
|
932
|
+
## 7.0.0-beta.83
|
|
933
|
+
|
|
934
|
+
### Patch Changes
|
|
935
|
+
|
|
936
|
+
- Updated dependencies [6b0a40d]
|
|
937
|
+
- @ai-sdk/gateway@4.0.0-beta.46
|
|
938
|
+
|
|
939
|
+
## 7.0.0-beta.82
|
|
940
|
+
|
|
941
|
+
### Patch Changes
|
|
942
|
+
|
|
943
|
+
- e27ed76: feat(devtools): add new devtools integration for telemetry
|
|
944
|
+
|
|
945
|
+
## 7.0.0-beta.81
|
|
946
|
+
|
|
947
|
+
### Patch Changes
|
|
948
|
+
|
|
949
|
+
- 2fe1099: feat(ai): emit streaming chunks throught the onChunk callback
|
|
950
|
+
- f04adcb: feat(ai): refresh `customProvider` and `createProviderRegistry` to support file and skill upload abstractions
|
|
951
|
+
|
|
952
|
+
## 7.0.0-beta.80
|
|
953
|
+
|
|
954
|
+
### Patch Changes
|
|
955
|
+
|
|
956
|
+
- 3ae1786: fix: better context type inference
|
|
957
|
+
- Updated dependencies [3ae1786]
|
|
958
|
+
- @ai-sdk/provider-utils@5.0.0-beta.17
|
|
959
|
+
- @ai-sdk/gateway@4.0.0-beta.45
|
|
960
|
+
|
|
961
|
+
## 7.0.0-beta.79
|
|
962
|
+
|
|
963
|
+
### Patch Changes
|
|
964
|
+
|
|
965
|
+
- 6866afe: fix(ai): fix `lastAssistantMessageIsCompleteWithApprovalResponses` to no longer ignore `providerExecuted` tool approvals
|
|
966
|
+
|
|
967
|
+
## 7.0.0-beta.78
|
|
968
|
+
|
|
969
|
+
### Patch Changes
|
|
970
|
+
|
|
971
|
+
- f372547: fix(ai): fix `providerExecuted` tool approvals being passed to language model twice
|
|
972
|
+
- Updated dependencies [7943a4b]
|
|
973
|
+
- @ai-sdk/gateway@4.0.0-beta.44
|
|
974
|
+
|
|
975
|
+
## 7.0.0-beta.77
|
|
976
|
+
|
|
977
|
+
### Patch Changes
|
|
978
|
+
|
|
979
|
+
- 2add429: fix(ai): skip passing invalid JSON inputs to response messages
|
|
980
|
+
|
|
981
|
+
## 7.0.0-beta.76
|
|
982
|
+
|
|
983
|
+
### Major Changes
|
|
984
|
+
|
|
985
|
+
- fcc6869: refactor(ai/core): rename `ModelCallStreamPart` to `LanguageModelStreamPart` and align stream model call naming (`streamLanguageModelCall`, `experimental_streamLanguageModelCall`).
|
|
986
|
+
|
|
987
|
+
This updates experimental low-level stream primitives to use "language model call" terminology consistently.
|
|
988
|
+
|
|
989
|
+
## 7.0.0-beta.75
|
|
990
|
+
|
|
991
|
+
### Patch Changes
|
|
992
|
+
|
|
993
|
+
- 176466a: chore(provider): align V4 model return types to have their own definitions across all model interfaces
|
|
994
|
+
- Updated dependencies [176466a]
|
|
995
|
+
- @ai-sdk/provider@4.0.0-beta.10
|
|
996
|
+
- @ai-sdk/gateway@4.0.0-beta.43
|
|
997
|
+
- @ai-sdk/provider-utils@5.0.0-beta.16
|
|
998
|
+
|
|
999
|
+
## 7.0.0-beta.74
|
|
1000
|
+
|
|
1001
|
+
### Patch Changes
|
|
1002
|
+
|
|
1003
|
+
- e311194: feat(ai): allow passing provider instance to `uploadFile` and `uploadSkill` as shorthand
|
|
1004
|
+
- Updated dependencies [e311194]
|
|
1005
|
+
- @ai-sdk/provider@4.0.0-beta.9
|
|
1006
|
+
- @ai-sdk/gateway@4.0.0-beta.42
|
|
1007
|
+
- @ai-sdk/provider-utils@5.0.0-beta.15
|
|
1008
|
+
|
|
1009
|
+
## 7.0.0-beta.73
|
|
1010
|
+
|
|
1011
|
+
### Patch Changes
|
|
1012
|
+
|
|
1013
|
+
- Updated dependencies [1464561]
|
|
1014
|
+
- @ai-sdk/gateway@4.0.0-beta.41
|
|
1015
|
+
|
|
1016
|
+
## 7.0.0-beta.72
|
|
1017
|
+
|
|
1018
|
+
### Patch Changes
|
|
1019
|
+
|
|
1020
|
+
- 664a0eb: feat (ai/core): support plain string model IDs in `rerank()` function
|
|
1021
|
+
|
|
1022
|
+
The `rerank()` function now accepts plain model strings (e.g., `'cohere/rerank-v3.5'`) in addition to `RerankingModel` objects, matching the behavior of `generateText`, `embed`, and other core functions.
|
|
1023
|
+
|
|
1024
|
+
## 7.0.0-beta.71
|
|
1025
|
+
|
|
1026
|
+
### Patch Changes
|
|
1027
|
+
|
|
1028
|
+
- e68be55: fix(ai): skip stringifying text when streaming partial text
|
|
1029
|
+
- Updated dependencies [939171f]
|
|
1030
|
+
- @ai-sdk/gateway@4.0.0-beta.40
|
|
1031
|
+
|
|
1032
|
+
## 7.0.0-beta.70
|
|
1033
|
+
|
|
1034
|
+
### Patch Changes
|
|
1035
|
+
|
|
1036
|
+
- Updated dependencies [0694029]
|
|
1037
|
+
- @ai-sdk/gateway@4.0.0-beta.39
|
|
1038
|
+
|
|
1039
|
+
## 7.0.0-beta.69
|
|
1040
|
+
|
|
1041
|
+
### Major Changes
|
|
1042
|
+
|
|
1043
|
+
- 72223e7: chore(ai): remove deprecated isToolOrDynamicToolUIPart function
|
|
1044
|
+
|
|
1045
|
+
### Patch Changes
|
|
1046
|
+
|
|
1047
|
+
- 34bd95d: feat(ai): add support for uploading provider skills using the provider references abstraction
|
|
1048
|
+
- 008271d: feat(openai-compatible): emit warning when using kebab-case instead of camelCase
|
|
1049
|
+
- Updated dependencies [34bd95d]
|
|
1050
|
+
- Updated dependencies [008271d]
|
|
1051
|
+
- @ai-sdk/provider@4.0.0-beta.8
|
|
1052
|
+
- @ai-sdk/gateway@4.0.0-beta.38
|
|
1053
|
+
- @ai-sdk/provider-utils@5.0.0-beta.14
|
|
1054
|
+
|
|
1055
|
+
## 7.0.0-beta.68
|
|
1056
|
+
|
|
1057
|
+
### Major Changes
|
|
1058
|
+
|
|
1059
|
+
- 7e26e81: chore: rename experimental_context to context
|
|
1060
|
+
|
|
1061
|
+
### Patch Changes
|
|
1062
|
+
|
|
1063
|
+
- b0c2869: chore(ai): remove deprecated `media` type part from `ToolResultOutput`
|
|
1064
|
+
- Updated dependencies [b0c2869]
|
|
1065
|
+
- Updated dependencies [7e26e81]
|
|
1066
|
+
- @ai-sdk/provider-utils@5.0.0-beta.13
|
|
1067
|
+
- @ai-sdk/gateway@4.0.0-beta.37
|
|
1068
|
+
|
|
1069
|
+
## 7.0.0-beta.67
|
|
1070
|
+
|
|
1071
|
+
### Patch Changes
|
|
1072
|
+
|
|
1073
|
+
- d1a8bed: fix(ui): export `isDynamicToolUIPart` from `ai` package
|
|
1074
|
+
|
|
1075
|
+
## 7.0.0-beta.66
|
|
1076
|
+
|
|
1077
|
+
### Patch Changes
|
|
1078
|
+
|
|
1079
|
+
- Updated dependencies [fb0c233]
|
|
1080
|
+
- Updated dependencies [d1f0d2b]
|
|
1081
|
+
- @ai-sdk/gateway@4.0.0-beta.36
|
|
1082
|
+
|
|
1083
|
+
## 7.0.0-beta.65
|
|
1084
|
+
|
|
1085
|
+
### Patch Changes
|
|
1086
|
+
|
|
1087
|
+
- Updated dependencies [46d1149]
|
|
1088
|
+
- @ai-sdk/provider-utils@5.0.0-beta.12
|
|
1089
|
+
- @ai-sdk/gateway@4.0.0-beta.35
|
|
1090
|
+
|
|
1091
|
+
## 7.0.0-beta.64
|
|
1092
|
+
|
|
1093
|
+
### Patch Changes
|
|
1094
|
+
|
|
1095
|
+
- Updated dependencies [71b0e7d]
|
|
1096
|
+
- @ai-sdk/gateway@4.0.0-beta.34
|
|
1097
|
+
|
|
1098
|
+
## 7.0.0-beta.63
|
|
1099
|
+
|
|
1100
|
+
### Patch Changes
|
|
1101
|
+
|
|
1102
|
+
- 6fd51c0: fix(provider): preserve error type prefix in getErrorMessage
|
|
1103
|
+
- Updated dependencies [6fd51c0]
|
|
1104
|
+
- @ai-sdk/provider-utils@5.0.0-beta.11
|
|
1105
|
+
- @ai-sdk/provider@4.0.0-beta.7
|
|
1106
|
+
- @ai-sdk/gateway@4.0.0-beta.33
|
|
1107
|
+
|
|
1108
|
+
## 7.0.0-beta.62
|
|
1109
|
+
|
|
1110
|
+
### Patch Changes
|
|
1111
|
+
|
|
1112
|
+
- Updated dependencies [11746ca]
|
|
1113
|
+
- @ai-sdk/gateway@4.0.0-beta.32
|
|
1114
|
+
|
|
1115
|
+
## 7.0.0-beta.61
|
|
1116
|
+
|
|
1117
|
+
### Patch Changes
|
|
1118
|
+
|
|
1119
|
+
- c29a26f: feat(provider): add support for provider references and uploading files as supported per provider
|
|
1120
|
+
- Updated dependencies [c29a26f]
|
|
1121
|
+
- @ai-sdk/provider-utils@5.0.0-beta.10
|
|
1122
|
+
- @ai-sdk/provider@4.0.0-beta.6
|
|
1123
|
+
- @ai-sdk/gateway@4.0.0-beta.31
|
|
1124
|
+
|
|
1125
|
+
## 7.0.0-beta.60
|
|
1126
|
+
|
|
1127
|
+
### Patch Changes
|
|
1128
|
+
|
|
1129
|
+
- 38fc777: Add AI Gateway hint to provider READMEs
|
|
1130
|
+
|
|
1131
|
+
## 7.0.0-beta.59
|
|
1132
|
+
|
|
1133
|
+
### Patch Changes
|
|
1134
|
+
|
|
1135
|
+
- Updated dependencies [4552cbf]
|
|
1136
|
+
- @ai-sdk/gateway@4.0.0-beta.30
|
|
1137
|
+
|
|
1138
|
+
## 7.0.0-beta.58
|
|
1139
|
+
|
|
1140
|
+
### Patch Changes
|
|
1141
|
+
|
|
1142
|
+
- 2e17091: fix(types): move shared tool set utility types into provider-utils
|
|
1143
|
+
|
|
1144
|
+
Moved `ToolSet`, `InferToolSetContext`, and `UnionToIntersection` into `@ai-sdk/provider-utils` and updated `ai` internals to import them directly from there. This keeps the shared tool typing utilities colocated with the core tool type definitions.
|
|
1145
|
+
|
|
1146
|
+
- Updated dependencies [2e17091]
|
|
1147
|
+
- @ai-sdk/provider-utils@5.0.0-beta.9
|
|
1148
|
+
- @ai-sdk/gateway@4.0.0-beta.29
|
|
1149
|
+
|
|
1150
|
+
## 7.0.0-beta.57
|
|
1151
|
+
|
|
1152
|
+
### Major Changes
|
|
1153
|
+
|
|
1154
|
+
- 986c6fd: feat(ai): change type of experimental_context from unknown to generic
|
|
1155
|
+
- 493295c: Remove the deprecated `ToolCallOptions` export.
|
|
1156
|
+
|
|
1157
|
+
Use `ToolExecutionOptions` instead.
|
|
1158
|
+
|
|
1159
|
+
### Patch Changes
|
|
1160
|
+
|
|
1161
|
+
- Updated dependencies [986c6fd]
|
|
1162
|
+
- Updated dependencies [493295c]
|
|
1163
|
+
- @ai-sdk/provider-utils@5.0.0-beta.8
|
|
1164
|
+
- @ai-sdk/gateway@4.0.0-beta.28
|
|
1165
|
+
|
|
1166
|
+
## 7.0.0-beta.56
|
|
1167
|
+
|
|
1168
|
+
### Patch Changes
|
|
1169
|
+
|
|
1170
|
+
- Updated dependencies [70a9aae]
|
|
1171
|
+
- @ai-sdk/gateway@4.0.0-beta.27
|
|
1172
|
+
|
|
1173
|
+
## 7.0.0-beta.55
|
|
1174
|
+
|
|
1175
|
+
### Major Changes
|
|
1176
|
+
|
|
1177
|
+
- b3c9f6a: feat(ai): create new opentelemetry package (@ai-sdk/otel)
|
|
1178
|
+
|
|
1179
|
+
## 7.0.0-beta.54
|
|
1180
|
+
|
|
1181
|
+
### Patch Changes
|
|
1182
|
+
|
|
1183
|
+
- 5d0f18e: feat(ai): move opentelemetry to new package
|
|
1184
|
+
|
|
1185
|
+
## 7.0.0-beta.53
|
|
1186
|
+
|
|
1187
|
+
### Patch Changes
|
|
1188
|
+
|
|
1189
|
+
- 9b47dea: fix(ai): remove otel Tracer api from telemetry settings
|
|
1190
|
+
|
|
1191
|
+
## 7.0.0-beta.52
|
|
1192
|
+
|
|
1193
|
+
### Patch Changes
|
|
1194
|
+
|
|
1195
|
+
- b56301c: feat(ai): decouple otel from generate/streamObject
|
|
1196
|
+
|
|
1197
|
+
## 7.0.0-beta.51
|
|
1198
|
+
|
|
1199
|
+
### Patch Changes
|
|
1200
|
+
|
|
1201
|
+
- 6abd098: split `prepareToolsAndToolChoice()` into `prepareTools()` and `prepareToolChoice()`
|
|
1202
|
+
|
|
1203
|
+
## 7.0.0-beta.50
|
|
1204
|
+
|
|
1205
|
+
### Patch Changes
|
|
1206
|
+
|
|
1207
|
+
- 3debdb7: feat(ai): rename `stepCountIs` to `isStepCount`
|
|
1208
|
+
|
|
1209
|
+
## 7.0.0-beta.49
|
|
1210
|
+
|
|
1211
|
+
### Patch Changes
|
|
1212
|
+
|
|
1213
|
+
- Updated dependencies [294cbe7]
|
|
1214
|
+
- @ai-sdk/gateway@4.0.0-beta.26
|
|
1215
|
+
|
|
1216
|
+
## 7.0.0-beta.48
|
|
1217
|
+
|
|
1218
|
+
### Patch Changes
|
|
1219
|
+
|
|
1220
|
+
- 5c4d910: feat(ai): add new `isLoopFinished` stop condition helper for unlimited steps
|
|
1221
|
+
|
|
1222
|
+
## 7.0.0-beta.47
|
|
1223
|
+
|
|
1224
|
+
### Patch Changes
|
|
1225
|
+
|
|
1226
|
+
- bc67b4f: feat(ai): add experimental callbacks for structured outputs
|
|
1227
|
+
|
|
1228
|
+
## 7.0.0-beta.46
|
|
1229
|
+
|
|
1230
|
+
### Patch Changes
|
|
1231
|
+
|
|
1232
|
+
- 31ee822: refactoring(ai): extract filterActiveTools and expose it as experimental_filterActiveTools
|
|
1233
|
+
|
|
1234
|
+
## 7.0.0-beta.45
|
|
1235
|
+
|
|
1236
|
+
### Patch Changes
|
|
1237
|
+
|
|
1238
|
+
- Updated dependencies [435895b]
|
|
1239
|
+
- @ai-sdk/gateway@4.0.0-beta.25
|
|
1240
|
+
|
|
1241
|
+
## 7.0.0-beta.44
|
|
1242
|
+
|
|
1243
|
+
### Patch Changes
|
|
1244
|
+
|
|
1245
|
+
- Updated dependencies [d30466c]
|
|
1246
|
+
- @ai-sdk/gateway@4.0.0-beta.24
|
|
1247
|
+
|
|
1248
|
+
## 7.0.0-beta.43
|
|
1249
|
+
|
|
1250
|
+
### Patch Changes
|
|
1251
|
+
|
|
1252
|
+
- Updated dependencies [4ec78cd]
|
|
1253
|
+
- @ai-sdk/gateway@4.0.0-beta.23
|
|
1254
|
+
|
|
1255
|
+
## 7.0.0-beta.42
|
|
1256
|
+
|
|
1257
|
+
### Patch Changes
|
|
1258
|
+
|
|
1259
|
+
- a3fd75b: feat(ai): expose Experimental_ModelCallStreamPart type
|
|
1260
|
+
|
|
1261
|
+
## 7.0.0-beta.41
|
|
1262
|
+
|
|
1263
|
+
### Patch Changes
|
|
1264
|
+
|
|
1265
|
+
- Updated dependencies [7ceff62]
|
|
1266
|
+
- @ai-sdk/gateway@4.0.0-beta.22
|
|
1267
|
+
|
|
1268
|
+
## 7.0.0-beta.40
|
|
1269
|
+
|
|
1270
|
+
### Patch Changes
|
|
1271
|
+
|
|
1272
|
+
- 989d3d2: fix(ai): include generated files in OTEL response attributes
|
|
1273
|
+
|
|
1274
|
+
## 7.0.0-beta.39
|
|
1275
|
+
|
|
1276
|
+
### Patch Changes
|
|
1277
|
+
|
|
1278
|
+
- f4cfccd: feat(ai): decouple otel from rerank function
|
|
1279
|
+
|
|
1280
|
+
## 7.0.0-beta.38
|
|
1281
|
+
|
|
1282
|
+
### Patch Changes
|
|
1283
|
+
|
|
1284
|
+
- 1f509d4: fix(ai): force template check on 'kind' param
|
|
1285
|
+
- Updated dependencies [1f509d4]
|
|
1286
|
+
- @ai-sdk/provider-utils@5.0.0-beta.7
|
|
1287
|
+
- @ai-sdk/provider@4.0.0-beta.5
|
|
1288
|
+
- @ai-sdk/gateway@4.0.0-beta.21
|
|
1289
|
+
|
|
1290
|
+
## 7.0.0-beta.37
|
|
1291
|
+
|
|
1292
|
+
### Patch Changes
|
|
1293
|
+
|
|
1294
|
+
- Updated dependencies [4f91b5d]
|
|
1295
|
+
- @ai-sdk/gateway@4.0.0-beta.20
|
|
1296
|
+
|
|
1297
|
+
## 7.0.0-beta.36
|
|
1298
|
+
|
|
1299
|
+
### Patch Changes
|
|
1300
|
+
|
|
1301
|
+
- 118b953: feat(ai): decouple otel from embed functions
|
|
1302
|
+
|
|
1303
|
+
## 7.0.0-beta.35
|
|
1304
|
+
|
|
1305
|
+
### Patch Changes
|
|
1306
|
+
|
|
1307
|
+
- 99bf941: feat(ai): extract streamModelCall function for streaming text generation
|
|
1308
|
+
|
|
1309
|
+
## 7.0.0-beta.34
|
|
1310
|
+
|
|
1311
|
+
### Patch Changes
|
|
1312
|
+
|
|
1313
|
+
- Updated dependencies [72889f8]
|
|
1314
|
+
- @ai-sdk/gateway@4.0.0-beta.19
|
|
1315
|
+
|
|
1316
|
+
## 7.0.0-beta.33
|
|
1317
|
+
|
|
1318
|
+
### Patch Changes
|
|
1319
|
+
|
|
1320
|
+
- caf1b6f: feat(ai): introduce experimental callbacks for rerank function
|
|
1321
|
+
|
|
1322
|
+
## 7.0.0-beta.32
|
|
1323
|
+
|
|
1324
|
+
### Major Changes
|
|
1325
|
+
|
|
1326
|
+
- 4b46062: refactoring(ai): extract tool callback invocation into separate function and forward chunks before callback invocation
|
|
1327
|
+
|
|
1328
|
+
### Patch Changes
|
|
1329
|
+
|
|
1330
|
+
- Updated dependencies [165b97a]
|
|
1331
|
+
- @ai-sdk/gateway@4.0.0-beta.18
|
|
1332
|
+
|
|
1333
|
+
## 7.0.0-beta.31
|
|
1334
|
+
|
|
1335
|
+
### Patch Changes
|
|
1336
|
+
|
|
1337
|
+
- e79e644: chore(ai/core): remove `timeout` from `CallSettings` as it was effectively unused there
|
|
1338
|
+
|
|
1339
|
+
## 7.0.0-beta.30
|
|
1340
|
+
|
|
1341
|
+
### Patch Changes
|
|
1342
|
+
|
|
1343
|
+
- f5a6f89: README updates
|
|
1344
|
+
|
|
1345
|
+
## 7.0.0-beta.29
|
|
1346
|
+
|
|
1347
|
+
### Patch Changes
|
|
1348
|
+
|
|
1349
|
+
- 877bf12: fix(ai): flatten model attributes for telemetry
|
|
1350
|
+
|
|
1351
|
+
## 7.0.0-beta.28
|
|
1352
|
+
|
|
1353
|
+
### Major Changes
|
|
1354
|
+
|
|
1355
|
+
- b9cf502: refactoring(ai): delay tool execution in stream text until model call is finished
|
|
1356
|
+
|
|
1357
|
+
## 7.0.0-beta.27
|
|
1358
|
+
|
|
1359
|
+
### Patch Changes
|
|
1360
|
+
|
|
1361
|
+
- 3887c70: feat(provider): add new top-level reasoning parameter to spec and support it in `generateText` and `streamText`
|
|
1362
|
+
- Updated dependencies [3887c70]
|
|
1363
|
+
- @ai-sdk/provider-utils@5.0.0-beta.6
|
|
1364
|
+
- @ai-sdk/provider@4.0.0-beta.4
|
|
1365
|
+
- @ai-sdk/gateway@4.0.0-beta.17
|
|
1366
|
+
|
|
1367
|
+
## 7.0.0-beta.26
|
|
1368
|
+
|
|
1369
|
+
### Patch Changes
|
|
1370
|
+
|
|
1371
|
+
- f0b0b20: feat(ai): add per-tool timeout overrides via toolTimeouts
|
|
1372
|
+
|
|
1373
|
+
## 7.0.0-beta.25
|
|
1374
|
+
|
|
1375
|
+
### Patch Changes
|
|
1376
|
+
|
|
1377
|
+
- ff9ce30: feat(ai): introduce experimental callbacks for embed function
|
|
1378
|
+
|
|
1379
|
+
## 7.0.0-beta.24
|
|
1380
|
+
|
|
1381
|
+
### Major Changes
|
|
1382
|
+
|
|
1383
|
+
- 776b617: feat(provider): adding new 'custom' content type
|
|
1384
|
+
|
|
1385
|
+
### Patch Changes
|
|
1386
|
+
|
|
1387
|
+
- Updated dependencies [776b617]
|
|
1388
|
+
- @ai-sdk/provider-utils@5.0.0-beta.5
|
|
1389
|
+
- @ai-sdk/provider@4.0.0-beta.3
|
|
1390
|
+
- @ai-sdk/gateway@4.0.0-beta.16
|
|
1391
|
+
|
|
1392
|
+
## 7.0.0-beta.23
|
|
1393
|
+
|
|
1394
|
+
### Patch Changes
|
|
1395
|
+
|
|
1396
|
+
- 80d4dde: fix(ai): include tool input on tool result for provider executed dynamic tools
|
|
1397
|
+
- Updated dependencies [61753c3]
|
|
1398
|
+
- @ai-sdk/provider-utils@5.0.0-beta.4
|
|
1399
|
+
- @ai-sdk/gateway@4.0.0-beta.15
|
|
1400
|
+
|
|
1401
|
+
## 7.0.0-beta.22
|
|
1402
|
+
|
|
1403
|
+
### Patch Changes
|
|
1404
|
+
|
|
1405
|
+
- Updated dependencies [ead9144]
|
|
1406
|
+
- @ai-sdk/gateway@4.0.0-beta.14
|
|
1407
|
+
|
|
1408
|
+
## 7.0.0-beta.21
|
|
1409
|
+
|
|
1410
|
+
### Patch Changes
|
|
1411
|
+
|
|
1412
|
+
- 34fd051: feat(ai): add toolMs to timeout configuration
|
|
1413
|
+
|
|
1414
|
+
## 7.0.0-beta.20
|
|
1415
|
+
|
|
1416
|
+
### Patch Changes
|
|
1417
|
+
|
|
1418
|
+
- Updated dependencies [2095655]
|
|
1419
|
+
- @ai-sdk/gateway@4.0.0-beta.13
|
|
1420
|
+
|
|
1421
|
+
## 7.0.0-beta.19
|
|
1422
|
+
|
|
1423
|
+
### Patch Changes
|
|
1424
|
+
|
|
1425
|
+
- Updated dependencies [f7d4f01]
|
|
1426
|
+
- @ai-sdk/provider-utils@5.0.0-beta.3
|
|
1427
|
+
- @ai-sdk/provider@4.0.0-beta.2
|
|
1428
|
+
- @ai-sdk/gateway@4.0.0-beta.12
|
|
1429
|
+
|
|
1430
|
+
## 7.0.0-beta.18
|
|
1431
|
+
|
|
1432
|
+
### Patch Changes
|
|
1433
|
+
|
|
1434
|
+
- Updated dependencies [5c2a5a2]
|
|
1435
|
+
- @ai-sdk/provider@4.0.0-beta.1
|
|
1436
|
+
- @ai-sdk/gateway@4.0.0-beta.11
|
|
1437
|
+
- @ai-sdk/provider-utils@5.0.0-beta.2
|
|
1438
|
+
|
|
3
1439
|
## 7.0.0-beta.17
|
|
4
1440
|
|
|
5
1441
|
### Patch Changes
|
|
@@ -653,7 +2089,6 @@
|
|
|
653
2089
|
### Patch Changes
|
|
654
2090
|
|
|
655
2091
|
- 2dc9bfa: fix(ai): handle provider-executed tools and tool-approval-response in validation
|
|
656
|
-
|
|
657
2092
|
- Skip validation for tool calls with `providerExecuted: true` (deferred results)
|
|
658
2093
|
- Map approvalId to toolCallId for proper tool-approval-response handling
|
|
659
2094
|
- Filter out empty tool messages after content filtering
|
|
@@ -987,13 +2422,13 @@
|
|
|
987
2422
|
Before
|
|
988
2423
|
|
|
989
2424
|
```ts
|
|
990
|
-
model.textEmbeddingModel(
|
|
2425
|
+
model.textEmbeddingModel("my-model-id");
|
|
991
2426
|
```
|
|
992
2427
|
|
|
993
2428
|
After
|
|
994
2429
|
|
|
995
2430
|
```ts
|
|
996
|
-
model.embeddingModel(
|
|
2431
|
+
model.embeddingModel("my-model-id");
|
|
997
2432
|
```
|
|
998
2433
|
|
|
999
2434
|
- b67d224: Fixes an issue where `providerMetadata` and `providerExecuted` were lost when tool input validation failed
|
|
@@ -1016,15 +2451,15 @@
|
|
|
1016
2451
|
This change replaces
|
|
1017
2452
|
|
|
1018
2453
|
```ts
|
|
1019
|
-
import { experimental_createMCPClient } from
|
|
1020
|
-
import { Experimental_StdioMCPTransport } from
|
|
2454
|
+
import { experimental_createMCPClient } from "ai";
|
|
2455
|
+
import { Experimental_StdioMCPTransport } from "ai/mcp-stdio";
|
|
1021
2456
|
```
|
|
1022
2457
|
|
|
1023
2458
|
with
|
|
1024
2459
|
|
|
1025
2460
|
```ts
|
|
1026
|
-
import { experimental_createMCPClient } from
|
|
1027
|
-
import { Experimental_StdioMCPTransport } from
|
|
2461
|
+
import { experimental_createMCPClient } from "@ai-sdk/mcp";
|
|
2462
|
+
import { Experimental_StdioMCPTransport } from "@ai-sdk/mcp/mcp-stdio";
|
|
1028
2463
|
```
|
|
1029
2464
|
|
|
1030
2465
|
- 90e5bdd: chore(ai): restructure agent files
|
|
@@ -1111,7 +2546,7 @@
|
|
|
1111
2546
|
- 81d4308: feat: provider-executed dynamic tools
|
|
1112
2547
|
- e0d1ea9: fix(ai): align logic of text-end with reasoning-end
|
|
1113
2548
|
- 2406576: chore(agent): rename messages property on agent ui stream functions to uiMessages
|
|
1114
|
-
- b1aeea7: feat(ai): set default stopWhen on Agent to
|
|
2549
|
+
- b1aeea7: feat(ai): set default stopWhen on Agent to isStepCount(20)
|
|
1115
2550
|
- dce4e7b: chore(agent): rename system to instructions
|
|
1116
2551
|
- 4ece5f9: feat(agent): add experimental_download to ToolLoopAgent
|
|
1117
2552
|
- a417a34: feat(agent): introduce version property
|
|
@@ -1544,13 +2979,13 @@
|
|
|
1544
2979
|
Before
|
|
1545
2980
|
|
|
1546
2981
|
```ts
|
|
1547
|
-
model.textEmbeddingModel(
|
|
2982
|
+
model.textEmbeddingModel("my-model-id");
|
|
1548
2983
|
```
|
|
1549
2984
|
|
|
1550
2985
|
After
|
|
1551
2986
|
|
|
1552
2987
|
```ts
|
|
1553
|
-
model.embeddingModel(
|
|
2988
|
+
model.embeddingModel("my-model-id");
|
|
1554
2989
|
```
|
|
1555
2990
|
|
|
1556
2991
|
- Updated dependencies [8d9e8ad]
|
|
@@ -1897,15 +3332,15 @@
|
|
|
1897
3332
|
This change replaces
|
|
1898
3333
|
|
|
1899
3334
|
```ts
|
|
1900
|
-
import { experimental_createMCPClient } from
|
|
1901
|
-
import { Experimental_StdioMCPTransport } from
|
|
3335
|
+
import { experimental_createMCPClient } from "ai";
|
|
3336
|
+
import { Experimental_StdioMCPTransport } from "ai/mcp-stdio";
|
|
1902
3337
|
```
|
|
1903
3338
|
|
|
1904
3339
|
with
|
|
1905
3340
|
|
|
1906
3341
|
```ts
|
|
1907
|
-
import { experimental_createMCPClient } from
|
|
1908
|
-
import { Experimental_StdioMCPTransport } from
|
|
3342
|
+
import { experimental_createMCPClient } from "@ai-sdk/mcp";
|
|
3343
|
+
import { Experimental_StdioMCPTransport } from "@ai-sdk/mcp/mcp-stdio";
|
|
1909
3344
|
```
|
|
1910
3345
|
|
|
1911
3346
|
## 6.0.0-beta.71
|
|
@@ -2287,7 +3722,7 @@
|
|
|
2287
3722
|
|
|
2288
3723
|
- aa0515c: feat(ai): move Agent to stable
|
|
2289
3724
|
- e7d9b00: feat(agent): add optional name property to agent
|
|
2290
|
-
- b1aeea7: feat(ai): set default stopWhen on Agent to
|
|
3725
|
+
- b1aeea7: feat(ai): set default stopWhen on Agent to isStepCount(20)
|
|
2291
3726
|
|
|
2292
3727
|
## 5.1.0-beta.18
|
|
2293
3728
|
|
|
@@ -2824,7 +4259,7 @@
|
|
|
2824
4259
|
|
|
2825
4260
|
```js
|
|
2826
4261
|
await generateImage({
|
|
2827
|
-
model: luma.image(
|
|
4262
|
+
model: luma.image("photon-flash-1", {
|
|
2828
4263
|
maxImagesPerCall: 5,
|
|
2829
4264
|
pollIntervalMillis: 500,
|
|
2830
4265
|
}),
|
|
@@ -2837,7 +4272,7 @@
|
|
|
2837
4272
|
|
|
2838
4273
|
```js
|
|
2839
4274
|
await generateImage({
|
|
2840
|
-
model: luma.image(
|
|
4275
|
+
model: luma.image("photon-flash-1"),
|
|
2841
4276
|
prompt,
|
|
2842
4277
|
n: 10,
|
|
2843
4278
|
maxImagesPerCall: 5,
|
|
@@ -2857,7 +4292,7 @@
|
|
|
2857
4292
|
- c7710a9: chore (ai): rename DataStreamToSSETransformStream to JsonToSseTransformStream
|
|
2858
4293
|
- bfbfc4c: feat (ai): streamText/generateText: totalUsage contains usage for all steps. usage is for a single step.
|
|
2859
4294
|
- 9ae327d: chore (ui): replace chat store concept with chat instances
|
|
2860
|
-
- 9315076: chore (ai): rename continueUntil to stopWhen. Rename maxSteps stop condition to
|
|
4295
|
+
- 9315076: chore (ai): rename continueUntil to stopWhen. Rename maxSteps stop condition to isStepCount.
|
|
2861
4296
|
- 247ee0c: chore (ai): remove steps from tool invocation ui parts
|
|
2862
4297
|
- 109c0ac: chore (ai): rename id to chatId (in post request, resume request, and useChat)
|
|
2863
4298
|
- 954aa73: feat (ui): extended regenerate support
|
|
@@ -3037,10 +4472,10 @@
|
|
|
3037
4472
|
The `experimental_generateImage` method from the `ai` package now returnes revised prompts for OpenAI's image models.
|
|
3038
4473
|
|
|
3039
4474
|
```js
|
|
3040
|
-
const prompt =
|
|
4475
|
+
const prompt = "Santa Claus driving a Cadillac";
|
|
3041
4476
|
|
|
3042
4477
|
const { providerMetadata } = await experimental_generateImage({
|
|
3043
|
-
model: openai.image(
|
|
4478
|
+
model: openai.image("dall-e-3"),
|
|
3044
4479
|
prompt,
|
|
3045
4480
|
});
|
|
3046
4481
|
|
|
@@ -3600,7 +5035,7 @@
|
|
|
3600
5035
|
### Major Changes
|
|
3601
5036
|
|
|
3602
5037
|
- 72d7d72: chore (ai): stable activeTools
|
|
3603
|
-
- 9315076: chore (ai): rename continueUntil to stopWhen. Rename maxSteps stop condition to
|
|
5038
|
+
- 9315076: chore (ai): rename continueUntil to stopWhen. Rename maxSteps stop condition to isStepCount.
|
|
3604
5039
|
|
|
3605
5040
|
### Patch Changes
|
|
3606
5041
|
|
|
@@ -3703,7 +5138,7 @@
|
|
|
3703
5138
|
|
|
3704
5139
|
```js
|
|
3705
5140
|
await generateImage({
|
|
3706
|
-
model: luma.image(
|
|
5141
|
+
model: luma.image("photon-flash-1", {
|
|
3707
5142
|
maxImagesPerCall: 5,
|
|
3708
5143
|
pollIntervalMillis: 500,
|
|
3709
5144
|
}),
|
|
@@ -3716,7 +5151,7 @@
|
|
|
3716
5151
|
|
|
3717
5152
|
```js
|
|
3718
5153
|
await generateImage({
|
|
3719
|
-
model: luma.image(
|
|
5154
|
+
model: luma.image("photon-flash-1"),
|
|
3720
5155
|
prompt,
|
|
3721
5156
|
n: 10,
|
|
3722
5157
|
maxImagesPerCall: 5,
|
|
@@ -3814,10 +5249,10 @@
|
|
|
3814
5249
|
The `experimental_generateImage` method from the `ai` package now returnes revised prompts for OpenAI's image models.
|
|
3815
5250
|
|
|
3816
5251
|
```js
|
|
3817
|
-
const prompt =
|
|
5252
|
+
const prompt = "Santa Claus driving a Cadillac";
|
|
3818
5253
|
|
|
3819
5254
|
const { providerMetadata } = await experimental_generateImage({
|
|
3820
|
-
model: openai.image(
|
|
5255
|
+
model: openai.image("dall-e-3"),
|
|
3821
5256
|
prompt,
|
|
3822
5257
|
});
|
|
3823
5258
|
|