ai 7.0.0-beta.15 → 7.0.0-beta.177
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 +1465 -25
- package/README.md +9 -19
- package/dist/index.d.ts +4894 -2625
- package/dist/index.js +8371 -5528
- package/dist/index.js.map +1 -1
- package/dist/internal/index.d.ts +2564 -199
- package/dist/internal/index.js +2647 -528
- 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 +507 -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 +158 -98
- 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 +163 -151
- package/src/generate-text/execute-tools-from-stream.ts +240 -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 +1196 -1009
- 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 +205 -78
- package/src/generate-text/stop-condition.ts +59 -11
- package/src/generate-text/stream-language-model-call.ts +837 -0
- package/src/generate-text/stream-text-result.ts +276 -146
- package/src/generate-text/stream-text.ts +1411 -1608
- 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 +219 -105
- package/src/telemetry/create-telemetry-dispatcher.ts +183 -0
- package/src/telemetry/diagnostic-channel-publisher.ts +50 -0
- package/src/telemetry/diagnostic-channel.ts +25 -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 +247 -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 -6471
- package/dist/index.mjs +0 -13710
- 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 -332
- package/src/generate-text/is-approval-needed.ts +0 -29
- package/src/generate-text/run-tools-transformation.ts +0 -448
- 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 -53
- package/src/telemetry/get-global-telemetry-integration.ts +0 -85
- package/src/telemetry/get-tracer.ts +0 -20
- package/src/telemetry/noop-tracer.ts +0 -69
- 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 -17
- package/src/telemetry/telemetry-integration.ts +0 -24
- package/src/telemetry/telemetry-settings.ts +0 -53
- 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,1446 @@
|
|
|
1
1
|
# ai
|
|
2
2
|
|
|
3
|
+
## 7.0.0-beta.177
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- b8396f0: trigger initial beta release
|
|
8
|
+
- Updated dependencies [b8396f0]
|
|
9
|
+
- @ai-sdk/gateway@4.0.0-beta.108
|
|
10
|
+
- @ai-sdk/provider-utils@5.0.0-beta.49
|
|
11
|
+
- @ai-sdk/provider@4.0.0-beta.19
|
|
12
|
+
|
|
13
|
+
## 7.0.0-canary.176
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- Updated dependencies [d5b8263]
|
|
18
|
+
- @ai-sdk/gateway@4.0.0-canary.107
|
|
19
|
+
|
|
20
|
+
## 7.0.0-canary.175
|
|
21
|
+
|
|
22
|
+
### Patch Changes
|
|
23
|
+
|
|
24
|
+
- 6ec57f5: feat(ai): make the experimental lifecycle callbacks stable
|
|
25
|
+
|
|
26
|
+
## 7.0.0-canary.174
|
|
27
|
+
|
|
28
|
+
### Patch Changes
|
|
29
|
+
|
|
30
|
+
- Updated dependencies [ca2cf45]
|
|
31
|
+
- @ai-sdk/gateway@4.0.0-canary.106
|
|
32
|
+
|
|
33
|
+
## 7.0.0-canary.173
|
|
34
|
+
|
|
35
|
+
### Patch Changes
|
|
36
|
+
|
|
37
|
+
- Updated dependencies [efec111]
|
|
38
|
+
- @ai-sdk/gateway@4.0.0-canary.105
|
|
39
|
+
|
|
40
|
+
## 7.0.0-canary.172
|
|
41
|
+
|
|
42
|
+
### Patch Changes
|
|
43
|
+
|
|
44
|
+
- 25a64f8: Remove deprecated experimental generateImage exports.
|
|
45
|
+
- 375fdd7: fix: harden download URL SSRF guard against hostname and redirect bypasses
|
|
46
|
+
|
|
47
|
+
`validateDownloadUrl` and the file download helpers (`downloadBlob`, `download`) could be bypassed in several ways when handling untrusted URLs:
|
|
48
|
+
|
|
49
|
+
- A fully-qualified hostname with a trailing dot (e.g. `localhost.`, `myhost.local.`) skipped the localhost/`.local` blocklist.
|
|
50
|
+
- 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.
|
|
51
|
+
- 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.
|
|
52
|
+
- 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`).
|
|
53
|
+
|
|
54
|
+
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.
|
|
55
|
+
|
|
56
|
+
- f18b08f: fix: redact server error details from UI message streams by default
|
|
57
|
+
|
|
58
|
+
`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.
|
|
59
|
+
|
|
60
|
+
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.
|
|
61
|
+
|
|
62
|
+
- b4507d5: fix(provider-utils): cancel response body on download rejection to prevent socket leak
|
|
63
|
+
|
|
64
|
+
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.
|
|
65
|
+
|
|
66
|
+
- Updated dependencies [8c17bf8]
|
|
67
|
+
- Updated dependencies [aeda373]
|
|
68
|
+
- Updated dependencies [558777f]
|
|
69
|
+
- Updated dependencies [375fdd7]
|
|
70
|
+
- Updated dependencies [b4507d5]
|
|
71
|
+
- @ai-sdk/gateway@4.0.0-canary.104
|
|
72
|
+
- @ai-sdk/provider-utils@5.0.0-canary.48
|
|
73
|
+
|
|
74
|
+
## 7.0.0-canary.171
|
|
75
|
+
|
|
76
|
+
### Patch Changes
|
|
77
|
+
|
|
78
|
+
- 89ad56f: Promote `generateSpeech` and `SpeechResult` to stable exports.
|
|
79
|
+
- f9a496f: Promote `transcribe` and `TranscriptionResult` to stable exports, with deprecated experimental aliases for backwards compatibility.
|
|
80
|
+
- 3295831: Harden stream text processing and middleware against prototype pollution from stream part IDs.
|
|
81
|
+
|
|
82
|
+
## 7.0.0-canary.170
|
|
83
|
+
|
|
84
|
+
### Patch Changes
|
|
85
|
+
|
|
86
|
+
- bae5e2b: fix(security): re-validate tool approvals from client message history before execution
|
|
87
|
+
|
|
88
|
+
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.
|
|
89
|
+
|
|
90
|
+
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.
|
|
91
|
+
|
|
92
|
+
- 69d7128: fix(workflow): reuse the core tool-approval validation in WorkflowAgent
|
|
93
|
+
|
|
94
|
+
`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`.
|
|
95
|
+
|
|
96
|
+
- Updated dependencies [bae5e2b]
|
|
97
|
+
- @ai-sdk/provider-utils@5.0.0-canary.47
|
|
98
|
+
- @ai-sdk/gateway@4.0.0-canary.103
|
|
99
|
+
|
|
100
|
+
## 7.0.0-canary.169
|
|
101
|
+
|
|
102
|
+
### Patch Changes
|
|
103
|
+
|
|
104
|
+
- a5018ab: fix(ai): return schema-transformed elements in array output mode
|
|
105
|
+
|
|
106
|
+
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.
|
|
107
|
+
|
|
108
|
+
- 21d3d60: feat(harness): implement harness specification
|
|
109
|
+
- 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.
|
|
110
|
+
- 7fd3360: Harden UI message stream processing against prototype pollution from chunk IDs.
|
|
111
|
+
|
|
112
|
+
## 7.0.0-canary.168
|
|
113
|
+
|
|
114
|
+
### Patch Changes
|
|
115
|
+
|
|
116
|
+
- 1e4b350: Honor `tool.toModelOutput` in `WorkflowAgent`.
|
|
117
|
+
|
|
118
|
+
`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`.
|
|
119
|
+
|
|
120
|
+
Internally exports the shared tool-result model-output helpers from `ai/internal`, and uses the shared `getErrorMessage` behavior for workflow tool error results.
|
|
121
|
+
|
|
122
|
+
- Updated dependencies [a3bb04a]
|
|
123
|
+
- @ai-sdk/gateway@4.0.0-canary.102
|
|
124
|
+
|
|
125
|
+
## 7.0.0-canary.167
|
|
126
|
+
|
|
127
|
+
### Patch Changes
|
|
128
|
+
|
|
129
|
+
- 4757690: feat(ai): rename onObjectStepFinish to onObjectStepEnd
|
|
130
|
+
- eeefc3f: fix(ai): enforce `timeout.stepMs` for the whole step in `streamText`
|
|
131
|
+
|
|
132
|
+
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.
|
|
133
|
+
|
|
134
|
+
- b79b6a8: fix(ai): add approval guard for denied tool outputs
|
|
135
|
+
- Updated dependencies [6b4d325]
|
|
136
|
+
- @ai-sdk/gateway@4.0.0-canary.101
|
|
137
|
+
|
|
138
|
+
## 7.0.0-canary.166
|
|
139
|
+
|
|
140
|
+
### Patch Changes
|
|
141
|
+
|
|
142
|
+
- 19736ee: feat(ai): rename onStepFinish to onStepEnd
|
|
143
|
+
- d66ae02: Return validated elements from generateText array output
|
|
144
|
+
- e4182bd: chore: rm export of OutputInterface
|
|
145
|
+
- Updated dependencies [24bb123]
|
|
146
|
+
- Updated dependencies [c44fcc8]
|
|
147
|
+
- Updated dependencies [97e480a]
|
|
148
|
+
- @ai-sdk/gateway@4.0.0-canary.100
|
|
149
|
+
|
|
150
|
+
## 7.0.0-canary.165
|
|
151
|
+
|
|
152
|
+
### Patch Changes
|
|
153
|
+
|
|
154
|
+
- ce769dd: feat(provider): add experimental Realtime API support for voice conversations
|
|
155
|
+
|
|
156
|
+
Adds first-class support for realtime (speech-to-speech) APIs:
|
|
157
|
+
|
|
158
|
+
- `Experimental_RealtimeModelV4` spec in `@ai-sdk/provider` with normalized event types and factory
|
|
159
|
+
- OpenAI, Google, and xAI realtime provider implementations
|
|
160
|
+
- `openai.experimental_realtime()` / `google.experimental_realtime()` / `xai.experimental_realtime()` work in both server and browser
|
|
161
|
+
- `.getToken()` static method on each provider for server-side ephemeral token creation
|
|
162
|
+
- `experimental_getRealtimeToolDefinitions` helper for provider session tool definitions
|
|
163
|
+
- `experimental_useRealtime` hook in `@ai-sdk/react` returning `UIMessage[]` (aligned with `useChat`), with `onToolCall` and `addToolOutput` for client-driven tool execution
|
|
164
|
+
- `inputAudioTranscription` session config for showing transcribed user audio messages when supported by the provider
|
|
165
|
+
|
|
166
|
+
- Updated dependencies [ce769dd]
|
|
167
|
+
- @ai-sdk/provider@4.0.0-canary.18
|
|
168
|
+
- @ai-sdk/gateway@4.0.0-canary.99
|
|
169
|
+
- @ai-sdk/provider-utils@5.0.0-canary.46
|
|
170
|
+
|
|
171
|
+
## 7.0.0-canary.164
|
|
172
|
+
|
|
173
|
+
### Patch Changes
|
|
174
|
+
|
|
175
|
+
- Updated dependencies [9876183]
|
|
176
|
+
- @ai-sdk/gateway@4.0.0-canary.98
|
|
177
|
+
|
|
178
|
+
## 7.0.0-canary.163
|
|
179
|
+
|
|
180
|
+
### Patch Changes
|
|
181
|
+
|
|
182
|
+
- ee798eb: chore(provider-utils): rename `Experimental_Sandbox` to `Experimental_SandboxSession`
|
|
183
|
+
- c907622: Add a `toolOrder` option to control the order in which tools are sent to provider APIs.
|
|
184
|
+
- Updated dependencies [ee798eb]
|
|
185
|
+
- Updated dependencies [daf6637]
|
|
186
|
+
- @ai-sdk/provider-utils@5.0.0-canary.45
|
|
187
|
+
- @ai-sdk/gateway@4.0.0-canary.97
|
|
188
|
+
|
|
189
|
+
## 7.0.0-canary.162
|
|
190
|
+
|
|
191
|
+
### Patch Changes
|
|
192
|
+
|
|
193
|
+
- Updated dependencies [83877a1]
|
|
194
|
+
- @ai-sdk/gateway@4.0.0-canary.96
|
|
195
|
+
|
|
196
|
+
## 7.0.0-canary.161
|
|
197
|
+
|
|
198
|
+
### Patch Changes
|
|
199
|
+
|
|
200
|
+
- Updated dependencies [a3261db]
|
|
201
|
+
- @ai-sdk/gateway@4.0.0-canary.95
|
|
202
|
+
|
|
203
|
+
## 7.0.0-canary.160
|
|
204
|
+
|
|
205
|
+
### Patch Changes
|
|
206
|
+
|
|
207
|
+
- Updated dependencies [712873e]
|
|
208
|
+
- @ai-sdk/gateway@4.0.0-canary.94
|
|
209
|
+
|
|
210
|
+
## 7.0.0-canary.159
|
|
211
|
+
|
|
212
|
+
### Patch Changes
|
|
213
|
+
|
|
214
|
+
- b5092f5: fix(ai): do not re-validate tool input for output-error parts in validateUIMessages
|
|
215
|
+
|
|
216
|
+
## 7.0.0-canary.158
|
|
217
|
+
|
|
218
|
+
### Patch Changes
|
|
219
|
+
|
|
220
|
+
- bcce2dd: feat(stream-text): expose standalone stream transformation helpers and deprecate the equivalent `streamText` result methods.
|
|
221
|
+
|
|
222
|
+
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`.
|
|
223
|
+
|
|
224
|
+
`result.toUIMessageStreamResponse(options)` and `result.pipeUIMessageStreamToResponse(response, options)` can migrate by passing `toUIMessageStream({ stream: result.stream, ...options })` to `createUIMessageStreamResponse` or `pipeUIMessageStreamToResponse`.
|
|
225
|
+
|
|
226
|
+
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 })`.
|
|
227
|
+
|
|
228
|
+
`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.
|
|
229
|
+
|
|
230
|
+
## 7.0.0-canary.157
|
|
231
|
+
|
|
232
|
+
### Patch Changes
|
|
233
|
+
|
|
234
|
+
- Updated dependencies [e02f041]
|
|
235
|
+
- @ai-sdk/gateway@4.0.0-canary.93
|
|
236
|
+
|
|
237
|
+
## 7.0.0-canary.156
|
|
238
|
+
|
|
239
|
+
### Patch Changes
|
|
240
|
+
|
|
241
|
+
- 023550e: Deprecate `streamText` result `fullStream` in favor of `stream`.
|
|
242
|
+
- e92fc45: feat(ai): introduce onAbort hook to close telemetry spans
|
|
243
|
+
|
|
244
|
+
## 7.0.0-canary.155
|
|
245
|
+
|
|
246
|
+
### Patch Changes
|
|
247
|
+
|
|
248
|
+
- e67d80e: fix: rename onFinish to onEnd
|
|
249
|
+
- 6cca112: feat: add timeBetweenOutputTokensMs stats
|
|
250
|
+
- 82fc0ab: fix(ai): pass all stream text parts to `onChunk`
|
|
251
|
+
- 76fd58c: fix: consider file outputs and tool calls for time to first output
|
|
252
|
+
|
|
253
|
+
## 7.0.0-canary.154
|
|
254
|
+
|
|
255
|
+
### Patch Changes
|
|
256
|
+
|
|
257
|
+
- 594029e: feat(ai): wrap the model call in telemetry context
|
|
258
|
+
|
|
259
|
+
## 7.0.0-canary.153
|
|
260
|
+
|
|
261
|
+
### Patch Changes
|
|
262
|
+
|
|
263
|
+
- 6c93e36: feat(provider-utils): add `spawnCommand` method to `Experimental_Sandbox` to allow for detached command execution
|
|
264
|
+
- Updated dependencies [6c93e36]
|
|
265
|
+
- Updated dependencies [f617ac2]
|
|
266
|
+
- @ai-sdk/provider-utils@5.0.0-canary.44
|
|
267
|
+
- @ai-sdk/gateway@4.0.0-canary.92
|
|
268
|
+
|
|
269
|
+
## 7.0.0-canary.152
|
|
270
|
+
|
|
271
|
+
### Patch Changes
|
|
272
|
+
|
|
273
|
+
- Updated dependencies [d4d4a5e]
|
|
274
|
+
- @ai-sdk/gateway@4.0.0-canary.91
|
|
275
|
+
|
|
276
|
+
## 7.0.0-canary.151
|
|
277
|
+
|
|
278
|
+
### Patch Changes
|
|
279
|
+
|
|
280
|
+
- Updated dependencies [8b811d8]
|
|
281
|
+
- @ai-sdk/gateway@4.0.0-canary.90
|
|
282
|
+
|
|
283
|
+
## 7.0.0-canary.150
|
|
284
|
+
|
|
285
|
+
### Patch Changes
|
|
286
|
+
|
|
287
|
+
- Updated dependencies [bba5250]
|
|
288
|
+
- Updated dependencies [94c6edc]
|
|
289
|
+
- @ai-sdk/gateway@4.0.0-canary.89
|
|
290
|
+
|
|
291
|
+
## 7.0.0-canary.149
|
|
292
|
+
|
|
293
|
+
### Patch Changes
|
|
294
|
+
|
|
295
|
+
- e3d9c0e: Add `allowSystemInMessages` option to `ToolLoopAgent`.
|
|
296
|
+
|
|
297
|
+
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.
|
|
298
|
+
|
|
299
|
+
```ts
|
|
300
|
+
const agent = new ToolLoopAgent({
|
|
301
|
+
model,
|
|
302
|
+
allowSystemInMessages: true,
|
|
303
|
+
});
|
|
304
|
+
|
|
305
|
+
await agent.generate({
|
|
306
|
+
messages: [
|
|
307
|
+
{ role: "system", content: "Server context" },
|
|
308
|
+
{ role: "user", content: "Hello" },
|
|
309
|
+
],
|
|
310
|
+
});
|
|
311
|
+
```
|
|
312
|
+
|
|
313
|
+
The option can also be returned from `prepareCall` for dynamic per-call configuration.
|
|
314
|
+
|
|
315
|
+
## 7.0.0-canary.148
|
|
316
|
+
|
|
317
|
+
### Patch Changes
|
|
318
|
+
|
|
319
|
+
- 2852a84: fix(ai): make input optional on input-streaming UIMessagePart variants
|
|
320
|
+
|
|
321
|
+
## 7.0.0-canary.147
|
|
322
|
+
|
|
323
|
+
### Patch Changes
|
|
324
|
+
|
|
325
|
+
- Updated dependencies [accaca0]
|
|
326
|
+
- @ai-sdk/gateway@4.0.0-canary.88
|
|
327
|
+
|
|
328
|
+
## 7.0.0-canary.146
|
|
329
|
+
|
|
330
|
+
### Patch Changes
|
|
331
|
+
|
|
332
|
+
- Updated dependencies [bf837fe]
|
|
333
|
+
- @ai-sdk/gateway@4.0.0-canary.87
|
|
334
|
+
|
|
335
|
+
## 7.0.0-canary.145
|
|
336
|
+
|
|
337
|
+
### Patch Changes
|
|
338
|
+
|
|
339
|
+
- Updated dependencies [546cefe]
|
|
340
|
+
- @ai-sdk/gateway@4.0.0-canary.86
|
|
341
|
+
|
|
342
|
+
## 7.0.0-canary.144
|
|
343
|
+
|
|
344
|
+
### Patch Changes
|
|
345
|
+
|
|
346
|
+
- 7fc6bd6: Raise minimum supported Node.js version to 22. Supported versions: 22, 24, and 26.
|
|
347
|
+
- Updated dependencies [7fc6bd6]
|
|
348
|
+
- @ai-sdk/gateway@4.0.0-canary.85
|
|
349
|
+
- @ai-sdk/provider-utils@5.0.0-canary.43
|
|
350
|
+
- @ai-sdk/provider@4.0.0-canary.17
|
|
351
|
+
|
|
352
|
+
## 7.0.0-canary.143
|
|
353
|
+
|
|
354
|
+
### Patch Changes
|
|
355
|
+
|
|
356
|
+
- a6617c5: feat(provider-utils): add `readFile` and `writeFile` plus convenience wrappers to `Experimental_Sandbox` abstraction
|
|
357
|
+
- Updated dependencies [a6617c5]
|
|
358
|
+
- Updated dependencies [032c4a5]
|
|
359
|
+
- @ai-sdk/provider-utils@5.0.0-canary.42
|
|
360
|
+
- @ai-sdk/gateway@4.0.0-canary.84
|
|
361
|
+
|
|
362
|
+
## 7.0.0-canary.142
|
|
363
|
+
|
|
364
|
+
### Patch Changes
|
|
365
|
+
|
|
366
|
+
- 62d6481: Post-publish release notifications now link to each package’s GitHub release and npm page.
|
|
367
|
+
|
|
368
|
+
## 7.0.0-canary.141
|
|
369
|
+
|
|
370
|
+
### Patch Changes
|
|
371
|
+
|
|
372
|
+
- e3a0419: fix(ai): default missing embedding warnings to an empty array
|
|
373
|
+
|
|
374
|
+
## 7.0.0-canary.140
|
|
375
|
+
|
|
376
|
+
### Patch Changes
|
|
377
|
+
|
|
378
|
+
- Updated dependencies [1d6fb7f]
|
|
379
|
+
- @ai-sdk/gateway@4.0.0-canary.83
|
|
380
|
+
|
|
381
|
+
## 7.0.0-canary.139
|
|
382
|
+
|
|
383
|
+
### Patch Changes
|
|
384
|
+
|
|
385
|
+
- 334ae5d: Update step performance metrics with explicit effective, input, output, and total token throughput fields.
|
|
386
|
+
- 28dfa06: fix: support tools with optional context
|
|
387
|
+
- e93fa91: rename Sandbox.executeCommand to Sandbox.runCommand
|
|
388
|
+
- Updated dependencies [28dfa06]
|
|
389
|
+
- Updated dependencies [e93fa91]
|
|
390
|
+
- @ai-sdk/provider-utils@5.0.0-canary.41
|
|
391
|
+
- @ai-sdk/gateway@4.0.0-canary.82
|
|
392
|
+
|
|
393
|
+
## 7.0.0-canary.138
|
|
394
|
+
|
|
395
|
+
### Patch Changes
|
|
396
|
+
|
|
397
|
+
- Updated dependencies [67c4011]
|
|
398
|
+
- @ai-sdk/gateway@4.0.0-canary.81
|
|
399
|
+
|
|
400
|
+
## 7.0.0-canary.137
|
|
401
|
+
|
|
402
|
+
### Patch Changes
|
|
403
|
+
|
|
404
|
+
- 98627e5: feat(ai): remove onChunk event from telemetry
|
|
405
|
+
- 476e1ca: feat(ai): remove telemetry dependency on onChunk callback
|
|
406
|
+
|
|
407
|
+
## 7.0.0-canary.136
|
|
408
|
+
|
|
409
|
+
### Patch Changes
|
|
410
|
+
|
|
411
|
+
- a7de9c9: fix: make sandbox experimental
|
|
412
|
+
- Updated dependencies [a7de9c9]
|
|
413
|
+
- @ai-sdk/provider-utils@5.0.0-canary.40
|
|
414
|
+
- @ai-sdk/gateway@4.0.0-canary.80
|
|
415
|
+
|
|
416
|
+
## 7.0.0-canary.135
|
|
417
|
+
|
|
418
|
+
### Patch Changes
|
|
419
|
+
|
|
420
|
+
- Updated dependencies [105f95b]
|
|
421
|
+
- @ai-sdk/provider-utils@5.0.0-canary.39
|
|
422
|
+
- @ai-sdk/gateway@4.0.0-canary.79
|
|
423
|
+
|
|
424
|
+
## 7.0.0-canary.134
|
|
425
|
+
|
|
426
|
+
### Patch Changes
|
|
427
|
+
|
|
428
|
+
- ed74dae: fix(ui): make `input` optional on `output-error` tool and dynamic-tool UI message parts
|
|
429
|
+
|
|
430
|
+
`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`.
|
|
431
|
+
|
|
432
|
+
- f4cc8eb: feat: add performance statistics
|
|
433
|
+
- e80ada0: fix(ai): download tool-result file URLs
|
|
434
|
+
- 1dca341: fix: rename telemetry onFinish to onEnd
|
|
435
|
+
- 2605e5f: fix test mocks to return the first array-backed result on the first call
|
|
436
|
+
|
|
437
|
+
## 7.0.0-canary.133
|
|
438
|
+
|
|
439
|
+
### Patch Changes
|
|
440
|
+
|
|
441
|
+
- 38ca8dc: fix(gateway): enable retry support for gateway errors
|
|
442
|
+
- 6d76710: fix URL of hero animation in README
|
|
443
|
+
- Updated dependencies [38ca8dc]
|
|
444
|
+
- Updated dependencies [8b7af75]
|
|
445
|
+
- @ai-sdk/gateway@4.0.0-canary.78
|
|
446
|
+
|
|
447
|
+
## 7.0.0-canary.132
|
|
448
|
+
|
|
449
|
+
### Patch Changes
|
|
450
|
+
|
|
451
|
+
- eaf849f: Rename rerank telemetry finish callback to `onRerankEnd`.
|
|
452
|
+
- 8565dcb: fix: rename onEmbedFinish to onEmbedEnd
|
|
453
|
+
|
|
454
|
+
## 7.0.0-canary.131
|
|
455
|
+
|
|
456
|
+
### Patch Changes
|
|
457
|
+
|
|
458
|
+
- b67525f: feat: instructions as prepareStep input
|
|
459
|
+
- ca446f8: feat: flexible tool descriptions
|
|
460
|
+
- bcacd48: fix(ai): accumulative properties on StreamTextResult, GenerateTextResult
|
|
461
|
+
- Updated dependencies [ca446f8]
|
|
462
|
+
- @ai-sdk/provider-utils@5.0.0-canary.38
|
|
463
|
+
- @ai-sdk/gateway@4.0.0-canary.77
|
|
464
|
+
|
|
465
|
+
## 7.0.0-canary.130
|
|
466
|
+
|
|
467
|
+
### Patch Changes
|
|
468
|
+
|
|
469
|
+
- Updated dependencies [5f380c0]
|
|
470
|
+
- @ai-sdk/gateway@4.0.0-canary.76
|
|
471
|
+
|
|
472
|
+
## 7.0.0-canary.129
|
|
473
|
+
|
|
474
|
+
### Patch Changes
|
|
475
|
+
|
|
476
|
+
- d1b3786: fix(ai): deprecate properties on result that have moved to finalStep
|
|
477
|
+
|
|
478
|
+
## 7.0.0-canary.128
|
|
479
|
+
|
|
480
|
+
### Patch Changes
|
|
481
|
+
|
|
482
|
+
- Updated dependencies [d848405]
|
|
483
|
+
- @ai-sdk/provider-utils@5.0.0-canary.37
|
|
484
|
+
- @ai-sdk/gateway@4.0.0-canary.75
|
|
485
|
+
|
|
486
|
+
## 7.0.0-canary.127
|
|
487
|
+
|
|
488
|
+
### Patch Changes
|
|
489
|
+
|
|
490
|
+
- e95e38d: fix: Make `generateText` and `streamText` result `usage` report total usage across all steps and deprecate `totalUsage`.
|
|
491
|
+
- 016e877: feat(ai): add `instructions` as the primary prompt option and deprecate `system`
|
|
492
|
+
- ca99fea: feat: expose `finalStep` on text generation results
|
|
493
|
+
- d775a57: feat: introduce Instructions type
|
|
494
|
+
- 538c12b: feat: use instructions on ToolCallRepairFunction, parseToolCall, and events
|
|
495
|
+
- Updated dependencies [ca39020]
|
|
496
|
+
- @ai-sdk/provider-utils@5.0.0-canary.36
|
|
497
|
+
- @ai-sdk/gateway@4.0.0-canary.74
|
|
498
|
+
|
|
499
|
+
## 7.0.0-canary.126
|
|
500
|
+
|
|
501
|
+
### Patch Changes
|
|
502
|
+
|
|
503
|
+
- Updated dependencies [f634bac]
|
|
504
|
+
- @ai-sdk/provider-utils@5.0.0-canary.35
|
|
505
|
+
- @ai-sdk/gateway@4.0.0-canary.73
|
|
506
|
+
|
|
507
|
+
## 7.0.0-canary.125
|
|
508
|
+
|
|
509
|
+
### Major Changes
|
|
510
|
+
|
|
511
|
+
- 31f69de: fix(ai): carry prepareStep message overrides forward across steps
|
|
512
|
+
- 7c71ac6: fix(ai): limit response messages in StepResult to messages created in that step
|
|
513
|
+
|
|
514
|
+
### Patch Changes
|
|
515
|
+
|
|
516
|
+
- fd4f578: fix(ai): exclude request and response bodies from text generation results by default to reduce memory usage.
|
|
517
|
+
- c0c8ca2: fix(ai): remove deprecated LanguageModelUsage properties
|
|
518
|
+
- 5faf71c: feat: introduce responseMessages on GenerateTextResult and StreamTextResult
|
|
519
|
+
- 69254e0: feat(ai): add toolMetadata for tool specific metdata
|
|
520
|
+
- 3015fc3: feat: sandbox shell execution abstraction
|
|
521
|
+
- eee1166: feat(ai): expose initial and response messages in prepareStep
|
|
522
|
+
- 7dbf992: feat(ai): allow prepareStep to override sandbox per step
|
|
523
|
+
- Updated dependencies [69254e0]
|
|
524
|
+
- Updated dependencies [3015fc3]
|
|
525
|
+
- @ai-sdk/provider-utils@5.0.0-canary.34
|
|
526
|
+
- @ai-sdk/gateway@4.0.0-canary.72
|
|
527
|
+
|
|
528
|
+
## 7.0.0-canary.124
|
|
529
|
+
|
|
530
|
+
### Patch Changes
|
|
531
|
+
|
|
532
|
+
- 69aeb0e: feat: add deprecated tool call lifecycle callback aliases for AI SDK 6 compatibility.
|
|
533
|
+
- 48e92f3: feat: make include stable
|
|
534
|
+
|
|
535
|
+
## 7.0.0-canary.123
|
|
536
|
+
|
|
537
|
+
### Patch Changes
|
|
538
|
+
|
|
539
|
+
- 7392266: feat: move includeRawChunks to include.rawChunks
|
|
540
|
+
- 4bb4dbc: feat: introduce include.requestMessage option for step request message storage opt-in
|
|
541
|
+
|
|
542
|
+
## 7.0.0-canary.122
|
|
543
|
+
|
|
544
|
+
### Patch Changes
|
|
545
|
+
|
|
546
|
+
- 79b2468: feat: add request.messages to StepResult
|
|
547
|
+
- c22750c: fix(ai): move onToolExecutionStart and onToolExecutionEnd to stable
|
|
548
|
+
|
|
549
|
+
## 7.0.0-canary.121
|
|
550
|
+
|
|
551
|
+
### Patch Changes
|
|
552
|
+
|
|
553
|
+
- 2427d88: feat(ai): change Tool.sensitiveContext to telemetry.includeToolsContext and make it opt-in
|
|
554
|
+
- 5588abd: feat(ai): add experimental_refineToolInput option to ToolLoopAgent, generateText, streamText
|
|
555
|
+
- 6dd6b83: feat(ai): change sensitiveRuntimeContext to telemetry.includeRuntimeContext and make it opt-in
|
|
556
|
+
- Updated dependencies [2427d88]
|
|
557
|
+
- @ai-sdk/provider-utils@5.0.0-canary.33
|
|
558
|
+
- @ai-sdk/gateway@4.0.0-canary.71
|
|
559
|
+
|
|
560
|
+
## 7.0.0-canary.120
|
|
561
|
+
|
|
562
|
+
### Major Changes
|
|
563
|
+
|
|
564
|
+
- 5463d0d: feat(provider): align tool result output content file part types with top-level message file part types
|
|
565
|
+
|
|
566
|
+
### Patch Changes
|
|
567
|
+
|
|
568
|
+
- Updated dependencies [5463d0d]
|
|
569
|
+
- @ai-sdk/provider-utils@5.0.0-canary.32
|
|
570
|
+
- @ai-sdk/provider@4.0.0-canary.16
|
|
571
|
+
- @ai-sdk/gateway@4.0.0-canary.70
|
|
572
|
+
|
|
573
|
+
## 7.0.0-canary.119
|
|
574
|
+
|
|
575
|
+
### Patch Changes
|
|
576
|
+
|
|
577
|
+
- Updated dependencies [8e53eb7]
|
|
578
|
+
- @ai-sdk/gateway@4.0.0-canary.69
|
|
579
|
+
|
|
580
|
+
## 7.0.0-canary.118
|
|
581
|
+
|
|
582
|
+
### Patch Changes
|
|
583
|
+
|
|
584
|
+
- 47e65d6: fix(ai): tag step/chunk timeout aborts with `TimeoutError` reason
|
|
585
|
+
|
|
586
|
+
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'`.
|
|
587
|
+
|
|
588
|
+
## 7.0.0-canary.117
|
|
589
|
+
|
|
590
|
+
### Patch Changes
|
|
591
|
+
|
|
592
|
+
- 0c4c275: trigger initial canary release
|
|
593
|
+
- Updated dependencies [0c4c275]
|
|
594
|
+
- @ai-sdk/provider-utils@5.0.0-canary.31
|
|
595
|
+
- @ai-sdk/provider@4.0.0-canary.15
|
|
596
|
+
- @ai-sdk/gateway@4.0.0-canary.68
|
|
597
|
+
|
|
598
|
+
## 7.0.0-beta.116
|
|
599
|
+
|
|
600
|
+
### Patch Changes
|
|
601
|
+
|
|
602
|
+
- Updated dependencies [e7e8f42]
|
|
603
|
+
- @ai-sdk/gateway@4.0.0-beta.67
|
|
604
|
+
|
|
605
|
+
## 7.0.0-beta.115
|
|
606
|
+
|
|
607
|
+
### Patch Changes
|
|
608
|
+
|
|
609
|
+
- 08d2129: feat(mcp): propagate the server name through dynamic tool parts
|
|
610
|
+
- 202f107: feat(ai): create a diagnostics channel to push event data
|
|
611
|
+
- Updated dependencies [08d2129]
|
|
612
|
+
- Updated dependencies [04e9009]
|
|
613
|
+
- Updated dependencies [be09425]
|
|
614
|
+
- @ai-sdk/provider-utils@5.0.0-beta.30
|
|
615
|
+
- @ai-sdk/gateway@4.0.0-beta.66
|
|
616
|
+
|
|
617
|
+
## 7.0.0-beta.114
|
|
618
|
+
|
|
619
|
+
### Major Changes
|
|
620
|
+
|
|
621
|
+
- 1f7db50: fix(ai): remove experimental_customProvider
|
|
622
|
+
- 9bd6512: feat(provider): change file part data property to be tagged with a type and remove the image part type
|
|
623
|
+
|
|
624
|
+
### Patch Changes
|
|
625
|
+
|
|
626
|
+
- 43a6750: fix(ai): preserve `allowSystemInMessages` across `streamText` retries
|
|
627
|
+
- 81caa5d: fix(ai): remove ExtractLiteralUnion export
|
|
628
|
+
- 258c093: chore: ensure consistent import handling and avoid import duplicates or cycles
|
|
629
|
+
- 6147cdf: fix(ai): fix auto-complete on provider registry and custom provider
|
|
630
|
+
- Updated dependencies [9bd6512]
|
|
631
|
+
- Updated dependencies [258c093]
|
|
632
|
+
- Updated dependencies [b6783da]
|
|
633
|
+
- @ai-sdk/provider-utils@5.0.0-beta.29
|
|
634
|
+
- @ai-sdk/provider@4.0.0-beta.14
|
|
635
|
+
- @ai-sdk/gateway@4.0.0-beta.65
|
|
636
|
+
|
|
637
|
+
## 7.0.0-beta.113
|
|
638
|
+
|
|
639
|
+
### Patch Changes
|
|
640
|
+
|
|
641
|
+
- 9f0e36c: trigger release for all packages after provenance setup
|
|
642
|
+
- Updated dependencies [9f0e36c]
|
|
643
|
+
- @ai-sdk/gateway@4.0.0-beta.64
|
|
644
|
+
- @ai-sdk/provider@4.0.0-beta.13
|
|
645
|
+
- @ai-sdk/provider-utils@5.0.0-beta.28
|
|
646
|
+
|
|
647
|
+
## 7.0.0-beta.112
|
|
648
|
+
|
|
649
|
+
### Major Changes
|
|
650
|
+
|
|
651
|
+
- cf93359: feat(ai): remove/refactor event data sent via callbacks
|
|
652
|
+
- 116c89f: feat(ai): remove telemetry data from the user-facing event data
|
|
653
|
+
- 4e095b0: fix(ai): reject system messages in messages or prompt by default (opt-in)
|
|
654
|
+
|
|
655
|
+
### Patch Changes
|
|
656
|
+
|
|
657
|
+
- 5f3749c: refactoring: rename toolNeedsApproval to toolApproval
|
|
658
|
+
- 0a51f7d: fix(ai): enforce `callOptionsSchema` at runtime in `ToolLoopAgent`
|
|
659
|
+
|
|
660
|
+
`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.
|
|
661
|
+
|
|
662
|
+
`ToolLoopAgent.prepareCall` now validates caller-supplied `options` against `callOptionsSchema` (when set) via `safeValidateTypes`, throwing `InvalidArgumentError` on failure before forwarding to `prepareCall` / `generateText` / `streamText`.
|
|
663
|
+
|
|
664
|
+
- 71d3022: fix(ai): unify generate text event callbacks
|
|
665
|
+
- 67df0a0: feat: add sensitiveContext property to Tool
|
|
666
|
+
- 4181cfe: fix(ai): harden `getMediaTypeFromUrl` against prototype-property collisions
|
|
667
|
+
|
|
668
|
+
`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.
|
|
669
|
+
|
|
670
|
+
Switch to `Object.hasOwn(...)` so attacker-controlled extensions like `.constructor` cannot resolve to inherited `Object.prototype` keys.
|
|
671
|
+
|
|
672
|
+
- 51ce232: feat(ai): add sensitiveRuntimeContext option
|
|
673
|
+
- befb78c: refactoring: remove real-time delays in unit tests
|
|
674
|
+
- 29d8cf4: feat(ai): rename the core-event types
|
|
675
|
+
- 58a2ad7: fix: more precise default message for tool execution denial
|
|
676
|
+
- 37d69b2: feat(ai): access runtime context in tool approval functions
|
|
677
|
+
- 1043274: feat(ai): add a ModelCall start/end event
|
|
678
|
+
- 7f59f04: feat(ai): add approval reason to automatic tool approvals
|
|
679
|
+
- 7677c1e: feat(ai): allow tool approval functions to return undefined
|
|
680
|
+
- f58f9bc: fix(ai): remove stopWhen from onStart event
|
|
681
|
+
- e1bfb9c: feat(ai): remove unnecessary data from events
|
|
682
|
+
- e87d71b: feat(ai): support automatic tool approval in ui messages
|
|
683
|
+
- 9d486aa: feat(ai): generic tool approval function
|
|
684
|
+
- 9b0bc8a: fix(mcp): prevent prototype pollution by using secureJsonParse
|
|
685
|
+
- fc92055: feat(ai): automatic tool approval
|
|
686
|
+
- Updated dependencies [785fe16]
|
|
687
|
+
- Updated dependencies [67df0a0]
|
|
688
|
+
- Updated dependencies [befb78c]
|
|
689
|
+
- Updated dependencies [0458559]
|
|
690
|
+
- Updated dependencies [5852c0a]
|
|
691
|
+
- Updated dependencies [baa5f20]
|
|
692
|
+
- Updated dependencies [fc92055]
|
|
693
|
+
- Updated dependencies [f9acbc0]
|
|
694
|
+
- @ai-sdk/provider-utils@5.0.0-beta.27
|
|
695
|
+
- @ai-sdk/gateway@4.0.0-beta.63
|
|
696
|
+
|
|
697
|
+
## 7.0.0-beta.111
|
|
698
|
+
|
|
699
|
+
### Major Changes
|
|
700
|
+
|
|
701
|
+
- 1949571: feat(ai): make experimental_telemetry stable
|
|
702
|
+
- 6542d93: feat(ai): change naming nomenclature for `*TelemetryIntegration` to `*Telemetry`
|
|
703
|
+
|
|
704
|
+
### Patch Changes
|
|
705
|
+
|
|
706
|
+
- f319fde: feat(ai): validate tool context against contextSchema at runtime
|
|
707
|
+
|
|
708
|
+
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`.
|
|
709
|
+
|
|
710
|
+
- 511902c: skip validation for tool parts in terminal states when tool schema is no longer registered
|
|
711
|
+
- 2e98477: fix: retain stack traces on async errors
|
|
712
|
+
- 876fd3e: fix(ai): limit tool execution time duration to actual tool execution
|
|
713
|
+
- f32c750: refactoring(ai): simplify mergeAbortSignals
|
|
714
|
+
- Updated dependencies [2e98477]
|
|
715
|
+
- @ai-sdk/provider-utils@5.0.0-beta.26
|
|
716
|
+
- @ai-sdk/gateway@4.0.0-beta.62
|
|
717
|
+
|
|
718
|
+
## 7.0.0-beta.110
|
|
719
|
+
|
|
720
|
+
### Patch Changes
|
|
721
|
+
|
|
722
|
+
- 72cb801: feat(ai): concurrent event notification
|
|
723
|
+
|
|
724
|
+
## 7.0.0-beta.109
|
|
725
|
+
|
|
726
|
+
### Patch Changes
|
|
727
|
+
|
|
728
|
+
- ec98264: feat(ai): allow multiple integrations to be registered at once
|
|
729
|
+
- eea8d98: refactoring: rename tool execution events
|
|
730
|
+
- 75ef93e: remove the deprecated `experimental_output` alias and document the `output` migration for AI SDK 7
|
|
731
|
+
- Updated dependencies [eea8d98]
|
|
732
|
+
- @ai-sdk/provider-utils@5.0.0-beta.25
|
|
733
|
+
- @ai-sdk/gateway@4.0.0-beta.61
|
|
734
|
+
|
|
735
|
+
## 7.0.0-beta.108
|
|
736
|
+
|
|
737
|
+
### Patch Changes
|
|
738
|
+
|
|
739
|
+
- Updated dependencies [f807e45]
|
|
740
|
+
- @ai-sdk/provider-utils@5.0.0-beta.24
|
|
741
|
+
- @ai-sdk/gateway@4.0.0-beta.60
|
|
742
|
+
|
|
743
|
+
## 7.0.0-beta.107
|
|
744
|
+
|
|
745
|
+
### Patch Changes
|
|
746
|
+
|
|
747
|
+
- 350ea38: refactoring: introduce Arrayable type
|
|
748
|
+
- Updated dependencies [350ea38]
|
|
749
|
+
- @ai-sdk/provider-utils@5.0.0-beta.23
|
|
750
|
+
- @ai-sdk/gateway@4.0.0-beta.59
|
|
751
|
+
|
|
752
|
+
## 7.0.0-beta.106
|
|
753
|
+
|
|
754
|
+
### Patch Changes
|
|
755
|
+
|
|
756
|
+
- Updated dependencies [03dc15c]
|
|
757
|
+
- @ai-sdk/gateway@4.0.0-beta.58
|
|
758
|
+
|
|
759
|
+
## 7.0.0-beta.105
|
|
760
|
+
|
|
761
|
+
### Patch Changes
|
|
762
|
+
|
|
763
|
+
- 33d099c: fix(ai): omit reasoning-start/end when sendReasoning is false
|
|
764
|
+
|
|
765
|
+
## 7.0.0-beta.104
|
|
766
|
+
|
|
767
|
+
### Patch Changes
|
|
768
|
+
|
|
769
|
+
- 2a74d43: Remove the deprecated `experimental_prepareStep` option from `generateText`.
|
|
770
|
+
|
|
771
|
+
Use `prepareStep` instead.
|
|
772
|
+
|
|
773
|
+
## 7.0.0-beta.103
|
|
774
|
+
|
|
775
|
+
### Patch Changes
|
|
776
|
+
|
|
777
|
+
- 382d53b: refactoring: rename context to runtimeContext
|
|
778
|
+
- 7bf7d7f: feat(ai): enable:true for telemetry by default
|
|
779
|
+
- c3d4019: chore(ai): rename 'TelemetrySettings' to 'TelemetryOptions'
|
|
780
|
+
- 083947b: feat(ai): separate toolsContext from context
|
|
781
|
+
- Updated dependencies [083947b]
|
|
782
|
+
- @ai-sdk/provider-utils@5.0.0-beta.22
|
|
783
|
+
- @ai-sdk/gateway@4.0.0-beta.57
|
|
784
|
+
|
|
785
|
+
## 7.0.0-beta.102
|
|
786
|
+
|
|
787
|
+
### Patch Changes
|
|
788
|
+
|
|
789
|
+
- Updated dependencies [0d8f107]
|
|
790
|
+
- @ai-sdk/gateway@4.0.0-beta.56
|
|
791
|
+
|
|
792
|
+
## 7.0.0-beta.101
|
|
793
|
+
|
|
794
|
+
### Patch Changes
|
|
795
|
+
|
|
796
|
+
- 4873966: chore(ai): allow general usage of `logWarnings` and emit them via Node API when available
|
|
797
|
+
|
|
798
|
+
## 7.0.0-beta.100
|
|
799
|
+
|
|
800
|
+
### Patch Changes
|
|
801
|
+
|
|
802
|
+
- add1126: refactoring: executeTool uses tool as parameter
|
|
803
|
+
- Updated dependencies [add1126]
|
|
804
|
+
- @ai-sdk/provider-utils@5.0.0-beta.21
|
|
805
|
+
- @ai-sdk/gateway@4.0.0-beta.55
|
|
806
|
+
|
|
807
|
+
## 7.0.0-beta.99
|
|
808
|
+
|
|
809
|
+
### Patch Changes
|
|
810
|
+
|
|
811
|
+
- 2a9c144: feat(ai): add toolNeedsApproval option
|
|
812
|
+
|
|
813
|
+
## 7.0.0-beta.98
|
|
814
|
+
|
|
815
|
+
### Patch Changes
|
|
816
|
+
|
|
817
|
+
- Updated dependencies [5df9b6f]
|
|
818
|
+
- @ai-sdk/gateway@4.0.0-beta.54
|
|
819
|
+
|
|
820
|
+
## 7.0.0-beta.97
|
|
821
|
+
|
|
822
|
+
### Patch Changes
|
|
823
|
+
|
|
824
|
+
- 208d045: fix(ai): skip global telemetry registration when local integration defined
|
|
825
|
+
|
|
826
|
+
## 7.0.0-beta.96
|
|
827
|
+
|
|
828
|
+
### Patch Changes
|
|
829
|
+
|
|
830
|
+
- Updated dependencies [0457e45]
|
|
831
|
+
- @ai-sdk/gateway@4.0.0-beta.53
|
|
832
|
+
|
|
833
|
+
## 7.0.0-beta.95
|
|
834
|
+
|
|
835
|
+
### Patch Changes
|
|
836
|
+
|
|
837
|
+
- c4f4b5f: refactoring(ai): remove deprecated experimental_activeTools option
|
|
838
|
+
|
|
839
|
+
## 7.0.0-beta.94
|
|
840
|
+
|
|
841
|
+
### Patch Changes
|
|
842
|
+
|
|
843
|
+
- 1582efa: chore(ai): remove the metadata field from the telemetry settings
|
|
844
|
+
|
|
845
|
+
## 7.0.0-beta.93
|
|
846
|
+
|
|
847
|
+
### Patch Changes
|
|
848
|
+
|
|
849
|
+
- bc47739: chore(ai): cleanup telemetry event data
|
|
850
|
+
|
|
851
|
+
## 7.0.0-beta.92
|
|
852
|
+
|
|
853
|
+
### Patch Changes
|
|
854
|
+
|
|
855
|
+
- Updated dependencies [ba2e254]
|
|
856
|
+
- @ai-sdk/gateway@4.0.0-beta.52
|
|
857
|
+
|
|
858
|
+
## 7.0.0-beta.91
|
|
859
|
+
|
|
860
|
+
### Patch Changes
|
|
861
|
+
|
|
862
|
+
- Updated dependencies [cdcdec2]
|
|
863
|
+
- @ai-sdk/gateway@4.0.0-beta.51
|
|
864
|
+
|
|
865
|
+
## 7.0.0-beta.90
|
|
866
|
+
|
|
867
|
+
### Patch Changes
|
|
868
|
+
|
|
869
|
+
- 1db29c8: feat(ai): break `CallSettings` apart into `LanguageModelCallOptions` and `RequestOptions`
|
|
870
|
+
|
|
871
|
+
## 7.0.0-beta.89
|
|
872
|
+
|
|
873
|
+
### Patch Changes
|
|
874
|
+
|
|
875
|
+
- ff5eba1: feat: roll `image-*` tool output types into their equivalent `file-*` types
|
|
876
|
+
- Updated dependencies [b3976a2]
|
|
877
|
+
- Updated dependencies [ff5eba1]
|
|
878
|
+
- @ai-sdk/provider-utils@5.0.0-beta.20
|
|
879
|
+
- @ai-sdk/gateway@4.0.0-beta.50
|
|
880
|
+
- @ai-sdk/provider@4.0.0-beta.12
|
|
881
|
+
|
|
882
|
+
## 7.0.0-beta.88
|
|
883
|
+
|
|
884
|
+
### Major Changes
|
|
885
|
+
|
|
886
|
+
- ef992f8: Remove CommonJS exports from all packages. All packages are now ESM-only (`"type": "module"`). Consumers using `require()` must switch to ESM `import` syntax.
|
|
887
|
+
|
|
888
|
+
### Patch Changes
|
|
889
|
+
|
|
890
|
+
- Updated dependencies [ef992f8]
|
|
891
|
+
- @ai-sdk/gateway@4.0.0-beta.49
|
|
892
|
+
- @ai-sdk/provider@4.0.0-beta.11
|
|
893
|
+
- @ai-sdk/provider-utils@5.0.0-beta.19
|
|
894
|
+
|
|
895
|
+
## 7.0.0-beta.87
|
|
896
|
+
|
|
897
|
+
### Patch Changes
|
|
898
|
+
|
|
899
|
+
- Updated dependencies [bdbd322]
|
|
900
|
+
- Updated dependencies [8f53ccf]
|
|
901
|
+
- @ai-sdk/gateway@4.0.0-beta.48
|
|
902
|
+
|
|
903
|
+
## 7.0.0-beta.86
|
|
904
|
+
|
|
905
|
+
### Patch Changes
|
|
906
|
+
|
|
907
|
+
- 5a6f514: feat(ai): support several tools in hasToolCall stop condition
|
|
908
|
+
|
|
909
|
+
## 7.0.0-beta.85
|
|
910
|
+
|
|
911
|
+
### Major Changes
|
|
912
|
+
|
|
913
|
+
- 57bf606: chore(ai): simplify unified telemetry creation
|
|
914
|
+
|
|
915
|
+
## 7.0.0-beta.84
|
|
916
|
+
|
|
917
|
+
### Patch Changes
|
|
918
|
+
|
|
919
|
+
- 90e2d8a: chore: fix unused vars not being flagged by our lint tooling
|
|
920
|
+
- Updated dependencies [90e2d8a]
|
|
921
|
+
- @ai-sdk/provider-utils@5.0.0-beta.18
|
|
922
|
+
- @ai-sdk/gateway@4.0.0-beta.47
|
|
923
|
+
|
|
924
|
+
## 7.0.0-beta.83
|
|
925
|
+
|
|
926
|
+
### Patch Changes
|
|
927
|
+
|
|
928
|
+
- Updated dependencies [6b0a40d]
|
|
929
|
+
- @ai-sdk/gateway@4.0.0-beta.46
|
|
930
|
+
|
|
931
|
+
## 7.0.0-beta.82
|
|
932
|
+
|
|
933
|
+
### Patch Changes
|
|
934
|
+
|
|
935
|
+
- e27ed76: feat(devtools): add new devtools integration for telemetry
|
|
936
|
+
|
|
937
|
+
## 7.0.0-beta.81
|
|
938
|
+
|
|
939
|
+
### Patch Changes
|
|
940
|
+
|
|
941
|
+
- 2fe1099: feat(ai): emit streaming chunks throught the onChunk callback
|
|
942
|
+
- f04adcb: feat(ai): refresh `customProvider` and `createProviderRegistry` to support file and skill upload abstractions
|
|
943
|
+
|
|
944
|
+
## 7.0.0-beta.80
|
|
945
|
+
|
|
946
|
+
### Patch Changes
|
|
947
|
+
|
|
948
|
+
- 3ae1786: fix: better context type inference
|
|
949
|
+
- Updated dependencies [3ae1786]
|
|
950
|
+
- @ai-sdk/provider-utils@5.0.0-beta.17
|
|
951
|
+
- @ai-sdk/gateway@4.0.0-beta.45
|
|
952
|
+
|
|
953
|
+
## 7.0.0-beta.79
|
|
954
|
+
|
|
955
|
+
### Patch Changes
|
|
956
|
+
|
|
957
|
+
- 6866afe: fix(ai): fix `lastAssistantMessageIsCompleteWithApprovalResponses` to no longer ignore `providerExecuted` tool approvals
|
|
958
|
+
|
|
959
|
+
## 7.0.0-beta.78
|
|
960
|
+
|
|
961
|
+
### Patch Changes
|
|
962
|
+
|
|
963
|
+
- f372547: fix(ai): fix `providerExecuted` tool approvals being passed to language model twice
|
|
964
|
+
- Updated dependencies [7943a4b]
|
|
965
|
+
- @ai-sdk/gateway@4.0.0-beta.44
|
|
966
|
+
|
|
967
|
+
## 7.0.0-beta.77
|
|
968
|
+
|
|
969
|
+
### Patch Changes
|
|
970
|
+
|
|
971
|
+
- 2add429: fix(ai): skip passing invalid JSON inputs to response messages
|
|
972
|
+
|
|
973
|
+
## 7.0.0-beta.76
|
|
974
|
+
|
|
975
|
+
### Major Changes
|
|
976
|
+
|
|
977
|
+
- fcc6869: refactor(ai/core): rename `ModelCallStreamPart` to `LanguageModelStreamPart` and align stream model call naming (`streamLanguageModelCall`, `experimental_streamLanguageModelCall`).
|
|
978
|
+
|
|
979
|
+
This updates experimental low-level stream primitives to use "language model call" terminology consistently.
|
|
980
|
+
|
|
981
|
+
## 7.0.0-beta.75
|
|
982
|
+
|
|
983
|
+
### Patch Changes
|
|
984
|
+
|
|
985
|
+
- 176466a: chore(provider): align V4 model return types to have their own definitions across all model interfaces
|
|
986
|
+
- Updated dependencies [176466a]
|
|
987
|
+
- @ai-sdk/provider@4.0.0-beta.10
|
|
988
|
+
- @ai-sdk/gateway@4.0.0-beta.43
|
|
989
|
+
- @ai-sdk/provider-utils@5.0.0-beta.16
|
|
990
|
+
|
|
991
|
+
## 7.0.0-beta.74
|
|
992
|
+
|
|
993
|
+
### Patch Changes
|
|
994
|
+
|
|
995
|
+
- e311194: feat(ai): allow passing provider instance to `uploadFile` and `uploadSkill` as shorthand
|
|
996
|
+
- Updated dependencies [e311194]
|
|
997
|
+
- @ai-sdk/provider@4.0.0-beta.9
|
|
998
|
+
- @ai-sdk/gateway@4.0.0-beta.42
|
|
999
|
+
- @ai-sdk/provider-utils@5.0.0-beta.15
|
|
1000
|
+
|
|
1001
|
+
## 7.0.0-beta.73
|
|
1002
|
+
|
|
1003
|
+
### Patch Changes
|
|
1004
|
+
|
|
1005
|
+
- Updated dependencies [1464561]
|
|
1006
|
+
- @ai-sdk/gateway@4.0.0-beta.41
|
|
1007
|
+
|
|
1008
|
+
## 7.0.0-beta.72
|
|
1009
|
+
|
|
1010
|
+
### Patch Changes
|
|
1011
|
+
|
|
1012
|
+
- 664a0eb: feat (ai/core): support plain string model IDs in `rerank()` function
|
|
1013
|
+
|
|
1014
|
+
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.
|
|
1015
|
+
|
|
1016
|
+
## 7.0.0-beta.71
|
|
1017
|
+
|
|
1018
|
+
### Patch Changes
|
|
1019
|
+
|
|
1020
|
+
- e68be55: fix(ai): skip stringifying text when streaming partial text
|
|
1021
|
+
- Updated dependencies [939171f]
|
|
1022
|
+
- @ai-sdk/gateway@4.0.0-beta.40
|
|
1023
|
+
|
|
1024
|
+
## 7.0.0-beta.70
|
|
1025
|
+
|
|
1026
|
+
### Patch Changes
|
|
1027
|
+
|
|
1028
|
+
- Updated dependencies [0694029]
|
|
1029
|
+
- @ai-sdk/gateway@4.0.0-beta.39
|
|
1030
|
+
|
|
1031
|
+
## 7.0.0-beta.69
|
|
1032
|
+
|
|
1033
|
+
### Major Changes
|
|
1034
|
+
|
|
1035
|
+
- 72223e7: chore(ai): remove deprecated isToolOrDynamicToolUIPart function
|
|
1036
|
+
|
|
1037
|
+
### Patch Changes
|
|
1038
|
+
|
|
1039
|
+
- 34bd95d: feat(ai): add support for uploading provider skills using the provider references abstraction
|
|
1040
|
+
- 008271d: feat(openai-compatible): emit warning when using kebab-case instead of camelCase
|
|
1041
|
+
- Updated dependencies [34bd95d]
|
|
1042
|
+
- Updated dependencies [008271d]
|
|
1043
|
+
- @ai-sdk/provider@4.0.0-beta.8
|
|
1044
|
+
- @ai-sdk/gateway@4.0.0-beta.38
|
|
1045
|
+
- @ai-sdk/provider-utils@5.0.0-beta.14
|
|
1046
|
+
|
|
1047
|
+
## 7.0.0-beta.68
|
|
1048
|
+
|
|
1049
|
+
### Major Changes
|
|
1050
|
+
|
|
1051
|
+
- 7e26e81: chore: rename experimental_context to context
|
|
1052
|
+
|
|
1053
|
+
### Patch Changes
|
|
1054
|
+
|
|
1055
|
+
- b0c2869: chore(ai): remove deprecated `media` type part from `ToolResultOutput`
|
|
1056
|
+
- Updated dependencies [b0c2869]
|
|
1057
|
+
- Updated dependencies [7e26e81]
|
|
1058
|
+
- @ai-sdk/provider-utils@5.0.0-beta.13
|
|
1059
|
+
- @ai-sdk/gateway@4.0.0-beta.37
|
|
1060
|
+
|
|
1061
|
+
## 7.0.0-beta.67
|
|
1062
|
+
|
|
1063
|
+
### Patch Changes
|
|
1064
|
+
|
|
1065
|
+
- d1a8bed: fix(ui): export `isDynamicToolUIPart` from `ai` package
|
|
1066
|
+
|
|
1067
|
+
## 7.0.0-beta.66
|
|
1068
|
+
|
|
1069
|
+
### Patch Changes
|
|
1070
|
+
|
|
1071
|
+
- Updated dependencies [fb0c233]
|
|
1072
|
+
- Updated dependencies [d1f0d2b]
|
|
1073
|
+
- @ai-sdk/gateway@4.0.0-beta.36
|
|
1074
|
+
|
|
1075
|
+
## 7.0.0-beta.65
|
|
1076
|
+
|
|
1077
|
+
### Patch Changes
|
|
1078
|
+
|
|
1079
|
+
- Updated dependencies [46d1149]
|
|
1080
|
+
- @ai-sdk/provider-utils@5.0.0-beta.12
|
|
1081
|
+
- @ai-sdk/gateway@4.0.0-beta.35
|
|
1082
|
+
|
|
1083
|
+
## 7.0.0-beta.64
|
|
1084
|
+
|
|
1085
|
+
### Patch Changes
|
|
1086
|
+
|
|
1087
|
+
- Updated dependencies [71b0e7d]
|
|
1088
|
+
- @ai-sdk/gateway@4.0.0-beta.34
|
|
1089
|
+
|
|
1090
|
+
## 7.0.0-beta.63
|
|
1091
|
+
|
|
1092
|
+
### Patch Changes
|
|
1093
|
+
|
|
1094
|
+
- 6fd51c0: fix(provider): preserve error type prefix in getErrorMessage
|
|
1095
|
+
- Updated dependencies [6fd51c0]
|
|
1096
|
+
- @ai-sdk/provider-utils@5.0.0-beta.11
|
|
1097
|
+
- @ai-sdk/provider@4.0.0-beta.7
|
|
1098
|
+
- @ai-sdk/gateway@4.0.0-beta.33
|
|
1099
|
+
|
|
1100
|
+
## 7.0.0-beta.62
|
|
1101
|
+
|
|
1102
|
+
### Patch Changes
|
|
1103
|
+
|
|
1104
|
+
- Updated dependencies [11746ca]
|
|
1105
|
+
- @ai-sdk/gateway@4.0.0-beta.32
|
|
1106
|
+
|
|
1107
|
+
## 7.0.0-beta.61
|
|
1108
|
+
|
|
1109
|
+
### Patch Changes
|
|
1110
|
+
|
|
1111
|
+
- c29a26f: feat(provider): add support for provider references and uploading files as supported per provider
|
|
1112
|
+
- Updated dependencies [c29a26f]
|
|
1113
|
+
- @ai-sdk/provider-utils@5.0.0-beta.10
|
|
1114
|
+
- @ai-sdk/provider@4.0.0-beta.6
|
|
1115
|
+
- @ai-sdk/gateway@4.0.0-beta.31
|
|
1116
|
+
|
|
1117
|
+
## 7.0.0-beta.60
|
|
1118
|
+
|
|
1119
|
+
### Patch Changes
|
|
1120
|
+
|
|
1121
|
+
- 38fc777: Add AI Gateway hint to provider READMEs
|
|
1122
|
+
|
|
1123
|
+
## 7.0.0-beta.59
|
|
1124
|
+
|
|
1125
|
+
### Patch Changes
|
|
1126
|
+
|
|
1127
|
+
- Updated dependencies [4552cbf]
|
|
1128
|
+
- @ai-sdk/gateway@4.0.0-beta.30
|
|
1129
|
+
|
|
1130
|
+
## 7.0.0-beta.58
|
|
1131
|
+
|
|
1132
|
+
### Patch Changes
|
|
1133
|
+
|
|
1134
|
+
- 2e17091: fix(types): move shared tool set utility types into provider-utils
|
|
1135
|
+
|
|
1136
|
+
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.
|
|
1137
|
+
|
|
1138
|
+
- Updated dependencies [2e17091]
|
|
1139
|
+
- @ai-sdk/provider-utils@5.0.0-beta.9
|
|
1140
|
+
- @ai-sdk/gateway@4.0.0-beta.29
|
|
1141
|
+
|
|
1142
|
+
## 7.0.0-beta.57
|
|
1143
|
+
|
|
1144
|
+
### Major Changes
|
|
1145
|
+
|
|
1146
|
+
- 986c6fd: feat(ai): change type of experimental_context from unknown to generic
|
|
1147
|
+
- 493295c: Remove the deprecated `ToolCallOptions` export.
|
|
1148
|
+
|
|
1149
|
+
Use `ToolExecutionOptions` instead.
|
|
1150
|
+
|
|
1151
|
+
### Patch Changes
|
|
1152
|
+
|
|
1153
|
+
- Updated dependencies [986c6fd]
|
|
1154
|
+
- Updated dependencies [493295c]
|
|
1155
|
+
- @ai-sdk/provider-utils@5.0.0-beta.8
|
|
1156
|
+
- @ai-sdk/gateway@4.0.0-beta.28
|
|
1157
|
+
|
|
1158
|
+
## 7.0.0-beta.56
|
|
1159
|
+
|
|
1160
|
+
### Patch Changes
|
|
1161
|
+
|
|
1162
|
+
- Updated dependencies [70a9aae]
|
|
1163
|
+
- @ai-sdk/gateway@4.0.0-beta.27
|
|
1164
|
+
|
|
1165
|
+
## 7.0.0-beta.55
|
|
1166
|
+
|
|
1167
|
+
### Major Changes
|
|
1168
|
+
|
|
1169
|
+
- b3c9f6a: feat(ai): create new opentelemetry package (@ai-sdk/otel)
|
|
1170
|
+
|
|
1171
|
+
## 7.0.0-beta.54
|
|
1172
|
+
|
|
1173
|
+
### Patch Changes
|
|
1174
|
+
|
|
1175
|
+
- 5d0f18e: feat(ai): move opentelemetry to new package
|
|
1176
|
+
|
|
1177
|
+
## 7.0.0-beta.53
|
|
1178
|
+
|
|
1179
|
+
### Patch Changes
|
|
1180
|
+
|
|
1181
|
+
- 9b47dea: fix(ai): remove otel Tracer api from telemetry settings
|
|
1182
|
+
|
|
1183
|
+
## 7.0.0-beta.52
|
|
1184
|
+
|
|
1185
|
+
### Patch Changes
|
|
1186
|
+
|
|
1187
|
+
- b56301c: feat(ai): decouple otel from generate/streamObject
|
|
1188
|
+
|
|
1189
|
+
## 7.0.0-beta.51
|
|
1190
|
+
|
|
1191
|
+
### Patch Changes
|
|
1192
|
+
|
|
1193
|
+
- 6abd098: split `prepareToolsAndToolChoice()` into `prepareTools()` and `prepareToolChoice()`
|
|
1194
|
+
|
|
1195
|
+
## 7.0.0-beta.50
|
|
1196
|
+
|
|
1197
|
+
### Patch Changes
|
|
1198
|
+
|
|
1199
|
+
- 3debdb7: feat(ai): rename `stepCountIs` to `isStepCount`
|
|
1200
|
+
|
|
1201
|
+
## 7.0.0-beta.49
|
|
1202
|
+
|
|
1203
|
+
### Patch Changes
|
|
1204
|
+
|
|
1205
|
+
- Updated dependencies [294cbe7]
|
|
1206
|
+
- @ai-sdk/gateway@4.0.0-beta.26
|
|
1207
|
+
|
|
1208
|
+
## 7.0.0-beta.48
|
|
1209
|
+
|
|
1210
|
+
### Patch Changes
|
|
1211
|
+
|
|
1212
|
+
- 5c4d910: feat(ai): add new `isLoopFinished` stop condition helper for unlimited steps
|
|
1213
|
+
|
|
1214
|
+
## 7.0.0-beta.47
|
|
1215
|
+
|
|
1216
|
+
### Patch Changes
|
|
1217
|
+
|
|
1218
|
+
- bc67b4f: feat(ai): add experimental callbacks for structured outputs
|
|
1219
|
+
|
|
1220
|
+
## 7.0.0-beta.46
|
|
1221
|
+
|
|
1222
|
+
### Patch Changes
|
|
1223
|
+
|
|
1224
|
+
- 31ee822: refactoring(ai): extract filterActiveTools and expose it as experimental_filterActiveTools
|
|
1225
|
+
|
|
1226
|
+
## 7.0.0-beta.45
|
|
1227
|
+
|
|
1228
|
+
### Patch Changes
|
|
1229
|
+
|
|
1230
|
+
- Updated dependencies [435895b]
|
|
1231
|
+
- @ai-sdk/gateway@4.0.0-beta.25
|
|
1232
|
+
|
|
1233
|
+
## 7.0.0-beta.44
|
|
1234
|
+
|
|
1235
|
+
### Patch Changes
|
|
1236
|
+
|
|
1237
|
+
- Updated dependencies [d30466c]
|
|
1238
|
+
- @ai-sdk/gateway@4.0.0-beta.24
|
|
1239
|
+
|
|
1240
|
+
## 7.0.0-beta.43
|
|
1241
|
+
|
|
1242
|
+
### Patch Changes
|
|
1243
|
+
|
|
1244
|
+
- Updated dependencies [4ec78cd]
|
|
1245
|
+
- @ai-sdk/gateway@4.0.0-beta.23
|
|
1246
|
+
|
|
1247
|
+
## 7.0.0-beta.42
|
|
1248
|
+
|
|
1249
|
+
### Patch Changes
|
|
1250
|
+
|
|
1251
|
+
- a3fd75b: feat(ai): expose Experimental_ModelCallStreamPart type
|
|
1252
|
+
|
|
1253
|
+
## 7.0.0-beta.41
|
|
1254
|
+
|
|
1255
|
+
### Patch Changes
|
|
1256
|
+
|
|
1257
|
+
- Updated dependencies [7ceff62]
|
|
1258
|
+
- @ai-sdk/gateway@4.0.0-beta.22
|
|
1259
|
+
|
|
1260
|
+
## 7.0.0-beta.40
|
|
1261
|
+
|
|
1262
|
+
### Patch Changes
|
|
1263
|
+
|
|
1264
|
+
- 989d3d2: fix(ai): include generated files in OTEL response attributes
|
|
1265
|
+
|
|
1266
|
+
## 7.0.0-beta.39
|
|
1267
|
+
|
|
1268
|
+
### Patch Changes
|
|
1269
|
+
|
|
1270
|
+
- f4cfccd: feat(ai): decouple otel from rerank function
|
|
1271
|
+
|
|
1272
|
+
## 7.0.0-beta.38
|
|
1273
|
+
|
|
1274
|
+
### Patch Changes
|
|
1275
|
+
|
|
1276
|
+
- 1f509d4: fix(ai): force template check on 'kind' param
|
|
1277
|
+
- Updated dependencies [1f509d4]
|
|
1278
|
+
- @ai-sdk/provider-utils@5.0.0-beta.7
|
|
1279
|
+
- @ai-sdk/provider@4.0.0-beta.5
|
|
1280
|
+
- @ai-sdk/gateway@4.0.0-beta.21
|
|
1281
|
+
|
|
1282
|
+
## 7.0.0-beta.37
|
|
1283
|
+
|
|
1284
|
+
### Patch Changes
|
|
1285
|
+
|
|
1286
|
+
- Updated dependencies [4f91b5d]
|
|
1287
|
+
- @ai-sdk/gateway@4.0.0-beta.20
|
|
1288
|
+
|
|
1289
|
+
## 7.0.0-beta.36
|
|
1290
|
+
|
|
1291
|
+
### Patch Changes
|
|
1292
|
+
|
|
1293
|
+
- 118b953: feat(ai): decouple otel from embed functions
|
|
1294
|
+
|
|
1295
|
+
## 7.0.0-beta.35
|
|
1296
|
+
|
|
1297
|
+
### Patch Changes
|
|
1298
|
+
|
|
1299
|
+
- 99bf941: feat(ai): extract streamModelCall function for streaming text generation
|
|
1300
|
+
|
|
1301
|
+
## 7.0.0-beta.34
|
|
1302
|
+
|
|
1303
|
+
### Patch Changes
|
|
1304
|
+
|
|
1305
|
+
- Updated dependencies [72889f8]
|
|
1306
|
+
- @ai-sdk/gateway@4.0.0-beta.19
|
|
1307
|
+
|
|
1308
|
+
## 7.0.0-beta.33
|
|
1309
|
+
|
|
1310
|
+
### Patch Changes
|
|
1311
|
+
|
|
1312
|
+
- caf1b6f: feat(ai): introduce experimental callbacks for rerank function
|
|
1313
|
+
|
|
1314
|
+
## 7.0.0-beta.32
|
|
1315
|
+
|
|
1316
|
+
### Major Changes
|
|
1317
|
+
|
|
1318
|
+
- 4b46062: refactoring(ai): extract tool callback invocation into separate function and forward chunks before callback invocation
|
|
1319
|
+
|
|
1320
|
+
### Patch Changes
|
|
1321
|
+
|
|
1322
|
+
- Updated dependencies [165b97a]
|
|
1323
|
+
- @ai-sdk/gateway@4.0.0-beta.18
|
|
1324
|
+
|
|
1325
|
+
## 7.0.0-beta.31
|
|
1326
|
+
|
|
1327
|
+
### Patch Changes
|
|
1328
|
+
|
|
1329
|
+
- e79e644: chore(ai/core): remove `timeout` from `CallSettings` as it was effectively unused there
|
|
1330
|
+
|
|
1331
|
+
## 7.0.0-beta.30
|
|
1332
|
+
|
|
1333
|
+
### Patch Changes
|
|
1334
|
+
|
|
1335
|
+
- f5a6f89: README updates
|
|
1336
|
+
|
|
1337
|
+
## 7.0.0-beta.29
|
|
1338
|
+
|
|
1339
|
+
### Patch Changes
|
|
1340
|
+
|
|
1341
|
+
- 877bf12: fix(ai): flatten model attributes for telemetry
|
|
1342
|
+
|
|
1343
|
+
## 7.0.0-beta.28
|
|
1344
|
+
|
|
1345
|
+
### Major Changes
|
|
1346
|
+
|
|
1347
|
+
- b9cf502: refactoring(ai): delay tool execution in stream text until model call is finished
|
|
1348
|
+
|
|
1349
|
+
## 7.0.0-beta.27
|
|
1350
|
+
|
|
1351
|
+
### Patch Changes
|
|
1352
|
+
|
|
1353
|
+
- 3887c70: feat(provider): add new top-level reasoning parameter to spec and support it in `generateText` and `streamText`
|
|
1354
|
+
- Updated dependencies [3887c70]
|
|
1355
|
+
- @ai-sdk/provider-utils@5.0.0-beta.6
|
|
1356
|
+
- @ai-sdk/provider@4.0.0-beta.4
|
|
1357
|
+
- @ai-sdk/gateway@4.0.0-beta.17
|
|
1358
|
+
|
|
1359
|
+
## 7.0.0-beta.26
|
|
1360
|
+
|
|
1361
|
+
### Patch Changes
|
|
1362
|
+
|
|
1363
|
+
- f0b0b20: feat(ai): add per-tool timeout overrides via toolTimeouts
|
|
1364
|
+
|
|
1365
|
+
## 7.0.0-beta.25
|
|
1366
|
+
|
|
1367
|
+
### Patch Changes
|
|
1368
|
+
|
|
1369
|
+
- ff9ce30: feat(ai): introduce experimental callbacks for embed function
|
|
1370
|
+
|
|
1371
|
+
## 7.0.0-beta.24
|
|
1372
|
+
|
|
1373
|
+
### Major Changes
|
|
1374
|
+
|
|
1375
|
+
- 776b617: feat(provider): adding new 'custom' content type
|
|
1376
|
+
|
|
1377
|
+
### Patch Changes
|
|
1378
|
+
|
|
1379
|
+
- Updated dependencies [776b617]
|
|
1380
|
+
- @ai-sdk/provider-utils@5.0.0-beta.5
|
|
1381
|
+
- @ai-sdk/provider@4.0.0-beta.3
|
|
1382
|
+
- @ai-sdk/gateway@4.0.0-beta.16
|
|
1383
|
+
|
|
1384
|
+
## 7.0.0-beta.23
|
|
1385
|
+
|
|
1386
|
+
### Patch Changes
|
|
1387
|
+
|
|
1388
|
+
- 80d4dde: fix(ai): include tool input on tool result for provider executed dynamic tools
|
|
1389
|
+
- Updated dependencies [61753c3]
|
|
1390
|
+
- @ai-sdk/provider-utils@5.0.0-beta.4
|
|
1391
|
+
- @ai-sdk/gateway@4.0.0-beta.15
|
|
1392
|
+
|
|
1393
|
+
## 7.0.0-beta.22
|
|
1394
|
+
|
|
1395
|
+
### Patch Changes
|
|
1396
|
+
|
|
1397
|
+
- Updated dependencies [ead9144]
|
|
1398
|
+
- @ai-sdk/gateway@4.0.0-beta.14
|
|
1399
|
+
|
|
1400
|
+
## 7.0.0-beta.21
|
|
1401
|
+
|
|
1402
|
+
### Patch Changes
|
|
1403
|
+
|
|
1404
|
+
- 34fd051: feat(ai): add toolMs to timeout configuration
|
|
1405
|
+
|
|
1406
|
+
## 7.0.0-beta.20
|
|
1407
|
+
|
|
1408
|
+
### Patch Changes
|
|
1409
|
+
|
|
1410
|
+
- Updated dependencies [2095655]
|
|
1411
|
+
- @ai-sdk/gateway@4.0.0-beta.13
|
|
1412
|
+
|
|
1413
|
+
## 7.0.0-beta.19
|
|
1414
|
+
|
|
1415
|
+
### Patch Changes
|
|
1416
|
+
|
|
1417
|
+
- Updated dependencies [f7d4f01]
|
|
1418
|
+
- @ai-sdk/provider-utils@5.0.0-beta.3
|
|
1419
|
+
- @ai-sdk/provider@4.0.0-beta.2
|
|
1420
|
+
- @ai-sdk/gateway@4.0.0-beta.12
|
|
1421
|
+
|
|
1422
|
+
## 7.0.0-beta.18
|
|
1423
|
+
|
|
1424
|
+
### Patch Changes
|
|
1425
|
+
|
|
1426
|
+
- Updated dependencies [5c2a5a2]
|
|
1427
|
+
- @ai-sdk/provider@4.0.0-beta.1
|
|
1428
|
+
- @ai-sdk/gateway@4.0.0-beta.11
|
|
1429
|
+
- @ai-sdk/provider-utils@5.0.0-beta.2
|
|
1430
|
+
|
|
1431
|
+
## 7.0.0-beta.17
|
|
1432
|
+
|
|
1433
|
+
### Patch Changes
|
|
1434
|
+
|
|
1435
|
+
- Updated dependencies [4d6ab9a]
|
|
1436
|
+
- @ai-sdk/gateway@4.0.0-beta.10
|
|
1437
|
+
|
|
1438
|
+
## 7.0.0-beta.16
|
|
1439
|
+
|
|
1440
|
+
### Major Changes
|
|
1441
|
+
|
|
1442
|
+
- 5b8c58f: feat(ai): decouple otel from core functions
|
|
1443
|
+
|
|
3
1444
|
## 7.0.0-beta.15
|
|
4
1445
|
|
|
5
1446
|
### Patch Changes
|
|
@@ -640,7 +2081,6 @@
|
|
|
640
2081
|
### Patch Changes
|
|
641
2082
|
|
|
642
2083
|
- 2dc9bfa: fix(ai): handle provider-executed tools and tool-approval-response in validation
|
|
643
|
-
|
|
644
2084
|
- Skip validation for tool calls with `providerExecuted: true` (deferred results)
|
|
645
2085
|
- Map approvalId to toolCallId for proper tool-approval-response handling
|
|
646
2086
|
- Filter out empty tool messages after content filtering
|
|
@@ -974,13 +2414,13 @@
|
|
|
974
2414
|
Before
|
|
975
2415
|
|
|
976
2416
|
```ts
|
|
977
|
-
model.textEmbeddingModel(
|
|
2417
|
+
model.textEmbeddingModel("my-model-id");
|
|
978
2418
|
```
|
|
979
2419
|
|
|
980
2420
|
After
|
|
981
2421
|
|
|
982
2422
|
```ts
|
|
983
|
-
model.embeddingModel(
|
|
2423
|
+
model.embeddingModel("my-model-id");
|
|
984
2424
|
```
|
|
985
2425
|
|
|
986
2426
|
- b67d224: Fixes an issue where `providerMetadata` and `providerExecuted` were lost when tool input validation failed
|
|
@@ -1003,15 +2443,15 @@
|
|
|
1003
2443
|
This change replaces
|
|
1004
2444
|
|
|
1005
2445
|
```ts
|
|
1006
|
-
import { experimental_createMCPClient } from
|
|
1007
|
-
import { Experimental_StdioMCPTransport } from
|
|
2446
|
+
import { experimental_createMCPClient } from "ai";
|
|
2447
|
+
import { Experimental_StdioMCPTransport } from "ai/mcp-stdio";
|
|
1008
2448
|
```
|
|
1009
2449
|
|
|
1010
2450
|
with
|
|
1011
2451
|
|
|
1012
2452
|
```ts
|
|
1013
|
-
import { experimental_createMCPClient } from
|
|
1014
|
-
import { Experimental_StdioMCPTransport } from
|
|
2453
|
+
import { experimental_createMCPClient } from "@ai-sdk/mcp";
|
|
2454
|
+
import { Experimental_StdioMCPTransport } from "@ai-sdk/mcp/mcp-stdio";
|
|
1015
2455
|
```
|
|
1016
2456
|
|
|
1017
2457
|
- 90e5bdd: chore(ai): restructure agent files
|
|
@@ -1098,7 +2538,7 @@
|
|
|
1098
2538
|
- 81d4308: feat: provider-executed dynamic tools
|
|
1099
2539
|
- e0d1ea9: fix(ai): align logic of text-end with reasoning-end
|
|
1100
2540
|
- 2406576: chore(agent): rename messages property on agent ui stream functions to uiMessages
|
|
1101
|
-
- b1aeea7: feat(ai): set default stopWhen on Agent to
|
|
2541
|
+
- b1aeea7: feat(ai): set default stopWhen on Agent to isStepCount(20)
|
|
1102
2542
|
- dce4e7b: chore(agent): rename system to instructions
|
|
1103
2543
|
- 4ece5f9: feat(agent): add experimental_download to ToolLoopAgent
|
|
1104
2544
|
- a417a34: feat(agent): introduce version property
|
|
@@ -1531,13 +2971,13 @@
|
|
|
1531
2971
|
Before
|
|
1532
2972
|
|
|
1533
2973
|
```ts
|
|
1534
|
-
model.textEmbeddingModel(
|
|
2974
|
+
model.textEmbeddingModel("my-model-id");
|
|
1535
2975
|
```
|
|
1536
2976
|
|
|
1537
2977
|
After
|
|
1538
2978
|
|
|
1539
2979
|
```ts
|
|
1540
|
-
model.embeddingModel(
|
|
2980
|
+
model.embeddingModel("my-model-id");
|
|
1541
2981
|
```
|
|
1542
2982
|
|
|
1543
2983
|
- Updated dependencies [8d9e8ad]
|
|
@@ -1884,15 +3324,15 @@
|
|
|
1884
3324
|
This change replaces
|
|
1885
3325
|
|
|
1886
3326
|
```ts
|
|
1887
|
-
import { experimental_createMCPClient } from
|
|
1888
|
-
import { Experimental_StdioMCPTransport } from
|
|
3327
|
+
import { experimental_createMCPClient } from "ai";
|
|
3328
|
+
import { Experimental_StdioMCPTransport } from "ai/mcp-stdio";
|
|
1889
3329
|
```
|
|
1890
3330
|
|
|
1891
3331
|
with
|
|
1892
3332
|
|
|
1893
3333
|
```ts
|
|
1894
|
-
import { experimental_createMCPClient } from
|
|
1895
|
-
import { Experimental_StdioMCPTransport } from
|
|
3334
|
+
import { experimental_createMCPClient } from "@ai-sdk/mcp";
|
|
3335
|
+
import { Experimental_StdioMCPTransport } from "@ai-sdk/mcp/mcp-stdio";
|
|
1896
3336
|
```
|
|
1897
3337
|
|
|
1898
3338
|
## 6.0.0-beta.71
|
|
@@ -2274,7 +3714,7 @@
|
|
|
2274
3714
|
|
|
2275
3715
|
- aa0515c: feat(ai): move Agent to stable
|
|
2276
3716
|
- e7d9b00: feat(agent): add optional name property to agent
|
|
2277
|
-
- b1aeea7: feat(ai): set default stopWhen on Agent to
|
|
3717
|
+
- b1aeea7: feat(ai): set default stopWhen on Agent to isStepCount(20)
|
|
2278
3718
|
|
|
2279
3719
|
## 5.1.0-beta.18
|
|
2280
3720
|
|
|
@@ -2811,7 +4251,7 @@
|
|
|
2811
4251
|
|
|
2812
4252
|
```js
|
|
2813
4253
|
await generateImage({
|
|
2814
|
-
model: luma.image(
|
|
4254
|
+
model: luma.image("photon-flash-1", {
|
|
2815
4255
|
maxImagesPerCall: 5,
|
|
2816
4256
|
pollIntervalMillis: 500,
|
|
2817
4257
|
}),
|
|
@@ -2824,7 +4264,7 @@
|
|
|
2824
4264
|
|
|
2825
4265
|
```js
|
|
2826
4266
|
await generateImage({
|
|
2827
|
-
model: luma.image(
|
|
4267
|
+
model: luma.image("photon-flash-1"),
|
|
2828
4268
|
prompt,
|
|
2829
4269
|
n: 10,
|
|
2830
4270
|
maxImagesPerCall: 5,
|
|
@@ -2844,7 +4284,7 @@
|
|
|
2844
4284
|
- c7710a9: chore (ai): rename DataStreamToSSETransformStream to JsonToSseTransformStream
|
|
2845
4285
|
- bfbfc4c: feat (ai): streamText/generateText: totalUsage contains usage for all steps. usage is for a single step.
|
|
2846
4286
|
- 9ae327d: chore (ui): replace chat store concept with chat instances
|
|
2847
|
-
- 9315076: chore (ai): rename continueUntil to stopWhen. Rename maxSteps stop condition to
|
|
4287
|
+
- 9315076: chore (ai): rename continueUntil to stopWhen. Rename maxSteps stop condition to isStepCount.
|
|
2848
4288
|
- 247ee0c: chore (ai): remove steps from tool invocation ui parts
|
|
2849
4289
|
- 109c0ac: chore (ai): rename id to chatId (in post request, resume request, and useChat)
|
|
2850
4290
|
- 954aa73: feat (ui): extended regenerate support
|
|
@@ -3024,10 +4464,10 @@
|
|
|
3024
4464
|
The `experimental_generateImage` method from the `ai` package now returnes revised prompts for OpenAI's image models.
|
|
3025
4465
|
|
|
3026
4466
|
```js
|
|
3027
|
-
const prompt =
|
|
4467
|
+
const prompt = "Santa Claus driving a Cadillac";
|
|
3028
4468
|
|
|
3029
4469
|
const { providerMetadata } = await experimental_generateImage({
|
|
3030
|
-
model: openai.image(
|
|
4470
|
+
model: openai.image("dall-e-3"),
|
|
3031
4471
|
prompt,
|
|
3032
4472
|
});
|
|
3033
4473
|
|
|
@@ -3587,7 +5027,7 @@
|
|
|
3587
5027
|
### Major Changes
|
|
3588
5028
|
|
|
3589
5029
|
- 72d7d72: chore (ai): stable activeTools
|
|
3590
|
-
- 9315076: chore (ai): rename continueUntil to stopWhen. Rename maxSteps stop condition to
|
|
5030
|
+
- 9315076: chore (ai): rename continueUntil to stopWhen. Rename maxSteps stop condition to isStepCount.
|
|
3591
5031
|
|
|
3592
5032
|
### Patch Changes
|
|
3593
5033
|
|
|
@@ -3690,7 +5130,7 @@
|
|
|
3690
5130
|
|
|
3691
5131
|
```js
|
|
3692
5132
|
await generateImage({
|
|
3693
|
-
model: luma.image(
|
|
5133
|
+
model: luma.image("photon-flash-1", {
|
|
3694
5134
|
maxImagesPerCall: 5,
|
|
3695
5135
|
pollIntervalMillis: 500,
|
|
3696
5136
|
}),
|
|
@@ -3703,7 +5143,7 @@
|
|
|
3703
5143
|
|
|
3704
5144
|
```js
|
|
3705
5145
|
await generateImage({
|
|
3706
|
-
model: luma.image(
|
|
5146
|
+
model: luma.image("photon-flash-1"),
|
|
3707
5147
|
prompt,
|
|
3708
5148
|
n: 10,
|
|
3709
5149
|
maxImagesPerCall: 5,
|
|
@@ -3801,10 +5241,10 @@
|
|
|
3801
5241
|
The `experimental_generateImage` method from the `ai` package now returnes revised prompts for OpenAI's image models.
|
|
3802
5242
|
|
|
3803
5243
|
```js
|
|
3804
|
-
const prompt =
|
|
5244
|
+
const prompt = "Santa Claus driving a Cadillac";
|
|
3805
5245
|
|
|
3806
5246
|
const { providerMetadata } = await experimental_generateImage({
|
|
3807
|
-
model: openai.image(
|
|
5247
|
+
model: openai.image("dall-e-3"),
|
|
3808
5248
|
prompt,
|
|
3809
5249
|
});
|
|
3810
5250
|
|