ai 7.0.78 → 7.0.79

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.
@@ -92,7 +92,7 @@ import {
92
92
  } from "@ai-sdk/provider-utils";
93
93
 
94
94
  // src/version.ts
95
- var VERSION = true ? "7.0.78" : "0.0.0-test";
95
+ var VERSION = true ? "7.0.79" : "0.0.0-test";
96
96
 
97
97
  // src/util/download/download.ts
98
98
  var download = async ({
@@ -162,8 +162,8 @@ Here are the capabilities of popular models:
162
162
  | [Mistral](/providers/ai-sdk-providers/mistral) | `mistral-medium-3.5` | <Cross /> | <Check /> | <Check /> | <Check /> |
163
163
  | [Mistral](/providers/ai-sdk-providers/mistral) | `mistral-small-latest` | <Cross /> | <Check /> | <Check /> | <Check /> |
164
164
  | [Mistral](/providers/ai-sdk-providers/mistral) | `pixtral-12b-2409` | <Check /> | <Check /> | <Check /> | <Check /> |
165
- | [DeepSeek](/providers/ai-sdk-providers/deepseek) | `deepseek-chat` | <Cross /> | <Check /> | <Check /> | <Check /> |
166
- | [DeepSeek](/providers/ai-sdk-providers/deepseek) | `deepseek-reasoner` | <Cross /> | <Check /> | <Check /> | <Check /> |
165
+ | [DeepSeek](/providers/ai-sdk-providers/deepseek) | `deepseek-v4-flash` | <Cross /> | <Check /> | <Check /> | <Check /> |
166
+ | [DeepSeek](/providers/ai-sdk-providers/deepseek) | `deepseek-v4-pro` | <Cross /> | <Check /> | <Check /> | <Check /> |
167
167
  | [Cerebras](/providers/ai-sdk-providers/cerebras) | `gpt-oss-120b` | <Cross /> | <Check /> | <Check /> | <Check /> |
168
168
  | [Cerebras](/providers/ai-sdk-providers/cerebras) | `gemma-4-31b` | <Check /> | <Check /> | <Check /> | <Check /> |
169
169
  | [Groq](/providers/ai-sdk-providers/groq) | `meta-llama/llama-4-scout-17b-16e-instruct` | <Check /> | <Check /> | <Check /> | <Check /> |
@@ -17,7 +17,9 @@ The AI SDK includes the following harness adapters:
17
17
  - [Claude Code](/providers/ai-sdk-harnesses/claude-code) (`@ai-sdk/harness-claude-code`)
18
18
  - [Cline](/providers/ai-sdk-harnesses/cline) (`@ai-sdk/harness-cline`)
19
19
  - [Codex](/providers/ai-sdk-harnesses/codex) (`@ai-sdk/harness-codex`)
20
+ - [Cursor](/providers/ai-sdk-harnesses/cursor) (`@ai-sdk/harness-cursor`)
20
21
  - [Deep Agents](/providers/ai-sdk-harnesses/deepagents) (`@ai-sdk/harness-deepagents`)
22
+ - [fx](/providers/ai-sdk-harnesses/fx) (`@ai-sdk/harness-fx`)
21
23
  - [Grok Build](/providers/ai-sdk-harnesses/grok-build) (`@ai-sdk/harness-grok-build`)
22
24
  - [OpenCode](/providers/ai-sdk-harnesses/opencode) (`@ai-sdk/harness-opencode`)
23
25
  - [Pi](/providers/ai-sdk-harnesses/pi) (`@ai-sdk/harness-pi`)
@@ -35,11 +37,9 @@ The AI SDK includes the following harness adapters:
35
37
  | [Claude Code](/providers/ai-sdk-harnesses/claude-code) | Sandbox bridge | <Check /> | <Check /> | <Check /> | <Check /> | <Check /> |
36
38
  | [Cline](/providers/ai-sdk-harnesses/cline) | Host process | <Check /> | <Check /> | <Check /> | <Check /> | <Check /> |
37
39
  | [Codex](/providers/ai-sdk-harnesses/codex) | Sandbox bridge | <Check /> | <Check /> | <Check /> | <Cross /> | <Cross /> |
40
+ | [Cursor](/providers/ai-sdk-harnesses/cursor) | Sandbox via ACP | <Check /> | <Check /> | <Cross /> | <Check /> | <Cross /> |
38
41
  | [Deep Agents](/providers/ai-sdk-harnesses/deepagents) | Sandbox bridge | <Check /> | <Check /> | <Check /> | <Check /> | <Check /> via auto-rejection |
42
+ | [fx](/providers/ai-sdk-harnesses/fx) | Sandbox via ACP | <Check /> | <Check /> | <Cross /> | <Check /> | <Cross /> |
39
43
  | [Grok Build](/providers/ai-sdk-harnesses/grok-build) | Sandbox via ACP | <Check /> | <Check /> | <Check /> | <Check /> | <Cross /> |
40
44
  | [OpenCode](/providers/ai-sdk-harnesses/opencode) | Sandbox bridge | <Check /> | <Check /> | <Check /> | <Check /> | <Check /> via auto-rejection |
41
45
  | [Pi](/providers/ai-sdk-harnesses/pi) | Host process | <Check /> | <Check /> | <Cross /> | <Check /> | <Check /> |
42
-
43
- Generic ACP profiles do not support structured output unless they configure an
44
- implementation-specific prompt metadata mapping; Grok Build includes the
45
- required mapping, while Codex ACP does not expose one.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai",
3
- "version": "7.0.78",
3
+ "version": "7.0.79",
4
4
  "type": "module",
5
5
  "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.",
6
6
  "license": "Apache-2.0",
@@ -42,21 +42,21 @@
42
42
  }
43
43
  },
44
44
  "dependencies": {
45
- "@ai-sdk/gateway": "4.0.63",
46
- "@ai-sdk/provider": "4.0.7",
47
- "@ai-sdk/provider-utils": "5.0.29"
45
+ "@ai-sdk/gateway": "4.0.64",
46
+ "@ai-sdk/provider": "4.0.8",
47
+ "@ai-sdk/provider-utils": "5.0.30"
48
48
  },
49
49
  "devDependencies": {
50
+ "@ai-sdk/test-server": "2.0.1",
50
51
  "@edge-runtime/vm": "^5.0.0",
51
52
  "@types/json-schema": "7.0.15",
52
53
  "@types/node": "22.19.19",
54
+ "@vercel/ai-tsconfig": "0.0.0",
53
55
  "esbuild": "^0.28.1",
54
56
  "tsup": "^7.2.0",
55
57
  "tsx": "4.23.12",
56
58
  "typescript": "5.8.3",
57
- "zod": "3.25.76",
58
- "@ai-sdk/test-server": "2.0.1",
59
- "@vercel/ai-tsconfig": "0.0.0"
59
+ "zod": "3.25.76"
60
60
  },
61
61
  "peerDependencies": {
62
62
  "zod": "^3.25.76 || ^4.1.8"
@@ -77,6 +77,13 @@ export type StartTextBatchOptions = {
77
77
  model: BatchLanguageModel;
78
78
  requests: ReadonlyArray<TextBatchRequest>;
79
79
  providerOptions?: ProviderOptions;
80
+
81
+ /**
82
+ * URL that the provider should notify when the batch reaches a terminal
83
+ * state. Providers that do not support completion webhooks return an
84
+ * unsupported warning.
85
+ */
86
+ webhookUrl?: string;
80
87
  } & BatchRequestOptions;
81
88
 
82
89
  /**
@@ -37,6 +37,7 @@ export async function startTextBatch({
37
37
  model: modelArg,
38
38
  requests,
39
39
  providerOptions,
40
+ webhookUrl,
40
41
  abortSignal,
41
42
  headers,
42
43
  timeout,
@@ -81,6 +82,7 @@ export async function startTextBatch({
81
82
  providerOptions,
82
83
  abortSignal: operationAbortSignal,
83
84
  headers: headersWithUserAgent,
85
+ ...(webhookUrl != null && { webhookUrl }),
84
86
  });
85
87
  const { batchId, warnings, ...status } = result;
86
88
 
@@ -1538,9 +1538,13 @@ export async function generateText<
1538
1538
  callbacks: [onEnd, telemetryDispatcher.onEnd],
1539
1539
  });
1540
1540
 
1541
- // parse output only if the last step was finished with "stop":
1541
+ // parse output if the last step was finished with "stop", or if the
1542
+ // provider did not report a finish reason but returned text:
1542
1543
  let resolvedOutput;
1543
- if (lastStep.finishReason === 'stop') {
1544
+ if (
1545
+ lastStep.finishReason === 'stop' ||
1546
+ (lastStep.finishReason == null && lastStep.text.length > 0)
1547
+ ) {
1544
1548
  const outputSpecification = output ?? text();
1545
1549
  resolvedOutput = await outputSpecification.parseCompleteOutput(
1546
1550
  { text: lastStep.text },
package/src/index.ts CHANGED
@@ -2,7 +2,13 @@
2
2
  import './global';
3
3
 
4
4
  // re-exports:
5
- export { createGateway, gateway, type GatewayModelId } from '@ai-sdk/gateway';
5
+ export {
6
+ createGateway,
7
+ gateway,
8
+ type GatewayAsyncJobMetadata,
9
+ type GatewayModelId,
10
+ type GatewayProviderMetadata,
11
+ } from '@ai-sdk/gateway';
6
12
  export {
7
13
  asSchema,
8
14
  createIdGenerator,
@@ -881,9 +881,8 @@ export function processUIMessageStream<UI_MESSAGE extends UIMessage>({
881
881
  }
882
882
 
883
883
  case 'finish-step': {
884
- // reset the current text and reasoning parts
885
- state.activeTextParts = createIdMap();
886
- state.activeReasoningParts = createIdMap();
884
+ // Active parts are closed by their explicit end chunks. A merged
885
+ // stream's step can finish while another stream's part is active.
887
886
  break;
888
887
  }
889
888