ai 6.0.207 → 6.0.208

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.
@@ -152,7 +152,7 @@ function detectMediaType({
152
152
  var import_provider_utils2 = require("@ai-sdk/provider-utils");
153
153
 
154
154
  // src/version.ts
155
- var VERSION = true ? "6.0.207" : "0.0.0-test";
155
+ var VERSION = true ? "6.0.208" : "0.0.0-test";
156
156
 
157
157
  // src/util/download/download.ts
158
158
  var download = async ({
@@ -132,7 +132,7 @@ import {
132
132
  } from "@ai-sdk/provider-utils";
133
133
 
134
134
  // src/version.ts
135
- var VERSION = true ? "6.0.207" : "0.0.0-test";
135
+ var VERSION = true ? "6.0.208" : "0.0.0-test";
136
136
 
137
137
  // src/util/download/download.ts
138
138
  var download = async ({
@@ -198,30 +198,33 @@ try {
198
198
 
199
199
  ## Transcription Models
200
200
 
201
- | Provider | Model |
202
- | ------------------------------------------------------------------------- | ------------------------ |
203
- | [OpenAI](/providers/ai-sdk-providers/openai#transcription-models) | `whisper-1` |
204
- | [OpenAI](/providers/ai-sdk-providers/openai#transcription-models) | `gpt-4o-transcribe` |
205
- | [OpenAI](/providers/ai-sdk-providers/openai#transcription-models) | `gpt-4o-mini-transcribe` |
206
- | [ElevenLabs](/providers/ai-sdk-providers/elevenlabs#transcription-models) | `scribe_v1` |
207
- | [ElevenLabs](/providers/ai-sdk-providers/elevenlabs#transcription-models) | `scribe_v1_experimental` |
208
- | [Groq](/providers/ai-sdk-providers/groq#transcription-models) | `whisper-large-v3-turbo` |
209
- | [Groq](/providers/ai-sdk-providers/groq#transcription-models) | `whisper-large-v3` |
210
- | [Azure OpenAI](/providers/ai-sdk-providers/azure#transcription-models) | `whisper-1` |
211
- | [Azure OpenAI](/providers/ai-sdk-providers/azure#transcription-models) | `gpt-4o-transcribe` |
212
- | [Azure OpenAI](/providers/ai-sdk-providers/azure#transcription-models) | `gpt-4o-mini-transcribe` |
213
- | [Rev.ai](/providers/ai-sdk-providers/revai#transcription-models) | `machine` |
214
- | [Rev.ai](/providers/ai-sdk-providers/revai#transcription-models) | `low_cost` |
215
- | [Rev.ai](/providers/ai-sdk-providers/revai#transcription-models) | `fusion` |
216
- | [Deepgram](/providers/ai-sdk-providers/deepgram#transcription-models) | `base` (+ variants) |
217
- | [Deepgram](/providers/ai-sdk-providers/deepgram#transcription-models) | `enhanced` (+ variants) |
218
- | [Deepgram](/providers/ai-sdk-providers/deepgram#transcription-models) | `nova` (+ variants) |
219
- | [Deepgram](/providers/ai-sdk-providers/deepgram#transcription-models) | `nova-2` (+ variants) |
220
- | [Deepgram](/providers/ai-sdk-providers/deepgram#transcription-models) | `nova-3` (+ variants) |
221
- | [Gladia](/providers/ai-sdk-providers/gladia#transcription-models) | `default` |
222
- | [AssemblyAI](/providers/ai-sdk-providers/assemblyai#transcription-models) | `best` |
223
- | [AssemblyAI](/providers/ai-sdk-providers/assemblyai#transcription-models) | `nano` |
224
- | [Fal](/providers/ai-sdk-providers/fal#transcription-models) | `whisper` |
225
- | [Fal](/providers/ai-sdk-providers/fal#transcription-models) | `wizper` |
201
+ | Provider | Model |
202
+ | ------------------------------------------------------------------------------- | ------------------------ |
203
+ | [OpenAI](/providers/ai-sdk-providers/openai#transcription-models) | `whisper-1` |
204
+ | [OpenAI](/providers/ai-sdk-providers/openai#transcription-models) | `gpt-4o-transcribe` |
205
+ | [OpenAI](/providers/ai-sdk-providers/openai#transcription-models) | `gpt-4o-mini-transcribe` |
206
+ | [ElevenLabs](/providers/ai-sdk-providers/elevenlabs#transcription-models) | `scribe_v1` |
207
+ | [ElevenLabs](/providers/ai-sdk-providers/elevenlabs#transcription-models) | `scribe_v1_experimental` |
208
+ | [Groq](/providers/ai-sdk-providers/groq#transcription-models) | `whisper-large-v3-turbo` |
209
+ | [Groq](/providers/ai-sdk-providers/groq#transcription-models) | `whisper-large-v3` |
210
+ | [Azure OpenAI](/providers/ai-sdk-providers/azure#transcription-models) | `whisper-1` |
211
+ | [Azure OpenAI](/providers/ai-sdk-providers/azure#transcription-models) | `gpt-4o-transcribe` |
212
+ | [Azure OpenAI](/providers/ai-sdk-providers/azure#transcription-models) | `gpt-4o-mini-transcribe` |
213
+ | [Rev.ai](/providers/ai-sdk-providers/revai#transcription-models) | `machine` |
214
+ | [Rev.ai](/providers/ai-sdk-providers/revai#transcription-models) | `low_cost` |
215
+ | [Rev.ai](/providers/ai-sdk-providers/revai#transcription-models) | `fusion` |
216
+ | [Deepgram](/providers/ai-sdk-providers/deepgram#transcription-models) | `base` (+ variants) |
217
+ | [Deepgram](/providers/ai-sdk-providers/deepgram#transcription-models) | `enhanced` (+ variants) |
218
+ | [Deepgram](/providers/ai-sdk-providers/deepgram#transcription-models) | `nova` (+ variants) |
219
+ | [Deepgram](/providers/ai-sdk-providers/deepgram#transcription-models) | `nova-2` (+ variants) |
220
+ | [Deepgram](/providers/ai-sdk-providers/deepgram#transcription-models) | `nova-3` (+ variants) |
221
+ | [Gladia](/providers/ai-sdk-providers/gladia#transcription-models) | `default` |
222
+ | [AssemblyAI](/providers/ai-sdk-providers/assemblyai#transcription-models) | `best` |
223
+ | [AssemblyAI](/providers/ai-sdk-providers/assemblyai#transcription-models) | `nano` |
224
+ | [Fal](/providers/ai-sdk-providers/fal#transcription-models) | `whisper` |
225
+ | [Fal](/providers/ai-sdk-providers/fal#transcription-models) | `wizper` |
226
+ | [Google Vertex](/providers/ai-sdk-providers/google-vertex#transcription-models) | `chirp_2` |
227
+ | [Google Vertex](/providers/ai-sdk-providers/google-vertex#transcription-models) | `chirp_3` |
228
+ | [Google Vertex](/providers/ai-sdk-providers/google-vertex#transcription-models) | `telephony` |
226
229
 
227
230
  Above are a small subset of the transcription models supported by the AI SDK providers. For more, see the respective provider documentation.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai",
3
- "version": "6.0.207",
3
+ "version": "6.0.208",
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,
@@ -2734,7 +2734,9 @@ class DefaultStreamTextResult<
2734
2734
  controller.enqueue({
2735
2735
  type: 'tool-output-available',
2736
2736
  toolCallId: part.toolCallId,
2737
- output: part.output,
2737
+ // UI stream chunks are serialized as JSON, which drops undefined
2738
+ // properties. Use null so tool outputs always keep the output field.
2739
+ output: part.output === undefined ? null : part.output,
2738
2740
  ...(part.providerExecuted != null
2739
2741
  ? { providerExecuted: part.providerExecuted }
2740
2742
  : {}),
@@ -3,6 +3,7 @@ type State =
3
3
  | 'FINISH'
4
4
  | 'INSIDE_STRING'
5
5
  | 'INSIDE_STRING_ESCAPE'
6
+ | 'INSIDE_STRING_UNICODE_ESCAPE'
6
7
  | 'INSIDE_LITERAL'
7
8
  | 'INSIDE_NUMBER'
8
9
  | 'INSIDE_OBJECT_START'
@@ -28,6 +29,15 @@ export function fixJson(input: string): string {
28
29
  const stack: State[] = ['ROOT'];
29
30
  let lastValidIndex = -1;
30
31
  let literalStart: number | null = null;
32
+ let unicodeEscapeDigits = 0;
33
+
34
+ function isHexDigit(char: string) {
35
+ return (
36
+ (char >= '0' && char <= '9') ||
37
+ (char >= 'A' && char <= 'F') ||
38
+ (char >= 'a' && char <= 'f')
39
+ );
40
+ }
31
41
 
32
42
  function processValueStart(char: string, i: number, swapState: State) {
33
43
  {
@@ -260,7 +270,26 @@ export function fixJson(input: string): string {
260
270
 
261
271
  case 'INSIDE_STRING_ESCAPE': {
262
272
  stack.pop();
263
- lastValidIndex = i;
273
+
274
+ if (char === 'u') {
275
+ unicodeEscapeDigits = 0;
276
+ stack.push('INSIDE_STRING_UNICODE_ESCAPE');
277
+ } else {
278
+ lastValidIndex = i;
279
+ }
280
+
281
+ break;
282
+ }
283
+
284
+ case 'INSIDE_STRING_UNICODE_ESCAPE': {
285
+ if (isHexDigit(char)) {
286
+ unicodeEscapeDigits++;
287
+
288
+ if (unicodeEscapeDigits === 4) {
289
+ stack.pop();
290
+ lastValidIndex = i;
291
+ }
292
+ }
264
293
 
265
294
  break;
266
295
  }