@ai-sdk/anthropic 2.0.113 → 2.0.115
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.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -4
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.d.mts +1 -1
- package/dist/internal/index.d.ts +1 -1
- package/dist/internal/index.js +3 -3
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +3 -3
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
} from "@ai-sdk/provider-utils";
|
|
12
12
|
|
|
13
13
|
// src/version.ts
|
|
14
|
-
var VERSION = true ? "2.0.
|
|
14
|
+
var VERSION = true ? "2.0.115" : "0.0.0-test";
|
|
15
15
|
|
|
16
16
|
// src/anthropic-messages-language-model.ts
|
|
17
17
|
import {
|
|
@@ -754,7 +754,7 @@ var anthropicProviderOptions = lazySchema3(() => {
|
|
|
754
754
|
* Requires a minimum budget of 1,024 tokens and counts towards the `max_tokens` limit.
|
|
755
755
|
*
|
|
756
756
|
* Models that always use adaptive thinking (e.g. `claude-opus-5-5`,
|
|
757
|
-
* `claude-fable-5-1`) reject `enabled` and `disabled`. For those models the
|
|
757
|
+
* `claude-fable-5-1`, `claude-fable-5-2`) reject `enabled` and `disabled`. For those models the
|
|
758
758
|
* provider drops the unsupported setting, emits a warning, and sends an
|
|
759
759
|
* adaptive thinking request. Use `effort` to control how much they think.
|
|
760
760
|
*
|
|
@@ -2982,7 +2982,7 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
2982
2982
|
}
|
|
2983
2983
|
const isAnthropicModel = isKnownModel || this.modelId.includes("claude-");
|
|
2984
2984
|
const supportsResponseSchema = (responseFormat == null ? void 0 : responseFormat.type) !== "json" || responseFormat.schema == null || supportsNativeStructuredOutputSchema(responseFormat.schema);
|
|
2985
|
-
const structureOutputMode = (_a = anthropicOptions == null ? void 0 : anthropicOptions.structuredOutputMode) != null ? _a : this.modelId.includes("claude-fable-5-1") || this.modelId.includes("claude-opus-5-5") || this.modelId.includes("claude-sonnet-5-5") ? "auto" : "jsonTool";
|
|
2985
|
+
const structureOutputMode = (_a = anthropicOptions == null ? void 0 : anthropicOptions.structuredOutputMode) != null ? _a : this.modelId.includes("claude-fable-5-1") || this.modelId.includes("claude-fable-5-2") || this.modelId.includes("claude-opus-5-5") || this.modelId.includes("claude-sonnet-5-5") ? "auto" : "jsonTool";
|
|
2986
2986
|
let useStructuredOutput = structureOutputMode === "outputFormat" || structureOutputMode === "auto" && supportsStructuredOutput && supportsResponseSchema;
|
|
2987
2987
|
if (!useStructuredOutput && rejectsForcedToolUse && supportsStructuredOutput && (responseFormat == null ? void 0 : responseFormat.type) === "json" && responseFormat.schema != null && supportsResponseSchema) {
|
|
2988
2988
|
warnings.push({
|
|
@@ -4539,7 +4539,7 @@ function getModelCapabilities(modelId) {
|
|
|
4539
4539
|
supportsBetweenToolsThinking: false,
|
|
4540
4540
|
isKnownModel: true
|
|
4541
4541
|
};
|
|
4542
|
-
} else if (modelId.includes("claude-fable-5-1")) {
|
|
4542
|
+
} else if (modelId.includes("claude-fable-5-1") || modelId.includes("claude-fable-5-2")) {
|
|
4543
4543
|
return {
|
|
4544
4544
|
maxOutputTokens: 128e3,
|
|
4545
4545
|
supportsStructuredOutput: true,
|