feat: add tool input streaminig

This commit is contained in:
dayuan.jiang
2025-11-10 18:45:25 +09:00
parent fa173feb11
commit 61aa0937d6
3 changed files with 19 additions and 11 deletions

View File

@@ -6,7 +6,8 @@
"mcp__ide__getDiagnostics",
"Bash(npx tsc:*)",
"WebFetch(domain:sdk.vercel.ai)",
"Bash(npm run build:*)"
"Bash(npm run build:*)",
"Bash(npm outdated:*)"
],
"deny": [],
"ask": []

View File

@@ -144,6 +144,13 @@ ${lastMessageText}
// reasoningEffort: "minimal"
// },
// },
providerOptions: {
anthropic: {
additionalModelRequestFields: {
anthropic_beta: ['fine-grained-tool-streaming-2025-05-14']
}
}
},
messages: enhancedMessages,
tools: {
// Client-side tool that will be executed on the client

20
package-lock.json generated
View File

@@ -47,12 +47,12 @@
}
},
"node_modules/@ai-sdk/amazon-bedrock": {
"version": "3.0.52",
"resolved": "https://registry.npmjs.org/@ai-sdk/amazon-bedrock/-/amazon-bedrock-3.0.52.tgz",
"integrity": "sha512-dCse5ShXxeKB0IBg2/uac3DaHaFHYh6xoDBGjtlxeosHAppHwkal4OA5tgy6uj3Zp9bRZg4ZlkR77zdw3HC4ug==",
"version": "3.0.53",
"resolved": "https://registry.npmjs.org/@ai-sdk/amazon-bedrock/-/amazon-bedrock-3.0.53.tgz",
"integrity": "sha512-HyVLZbdGunqJbdCK2v/jofo9Z4lDAbngO2X/T57K+4wPZtCeUnv0f9F941RgU6XVJwdxjxITX1XEhhBP1qqGnw==",
"license": "Apache-2.0",
"dependencies": {
"@ai-sdk/anthropic": "2.0.42",
"@ai-sdk/anthropic": "2.0.43",
"@ai-sdk/provider": "2.0.0",
"@ai-sdk/provider-utils": "3.0.16",
"@smithy/eventstream-codec": "^4.0.1",
@@ -67,9 +67,9 @@
}
},
"node_modules/@ai-sdk/anthropic": {
"version": "2.0.42",
"resolved": "https://registry.npmjs.org/@ai-sdk/anthropic/-/anthropic-2.0.42.tgz",
"integrity": "sha512-5BcXMx6VTYPeA4csd1SvJgpCn5Nu9qHqsNqOr1e/R7UHq83Vv4j4OcgbFwdWgaW/wihNla5B+y4OGqTFIw216w==",
"version": "2.0.43",
"resolved": "https://registry.npmjs.org/@ai-sdk/anthropic/-/anthropic-2.0.43.tgz",
"integrity": "sha512-YQWYdoU6X1E16BS/KYCkage18q8sqj3FguCZ/RQs/wxS1551DVeD5DrWiYXxm5T293HzeAVJssQFEx67kc4LmA==",
"license": "Apache-2.0",
"dependencies": {
"@ai-sdk/provider": "2.0.0",
@@ -2073,9 +2073,9 @@
}
},
"node_modules/ai": {
"version": "5.0.89",
"resolved": "https://registry.npmjs.org/ai/-/ai-5.0.89.tgz",
"integrity": "sha512-8Nq+ZojGacQrupoJEQLrTDzT5VtR3gyp5AaqFSV3tzsAXlYQ9Igb7QE3yeoEdzOk5IRfDwWL7mDCUD+oBg1hDA==",
"version": "5.0.90",
"resolved": "https://registry.npmjs.org/ai/-/ai-5.0.90.tgz",
"integrity": "sha512-bawNN10N2cXzFedbDdNUZo8KkcGp12VX1b+mCL5dfllh6WmLsIYYME7GVxsRJvHvPP7xRhuds5fn0jtLyxGnZw==",
"license": "Apache-2.0",
"dependencies": {
"@ai-sdk/gateway": "2.0.7",