@ai-sdk/anthropic 4.0.62 → 4.0.65
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 +22 -0
- package/README.md +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.js +301 -283
- package/dist/index.js.map +1 -1
- package/dist/internal/index.d.ts +6 -0
- package/dist/internal/index.js +253 -228
- package/dist/internal/index.js.map +1 -1
- package/docs/05-anthropic.mdx +146 -42
- package/package.json +3 -3
- package/src/anthropic-api.ts +3 -0
- package/src/anthropic-batch.ts +6 -1
- package/src/anthropic-language-model-options.ts +17 -3
- package/src/anthropic-language-model.ts +44 -0
- package/src/convert-to-anthropic-prompt.ts +28 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# @ai-sdk/anthropic
|
|
2
2
|
|
|
3
|
+
## 4.0.65
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [af9597b]
|
|
8
|
+
- Updated dependencies [bc49f78]
|
|
9
|
+
- @ai-sdk/provider-utils@5.0.49
|
|
10
|
+
|
|
11
|
+
## 4.0.64
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- 67f8000: Preserve effort updates on empty system messages at the beginning of a conversation, including consecutive updates.
|
|
16
|
+
- Updated dependencies [be877ff]
|
|
17
|
+
- @ai-sdk/provider-utils@5.0.48
|
|
18
|
+
|
|
19
|
+
## 4.0.63
|
|
20
|
+
|
|
21
|
+
### Patch Changes
|
|
22
|
+
|
|
23
|
+
- 154221f: feat(anthropic): support on-demand compaction and preserve signed compaction blocks
|
|
24
|
+
|
|
3
25
|
## 4.0.62
|
|
4
26
|
|
|
5
27
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -35,7 +35,7 @@ import { anthropic } from '@ai-sdk/anthropic';
|
|
|
35
35
|
import { generateText } from 'ai';
|
|
36
36
|
|
|
37
37
|
const { text } = await generateText({
|
|
38
|
-
model: anthropic('claude-
|
|
38
|
+
model: anthropic('claude-haiku-4-5'),
|
|
39
39
|
prompt: 'Write a vegetarian lasagna recipe for 4 people.',
|
|
40
40
|
});
|
|
41
41
|
```
|
package/dist/index.d.ts
CHANGED
|
@@ -345,6 +345,10 @@ declare const anthropicLanguageModelOptions: z.ZodObject<{
|
|
|
345
345
|
type: z.ZodLiteral<"dangerous_tool_use">;
|
|
346
346
|
classifierContext: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
347
347
|
}, z.core.$strip>>>;
|
|
348
|
+
compaction: z.ZodOptional<z.ZodObject<{
|
|
349
|
+
type: z.ZodLiteral<"summarize">;
|
|
350
|
+
instructions: z.ZodOptional<z.ZodString>;
|
|
351
|
+
}, z.core.$strip>>;
|
|
348
352
|
contextManagement: z.ZodOptional<z.ZodObject<{
|
|
349
353
|
edits: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
350
354
|
type: z.ZodLiteral<"clear_tool_uses_20250919">;
|