ai 6.0.250 → 6.0.253
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 +24 -0
- package/dist/index.d.mts +6 -2
- package/dist/index.d.ts +6 -2
- package/dist/index.js +14 -11
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +14 -11
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.js +1 -1
- package/dist/internal/index.mjs +1 -1
- package/docs/02-foundations/02-providers-and-models.mdx +1 -0
- package/docs/07-reference/01-ai-sdk-core/31-ui-message.mdx +4 -0
- package/package.json +2 -2
- package/src/agent/tool-loop-agent-settings.ts +1 -0
- package/src/agent/tool-loop-agent.ts +8 -4
- package/src/types/provider.ts +1 -1
- package/src/ui/chat.ts +5 -7
- package/src/ui/process-ui-message-stream.ts +1 -0
- package/src/ui/ui-messages.ts +5 -0
- package/src/ui/validate-ui-messages.ts +1 -0
package/dist/internal/index.js
CHANGED
|
@@ -164,7 +164,7 @@ function detectMediaType({
|
|
|
164
164
|
var import_provider_utils2 = require("@ai-sdk/provider-utils");
|
|
165
165
|
|
|
166
166
|
// src/version.ts
|
|
167
|
-
var VERSION = true ? "6.0.
|
|
167
|
+
var VERSION = true ? "6.0.253" : "0.0.0-test";
|
|
168
168
|
|
|
169
169
|
// src/util/download/download.ts
|
|
170
170
|
var download = async ({
|
package/dist/internal/index.mjs
CHANGED
|
@@ -112,6 +112,7 @@ Here are the capabilities of popular models:
|
|
|
112
112
|
|
|
113
113
|
| Provider | Model | Image Input | Object Generation | Tool Usage | Tool Streaming |
|
|
114
114
|
| -------------------------------------------------- | ------------------------------------------- | ------------------- | ------------------- | ------------------- | ------------------- |
|
|
115
|
+
| [xAI Grok](/providers/ai-sdk-providers/xai) | `grok-4.6` | <Check size={18} /> | <Check size={18} /> | <Check size={18} /> | <Check size={18} /> |
|
|
115
116
|
| [xAI Grok](/providers/ai-sdk-providers/xai) | `grok-4.5` | <Check size={18} /> | <Check size={18} /> | <Check size={18} /> | <Check size={18} /> |
|
|
116
117
|
| [xAI Grok](/providers/ai-sdk-providers/xai) | `grok-4` | <Cross size={18} /> | <Check size={18} /> | <Check size={18} /> | <Check size={18} /> |
|
|
117
118
|
| [xAI Grok](/providers/ai-sdk-providers/xai) | `grok-3` | <Cross size={18} /> | <Check size={18} /> | <Check size={18} /> | <Check size={18} /> |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ai",
|
|
3
|
-
"version": "6.0.
|
|
3
|
+
"version": "6.0.253",
|
|
4
4
|
"description": "AI SDK by Vercel - build apps like ChatGPT, Claude, Gemini, and more with a single interface for any model using the Vercel AI Gateway or go direct to OpenAI, Anthropic, Google, or any other model provider.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"@opentelemetry/api": "^1.9.0",
|
|
48
|
-
"@ai-sdk/gateway": "3.0.
|
|
48
|
+
"@ai-sdk/gateway": "3.0.172",
|
|
49
49
|
"@ai-sdk/provider": "3.0.15",
|
|
50
50
|
"@ai-sdk/provider-utils": "4.0.45"
|
|
51
51
|
},
|
|
@@ -143,10 +143,12 @@ export class ToolLoopAgent<
|
|
|
143
143
|
}: AgentCallParameters<CALL_OPTIONS, TOOLS>): Promise<
|
|
144
144
|
GenerateTextResult<TOOLS, OUTPUT>
|
|
145
145
|
> {
|
|
146
|
+
const preparedCall = await this.prepareCall(options);
|
|
147
|
+
|
|
146
148
|
return generateText({
|
|
147
|
-
...
|
|
149
|
+
...preparedCall,
|
|
148
150
|
abortSignal,
|
|
149
|
-
timeout,
|
|
151
|
+
timeout: timeout ?? preparedCall.timeout,
|
|
150
152
|
onStepFinish: this.mergeOnStepFinishCallbacks(onStepFinish),
|
|
151
153
|
});
|
|
152
154
|
}
|
|
@@ -163,10 +165,12 @@ export class ToolLoopAgent<
|
|
|
163
165
|
}: AgentStreamParameters<CALL_OPTIONS, TOOLS>): Promise<
|
|
164
166
|
StreamTextResult<TOOLS, OUTPUT>
|
|
165
167
|
> {
|
|
168
|
+
const preparedCall = await this.prepareCall(options);
|
|
169
|
+
|
|
166
170
|
return streamText({
|
|
167
|
-
...
|
|
171
|
+
...preparedCall,
|
|
168
172
|
abortSignal,
|
|
169
|
-
timeout,
|
|
173
|
+
timeout: timeout ?? preparedCall.timeout,
|
|
170
174
|
experimental_transform,
|
|
171
175
|
onStepFinish: this.mergeOnStepFinishCallbacks(onStepFinish),
|
|
172
176
|
});
|
package/src/types/provider.ts
CHANGED
package/src/ui/chat.ts
CHANGED
|
@@ -846,15 +846,13 @@ export abstract class AbstractChat<UI_MESSAGE extends UIMessage> {
|
|
|
846
846
|
finishReason: activeResponse.state.finishReason,
|
|
847
847
|
});
|
|
848
848
|
}
|
|
849
|
-
}
|
|
850
|
-
|
|
851
|
-
|
|
849
|
+
} finally {
|
|
850
|
+
if (this.activeResponse === activeResponse) {
|
|
851
|
+
this.activeResponse = undefined;
|
|
852
|
+
}
|
|
852
853
|
|
|
853
|
-
|
|
854
|
-
this.activeResponse = undefined;
|
|
854
|
+
clearActiveResumeRequest();
|
|
855
855
|
}
|
|
856
|
-
|
|
857
|
-
clearActiveResumeRequest();
|
|
858
856
|
}
|
|
859
857
|
|
|
860
858
|
// automatically send the message if the sendAutomaticallyWhen function returns true
|
|
@@ -455,6 +455,7 @@ export function processUIMessageStream<UI_MESSAGE extends UIMessage>({
|
|
|
455
455
|
case 'reasoning-start': {
|
|
456
456
|
const reasoningPart: ReasoningUIPart = {
|
|
457
457
|
type: 'reasoning',
|
|
458
|
+
id: chunk.id,
|
|
458
459
|
text: '',
|
|
459
460
|
providerMetadata: chunk.providerMetadata,
|
|
460
461
|
state: 'streaming',
|
package/src/ui/ui-messages.ts
CHANGED