ai 7.0.113 → 7.0.116
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 +32 -0
- package/README.md +6 -6
- package/dist/index.js +1010 -1289
- package/dist/index.js.map +1 -1
- package/dist/internal/index.js +231 -257
- package/dist/internal/index.js.map +1 -1
- package/docs/02-foundations/02-providers-and-models.mdx +3 -0
- package/docs/02-foundations/03-prompts.mdx +1 -1
- package/docs/02-foundations/04-tools.mdx +2 -2
- package/docs/02-foundations/06-provider-options.mdx +11 -11
- package/docs/02-getting-started/00-choosing-a-provider.mdx +4 -4
- package/docs/02-getting-started/02-nextjs-app-router.mdx +3 -3
- package/docs/02-getting-started/03-nextjs-pages-router.mdx +3 -3
- package/docs/02-getting-started/04-svelte.mdx +7 -7
- package/docs/02-getting-started/05-nuxt.mdx +7 -7
- package/docs/02-getting-started/06-nodejs.mdx +3 -3
- package/docs/02-getting-started/07-expo.mdx +3 -3
- package/docs/02-getting-started/08-tanstack-start.mdx +3 -3
- package/docs/02-getting-started/09-coding-agents.mdx +1 -1
- package/docs/03-agents/03-workflows.mdx +2 -2
- package/docs/03-agents/04-loop-control.mdx +1 -1
- package/docs/03-agents/05-configuring-call-options.mdx +4 -2
- package/docs/03-agents/06-memory.mdx +2 -2
- package/docs/03-agents/06-policy-tool-approvals.mdx +2 -2
- package/docs/03-agents/07-workflow-agent.mdx +11 -11
- package/docs/03-agents/08-terminal-ui.mdx +14 -10
- package/docs/03-ai-sdk-core/05-generating-text.mdx +2 -2
- package/docs/03-ai-sdk-core/15-tools-and-tool-calling.mdx +6 -1
- package/docs/03-ai-sdk-core/17-mcp-apps.mdx +1 -1
- package/docs/03-ai-sdk-core/20-prompt-engineering.mdx +1 -1
- package/docs/03-ai-sdk-core/26-reasoning.mdx +13 -12
- package/docs/03-ai-sdk-core/31-reranking.mdx +12 -10
- package/docs/03-ai-sdk-core/32-evaluation.mdx +1 -1
- package/docs/03-ai-sdk-core/35-image-generation.mdx +2 -2
- package/docs/03-ai-sdk-core/37-speech.mdx +6 -6
- package/docs/03-ai-sdk-core/39-file-uploads.mdx +1 -1
- package/docs/03-ai-sdk-core/41-skill-uploads.mdx +1 -1
- package/docs/03-ai-sdk-core/42-batch.mdx +1 -1
- package/docs/03-ai-sdk-core/45-provider-management.mdx +21 -21
- package/docs/03-ai-sdk-core/60-telemetry.mdx +1 -1
- package/docs/03-ai-sdk-core/65-devtools.mdx +3 -3
- package/docs/03-ai-sdk-core/65-lifecycle-callbacks.mdx +1 -1
- package/docs/03-ai-sdk-harnesses/02-harness-agent.mdx +97 -107
- package/docs/03-ai-sdk-harnesses/03-tools.mdx +1 -22
- package/docs/03-ai-sdk-harnesses/04-skills.mdx +0 -4
- package/docs/03-ai-sdk-harnesses/06-workflow-utilities.mdx +43 -9
- package/docs/03-ai-sdk-harnesses/07-ui.mdx +33 -30
- package/docs/03-ai-sdk-harnesses/08-terminal-ui.mdx +8 -6
- package/docs/04-ai-sdk-ui/02-chatbot.mdx +3 -3
- package/docs/04-ai-sdk-ui/03-chatbot-message-persistence.mdx +3 -3
- package/docs/04-ai-sdk-ui/03-chatbot-resume-streams.mdx +1 -1
- package/docs/05-ai-sdk-rsc/02-streaming-react-components.mdx +5 -5
- package/docs/05-ai-sdk-rsc/04-multistep-interfaces.mdx +1 -1
- package/docs/05-ai-sdk-rsc/06-loading-state.mdx +1 -1
- package/docs/05-ai-sdk-rsc/10-migrating-to-ui.mdx +3 -3
- package/docs/06-advanced/11-secure-url-fetching.mdx +39 -0
- package/docs/07-reference/01-ai-sdk-core/01-generate-text.mdx +5 -3
- package/docs/07-reference/01-ai-sdk-core/02-stream-text.mdx +5 -3
- package/docs/07-reference/01-ai-sdk-core/06-rerank.mdx +5 -5
- package/docs/07-reference/01-ai-sdk-core/11-transcribe.mdx +1 -1
- package/docs/07-reference/01-ai-sdk-core/12-generate-speech.mdx +2 -2
- package/docs/07-reference/01-ai-sdk-core/16-tool-loop-agent.mdx +4 -2
- package/docs/07-reference/01-ai-sdk-core/20-start-batch.mdx +1 -1
- package/docs/07-reference/01-ai-sdk-core/40-provider-registry.mdx +1 -1
- package/docs/07-reference/01-ai-sdk-core/42-custom-provider.mdx +4 -4
- package/docs/07-reference/01-ai-sdk-core/60-wrap-language-model.mdx +1 -1
- package/docs/07-reference/01-ai-sdk-core/61-wrap-image-model.mdx +1 -1
- package/docs/07-reference/02-ai-sdk-ui/50-direct-chat-transport.mdx +3 -3
- package/docs/07-reference/03-ai-sdk-rsc/01-stream-ui.mdx +1 -1
- package/docs/07-reference/04-ai-sdk-workflow/01-workflow-agent.mdx +8 -8
- package/docs/07-reference/06-ai-sdk-tui/01-run-agent-tui.mdx +13 -9
- package/docs/09-troubleshooting/11-use-chat-custom-request-options.mdx +3 -3
- package/docs/09-troubleshooting/13-repeated-assistant-messages.mdx +2 -2
- package/docs/09-troubleshooting/17-use-chat-stale-body-data.mdx +1 -1
- package/docs/09-troubleshooting/70-high-memory-usage-with-images.mdx +2 -2
- package/package.json +12 -12
- package/src/evaluate/evaluate.ts +1 -10
- package/src/generate-text/restricted-telemetry-dispatcher.ts +6 -58
- package/src/prompt/file-part-data.ts +9 -3
- package/src/prompt/standardize-prompt.ts +2 -0
- package/src/telemetry/create-telemetry-dispatcher.ts +58 -6
- package/src/telemetry/filter-included-context.ts +57 -2
- package/src/util/download/download.ts +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,37 @@
|
|
|
1
1
|
# ai
|
|
2
2
|
|
|
3
|
+
## 7.0.116
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- af9597b: Compile packages for ES2022 runtime target
|
|
8
|
+
- bc49f78: Preserve original opaque URI strings in tagged file URLs during prompt conversion. Match explicit supported URL MIME types exactly so unsupported subtypes are not forwarded to providers.
|
|
9
|
+
- Updated dependencies [af9597b]
|
|
10
|
+
- Updated dependencies [bc49f78]
|
|
11
|
+
- @ai-sdk/provider-utils@5.0.49
|
|
12
|
+
- @ai-sdk/gateway@4.0.94
|
|
13
|
+
|
|
14
|
+
## 7.0.115
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- be877ff: Use the new `fetchUntrustedUrl` helper for SDK downloads, preserving the existing
|
|
19
|
+
user-agent header and URL validation while enforcing first-hop credential isolation.
|
|
20
|
+
- Updated dependencies [80b9100]
|
|
21
|
+
- Updated dependencies [d3cc6ae]
|
|
22
|
+
- Updated dependencies [be877ff]
|
|
23
|
+
- @ai-sdk/gateway@4.0.93
|
|
24
|
+
- @ai-sdk/provider-utils@5.0.48
|
|
25
|
+
|
|
26
|
+
## 7.0.114
|
|
27
|
+
|
|
28
|
+
### Patch Changes
|
|
29
|
+
|
|
30
|
+
- b5679a7: fix(ai): filter tracing-channel context with telemetry allowlists
|
|
31
|
+
- ca31b89: Clarify in the prompt validation code that `allowSystemInMessages` permits all system messages, including instruction text.
|
|
32
|
+
- Updated dependencies [124b6ef]
|
|
33
|
+
- @ai-sdk/gateway@4.0.92
|
|
34
|
+
|
|
3
35
|
## 7.0.113
|
|
4
36
|
|
|
5
37
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -30,7 +30,7 @@ By default, the AI SDK uses the [Vercel AI Gateway](https://vercel.com/docs/ai-g
|
|
|
30
30
|
|
|
31
31
|
```ts
|
|
32
32
|
const result = await generateText({
|
|
33
|
-
model: 'anthropic/claude-opus-
|
|
33
|
+
model: 'anthropic/claude-opus-5.5', // or 'openai/gpt-6-astra', 'google/gemini-3.8-flash', etc.
|
|
34
34
|
prompt: 'Hello!',
|
|
35
35
|
});
|
|
36
36
|
```
|
|
@@ -45,7 +45,7 @@ npm install @ai-sdk/openai @ai-sdk/anthropic @ai-sdk/google
|
|
|
45
45
|
import { anthropic } from '@ai-sdk/anthropic';
|
|
46
46
|
|
|
47
47
|
const result = await generateText({
|
|
48
|
-
model: anthropic('claude-opus-
|
|
48
|
+
model: anthropic('claude-opus-5-5'), // or openai('gpt-6-astra'), google('gemini-3.8-flash'), etc.
|
|
49
49
|
prompt: 'Hello!',
|
|
50
50
|
});
|
|
51
51
|
```
|
|
@@ -58,7 +58,7 @@ const result = await generateText({
|
|
|
58
58
|
import { generateText } from 'ai';
|
|
59
59
|
|
|
60
60
|
const { text } = await generateText({
|
|
61
|
-
model: 'openai/gpt-
|
|
61
|
+
model: 'openai/gpt-6-astra', // use Vercel AI Gateway
|
|
62
62
|
prompt: 'What is an agent?',
|
|
63
63
|
});
|
|
64
64
|
```
|
|
@@ -70,7 +70,7 @@ import { generateText, Output } from 'ai';
|
|
|
70
70
|
import { z } from 'zod';
|
|
71
71
|
|
|
72
72
|
const { output } = await generateText({
|
|
73
|
-
model: 'openai/gpt-
|
|
73
|
+
model: 'openai/gpt-6-astra',
|
|
74
74
|
output: Output.object({
|
|
75
75
|
schema: z.object({
|
|
76
76
|
recipe: z.object({
|
|
@@ -92,7 +92,7 @@ const { output } = await generateText({
|
|
|
92
92
|
import { ToolLoopAgent } from 'ai';
|
|
93
93
|
|
|
94
94
|
const sandboxAgent = new ToolLoopAgent({
|
|
95
|
-
model: 'openai/gpt-
|
|
95
|
+
model: 'openai/gpt-6-astra',
|
|
96
96
|
system: 'You are an agent with access to a shell environment.',
|
|
97
97
|
tools: {
|
|
98
98
|
shell: openai.tools.localShell({
|
|
@@ -124,7 +124,7 @@ import { openai } from '@ai-sdk/openai';
|
|
|
124
124
|
import { ToolLoopAgent, InferAgentUIMessage } from 'ai';
|
|
125
125
|
|
|
126
126
|
export const imageGenerationAgent = new ToolLoopAgent({
|
|
127
|
-
model: 'openai/gpt-
|
|
127
|
+
model: 'openai/gpt-6-astra',
|
|
128
128
|
tools: {
|
|
129
129
|
generateImage: openai.tools.imageGeneration({
|
|
130
130
|
partialImages: 3,
|