@ai-sdk/anthropic 2.0.89 → 2.0.90
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 +6 -0
- package/dist/index.js +16 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +16 -2
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.js +15 -1
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +15 -1
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +1 -1
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.90" : "0.0.0-test";
|
|
15
15
|
|
|
16
16
|
// src/anthropic-messages-language-model.ts
|
|
17
17
|
import {
|
|
@@ -2326,7 +2326,7 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
2326
2326
|
topP = void 0;
|
|
2327
2327
|
}
|
|
2328
2328
|
}
|
|
2329
|
-
const isAnthropicModel = isKnownModel || this.modelId.
|
|
2329
|
+
const isAnthropicModel = isKnownModel || this.modelId.includes("claude-");
|
|
2330
2330
|
const structureOutputMode = (_a = anthropicOptions == null ? void 0 : anthropicOptions.structuredOutputMode) != null ? _a : "jsonTool";
|
|
2331
2331
|
const useStructuredOutput = structureOutputMode === "outputFormat" || structureOutputMode === "auto" && supportsStructuredOutput;
|
|
2332
2332
|
const jsonResponseTool = (responseFormat == null ? void 0 : responseFormat.type) === "json" && responseFormat.schema != null && !useStructuredOutput ? {
|
|
@@ -3659,6 +3659,20 @@ function getModelCapabilities(modelId) {
|
|
|
3659
3659
|
rejectsSamplingParameters: false,
|
|
3660
3660
|
isKnownModel: true
|
|
3661
3661
|
};
|
|
3662
|
+
} else if (/claude-(?:instant(?:-|$)|v?2(?=$|[-.:])|3(?=$|[-.]))/.test(modelId)) {
|
|
3663
|
+
return {
|
|
3664
|
+
maxOutputTokens: 4096,
|
|
3665
|
+
supportsStructuredOutput: false,
|
|
3666
|
+
rejectsSamplingParameters: false,
|
|
3667
|
+
isKnownModel: false
|
|
3668
|
+
};
|
|
3669
|
+
} else if (modelId.includes("claude-")) {
|
|
3670
|
+
return {
|
|
3671
|
+
maxOutputTokens: 128e3,
|
|
3672
|
+
supportsStructuredOutput: true,
|
|
3673
|
+
rejectsSamplingParameters: true,
|
|
3674
|
+
isKnownModel: false
|
|
3675
|
+
};
|
|
3662
3676
|
} else {
|
|
3663
3677
|
return {
|
|
3664
3678
|
maxOutputTokens: 4096,
|