@ai-sdk/anthropic 4.0.16 → 4.0.18
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 +15 -1
- package/dist/index.js.map +1 -1
- package/dist/internal/index.d.ts +10 -1
- package/dist/internal/index.js +16 -1
- package/dist/internal/index.js.map +1 -1
- package/package.json +2 -2
- package/src/anthropic-language-model.ts +24 -0
- package/src/internal/index.ts +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @ai-sdk/anthropic
|
|
2
2
|
|
|
3
|
+
## 4.0.18
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 97de198: Warn when an unknown model uses the default 4096 max output token limit.
|
|
8
|
+
|
|
9
|
+
## 4.0.17
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- b72fc7c: fix(amazon-bedrock): sanitize unsupported JSON Schema constraints in native Anthropic structured output
|
|
14
|
+
- 9218ebe: fix(provider/anthropic): warn when parallel tool use is requested with JSON tool structured output
|
|
15
|
+
- Updated dependencies [02ffdcb]
|
|
16
|
+
- Updated dependencies [76cb673]
|
|
17
|
+
- @ai-sdk/provider-utils@5.0.12
|
|
18
|
+
|
|
3
19
|
## 4.0.16
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
package/dist/index.js
CHANGED
|
@@ -3628,6 +3628,13 @@ var AnthropicLanguageModel = class _AnthropicLanguageModel {
|
|
|
3628
3628
|
supportsXhighEffort,
|
|
3629
3629
|
isKnownModel
|
|
3630
3630
|
} = getModelCapabilities(this.modelId);
|
|
3631
|
+
if (!isKnownModel && maxOutputTokens == null) {
|
|
3632
|
+
warnings.push({
|
|
3633
|
+
type: "compatibility",
|
|
3634
|
+
feature: "maxOutputTokens",
|
|
3635
|
+
details: `The model "${this.modelId}" is unknown. The max output tokens have been limited to ${maxOutputTokensForModel}. Set maxOutputTokens explicitly to override this limit.`
|
|
3636
|
+
});
|
|
3637
|
+
}
|
|
3631
3638
|
if (rejectsSamplingParameters) {
|
|
3632
3639
|
if (temperature != null) {
|
|
3633
3640
|
warnings.push({
|
|
@@ -3665,6 +3672,13 @@ var AnthropicLanguageModel = class _AnthropicLanguageModel {
|
|
|
3665
3672
|
description: "Respond with a JSON object.",
|
|
3666
3673
|
inputSchema: responseFormat.schema
|
|
3667
3674
|
} : void 0;
|
|
3675
|
+
if (jsonResponseTool != null && (anthropicOptions == null ? void 0 : anthropicOptions.disableParallelToolUse) === false) {
|
|
3676
|
+
warnings.push({
|
|
3677
|
+
type: "unsupported",
|
|
3678
|
+
feature: "providerOptions.anthropic.disableParallelToolUse",
|
|
3679
|
+
details: "`disableParallelToolUse: false` is ignored when using the JSON response tool. Parallel tool use is disabled to ensure a single coherent JSON tool call."
|
|
3680
|
+
});
|
|
3681
|
+
}
|
|
3668
3682
|
const contextManagement = anthropicOptions == null ? void 0 : anthropicOptions.contextManagement;
|
|
3669
3683
|
const cacheControlValidator = new CacheControlValidator();
|
|
3670
3684
|
const toolNameMapping = createToolNameMapping({
|
|
@@ -6333,7 +6347,7 @@ var AnthropicSkills = class {
|
|
|
6333
6347
|
};
|
|
6334
6348
|
|
|
6335
6349
|
// src/version.ts
|
|
6336
|
-
var VERSION = true ? "4.0.
|
|
6350
|
+
var VERSION = true ? "4.0.18" : "0.0.0-test";
|
|
6337
6351
|
|
|
6338
6352
|
// src/anthropic-provider.ts
|
|
6339
6353
|
var ANTHROPIC_API_URL = "https://api.anthropic.com";
|