+11
-12
| { | ||
| "name": "ai", | ||
| "version": "7.0.83", | ||
| "version": "7.0.84", | ||
| "type": "module", | ||
@@ -45,17 +45,16 @@ "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.", | ||
| "dependencies": { | ||
| "@ai-sdk/gateway": "4.0.67", | ||
| "@ai-sdk/gateway": "4.0.68", | ||
| "@ai-sdk/provider": "4.0.8", | ||
| "@ai-sdk/provider-utils": "5.0.32" | ||
| "@ai-sdk/provider-utils": "5.0.33" | ||
| }, | ||
| "devDependencies": { | ||
| "@ai-sdk/amazon-bedrock": "5.0.66", | ||
| "@ai-sdk/deepseek": "3.0.35", | ||
| "@ai-sdk/google": "4.0.54", | ||
| "@ai-sdk/groq": "4.0.33", | ||
| "@ai-sdk/huggingface": "2.0.39", | ||
| "@ai-sdk/moonshotai": "3.0.41", | ||
| "@ai-sdk/open-responses": "2.0.34", | ||
| "@ai-sdk/openai": "4.0.50", | ||
| "@ai-sdk/amazon-bedrock": "5.0.67", | ||
| "@ai-sdk/deepseek": "3.0.36", | ||
| "@ai-sdk/google": "4.0.57", | ||
| "@ai-sdk/groq": "4.0.34", | ||
| "@ai-sdk/huggingface": "2.0.40", | ||
| "@ai-sdk/moonshotai": "3.0.42", | ||
| "@ai-sdk/openai": "4.0.51", | ||
| "@ai-sdk/test-server": "2.0.1", | ||
| "@ai-sdk/xai": "4.0.47", | ||
| "@ai-sdk/xai": "4.0.49", | ||
| "@edge-runtime/vm": "^5.0.0", | ||
@@ -62,0 +61,0 @@ "@smithy/eventstream-codec": "^4.3.3", |
@@ -144,2 +144,9 @@ import type { | ||
| /** | ||
| * Secret for HMAC-signing tool approval requests. When set, the server | ||
| * signs each approval request at issuance and verifies the signature when | ||
| * the approval is replayed, preventing client-forged approvals. | ||
| */ | ||
| experimental_toolApprovalSecret?: string | Uint8Array; | ||
| /** | ||
| * Optional function that you can use to provide different settings for a step. | ||
@@ -354,2 +361,3 @@ */ | ||
| | 'experimental_toolCallers' | ||
| | 'experimental_toolApprovalSecret' | ||
| | 'prepareStep' | ||
@@ -396,2 +404,3 @@ | 'repairToolCall' | ||
| | 'experimental_toolCallers' | ||
| | 'experimental_toolApprovalSecret' | ||
| | 'prepareStep' | ||
@@ -398,0 +407,0 @@ | 'repairToolCall' |
@@ -68,4 +68,6 @@ export type { ActiveTools } from './active-tools'; | ||
| streamText, | ||
| type StreamTextEndEvent, | ||
| type StreamTextInclude, | ||
| type StreamTextOnChunkCallback, | ||
| type StreamTextOnEndCallback, | ||
| type StreamTextOnErrorCallback, | ||
@@ -72,0 +74,0 @@ type StreamTextTransform, |
@@ -26,3 +26,3 @@ import { delay as originalDelay, type ToolSet } from '@ai-sdk/provider-utils'; | ||
| * @param delayInMs - The delay in milliseconds between each chunk. Defaults to 10ms. Can be set to `null` to skip the delay. | ||
| * @param chunking - Controls how the text is chunked for streaming. Use "word" to stream word by word (default), "line" to stream line by line, provide a custom RegExp pattern for custom chunking, provide an Intl.Segmenter for locale-aware word segmentation (recommended for CJK languages), or provide a custom ChunkDetector function. | ||
| * @param chunking - Controls how the text is chunked for streaming. Use "word" to stream word by word (default), "line" to stream line by line, provide a custom RegExp pattern that does not match the empty string for custom chunking, provide an Intl.Segmenter for locale-aware word segmentation (recommended for CJK languages), or provide a custom ChunkDetector function. | ||
| * | ||
@@ -99,4 +99,12 @@ * @returns A transform stream that smooths text streaming output. | ||
| detectChunk = buffer => { | ||
| const match = chunkingRegex.exec(buffer); | ||
| const lastIndex = chunkingRegex.lastIndex; | ||
| chunkingRegex.lastIndex = 0; | ||
| let match: RegExpExecArray | null; | ||
| try { | ||
| match = chunkingRegex.exec(buffer); | ||
| } finally { | ||
| chunkingRegex.lastIndex = lastIndex; | ||
| } | ||
| if (!match) { | ||
@@ -106,3 +114,7 @@ return null; | ||
| return buffer.slice(0, match.index) + match?.[0]; | ||
| if (!match[0].length) { | ||
| throw new Error(`Chunking RegExp must not match an empty string.`); | ||
| } | ||
| return buffer.slice(0, match.index) + match[0]; | ||
| }; | ||
@@ -109,0 +121,0 @@ } |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
6857630
0.16%20
-4.76%71653
0.16%+ Added
+ Added
- Removed
- Removed
Updated