@ai-sdk/anthropic 4.0.40 → 4.0.42
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 +16 -0
- package/dist/index.js +12 -3
- package/dist/index.js.map +1 -1
- package/docs/05-anthropic.mdx +1 -1
- package/package.json +6 -6
- package/src/anthropic-messages-batch.ts +14 -1
package/docs/05-anthropic.mdx
CHANGED
|
@@ -1110,7 +1110,7 @@ import { generateText } from 'ai';
|
|
|
1110
1110
|
|
|
1111
1111
|
const result = await generateText({
|
|
1112
1112
|
model: anthropic('claude-sonnet-4-6'),
|
|
1113
|
-
|
|
1113
|
+
instructions:
|
|
1114
1114
|
'You have access to an `advisor` tool backed by a stronger reviewer model.',
|
|
1115
1115
|
prompt:
|
|
1116
1116
|
'Build a concurrent worker pool in Go with graceful shutdown. Outline the design first.',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ai-sdk/anthropic",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.42",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -35,16 +35,16 @@
|
|
|
35
35
|
}
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@ai-sdk/provider": "4.0.
|
|
39
|
-
"@ai-sdk/provider-utils": "5.0.
|
|
38
|
+
"@ai-sdk/provider": "4.0.8",
|
|
39
|
+
"@ai-sdk/provider-utils": "5.0.30"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
+
"@ai-sdk/test-server": "2.0.1",
|
|
42
43
|
"@types/node": "22.19.19",
|
|
44
|
+
"@vercel/ai-tsconfig": "0.0.0",
|
|
43
45
|
"tsup": "^8.5.1",
|
|
44
46
|
"typescript": "5.8.3",
|
|
45
|
-
"zod": "3.25.76"
|
|
46
|
-
"@ai-sdk/test-server": "2.0.1",
|
|
47
|
-
"@vercel/ai-tsconfig": "0.0.0"
|
|
47
|
+
"zod": "3.25.76"
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
|
50
50
|
"zod": "^3.25.76 || ^4.1.8"
|
|
@@ -145,6 +145,7 @@ export class AnthropicMessagesBatchLanguageModel
|
|
|
145
145
|
providerOptions,
|
|
146
146
|
headers,
|
|
147
147
|
abortSignal,
|
|
148
|
+
webhookUrl,
|
|
148
149
|
}: Parameters<
|
|
149
150
|
BatchLanguageModelV4['experimental_doStartBatch']
|
|
150
151
|
>[0]): Promise<BatchV4StartResult> {
|
|
@@ -161,7 +162,19 @@ export class AnthropicMessagesBatchLanguageModel
|
|
|
161
162
|
custom_id: string;
|
|
162
163
|
params: Record<string, unknown>;
|
|
163
164
|
}> = [];
|
|
164
|
-
const batchWarnings: BatchV4StartResult['warnings'] =
|
|
165
|
+
const batchWarnings: BatchV4StartResult['warnings'] =
|
|
166
|
+
webhookUrl == null
|
|
167
|
+
? []
|
|
168
|
+
: [
|
|
169
|
+
{
|
|
170
|
+
warning: {
|
|
171
|
+
type: 'unsupported',
|
|
172
|
+
feature: 'webhookUrl',
|
|
173
|
+
details:
|
|
174
|
+
'The Anthropic Message Batches API does not support completion webhooks.',
|
|
175
|
+
},
|
|
176
|
+
},
|
|
177
|
+
];
|
|
165
178
|
|
|
166
179
|
for (const request of requests) {
|
|
167
180
|
const requestBetas = await getAnthropicBatchProviderBetas({
|