@ai-sdk/anthropic 4.0.92 → 4.0.94
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 +19 -0
- package/dist/index.js +556 -237
- package/dist/index.js.map +1 -1
- package/dist/internal/index.d.ts +17 -35
- package/dist/internal/index.d.ts.map +1 -1
- package/dist/internal/index.js +556 -237
- package/dist/internal/index.js.map +1 -1
- package/docs/05-anthropic.mdx +23 -8
- package/package.json +3 -3
- package/src/anthropic-language-model.ts +124 -300
- package/src/anthropic-model-catalog.ts +406 -0
- package/src/has-circular-schema-reference.ts +115 -0
- package/src/sanitize-json-schema.ts +27 -24
- package/src/supports-native-structured-output-schema.ts +138 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# @ai-sdk/anthropic
|
|
2
2
|
|
|
3
|
+
## 4.0.94
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- f4c5f1e: fix(anthropic): use native structured outputs for Claude models that reject forced tool use (Sonnet 5.5, Opus 5.5, Fable 5.1) even when the provider disables them by default, as Amazon Bedrock and Google Vertex do. Self-referencing schemas keep the JSON response tool. Also keep `definitions` and `$defs` next to a top-level `$ref` when sanitizing structured output schemas, so the reference still resolves.
|
|
8
|
+
- e10aebb: fix(anthropic): when the JSON response tool is in use but the model answers in text without calling it (for example with manual thinking, where the forced tool choice is downgraded to `auto`), return the final answer text instead of dropping it. Text before a tool call, result, or message continuation is still dropped.
|
|
9
|
+
- b0d51fe: fix(anthropic): keep the JSON response tool for schemas that native structured outputs cannot represent when upgrading models that reject forced tool use. Schemas with open objects (maps, free-form objects) would otherwise come back as `{}`, and schemas with more than 10 optional properties can be rejected as too complex.
|
|
10
|
+
|
|
11
|
+
## 4.0.93
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- dcd2f8d: Introduce a model entry contract with named capability sections and request configuration. Consolidate the OpenAI and Anthropic model catalogs so existing request behavior and generated capability documentation use the same source of truth. Catalogs also declare the provider options each provider accepts and which models support them.
|
|
16
|
+
- Updated dependencies [7716e18]
|
|
17
|
+
- Updated dependencies [5c247e9]
|
|
18
|
+
- Updated dependencies [dcd2f8d]
|
|
19
|
+
- @ai-sdk/provider-utils@5.0.72
|
|
20
|
+
- @ai-sdk/provider@4.0.35
|
|
21
|
+
|
|
3
22
|
## 4.0.92
|
|
4
23
|
|
|
5
24
|
### Patch Changes
|