@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/internal/index.js
CHANGED
|
@@ -2295,7 +2295,7 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
2295
2295
|
topP = void 0;
|
|
2296
2296
|
}
|
|
2297
2297
|
}
|
|
2298
|
-
const isAnthropicModel = isKnownModel || this.modelId.
|
|
2298
|
+
const isAnthropicModel = isKnownModel || this.modelId.includes("claude-");
|
|
2299
2299
|
const structureOutputMode = (_a = anthropicOptions == null ? void 0 : anthropicOptions.structuredOutputMode) != null ? _a : "jsonTool";
|
|
2300
2300
|
const useStructuredOutput = structureOutputMode === "outputFormat" || structureOutputMode === "auto" && supportsStructuredOutput;
|
|
2301
2301
|
const jsonResponseTool = (responseFormat == null ? void 0 : responseFormat.type) === "json" && responseFormat.schema != null && !useStructuredOutput ? {
|
|
@@ -3628,6 +3628,20 @@ function getModelCapabilities(modelId) {
|
|
|
3628
3628
|
rejectsSamplingParameters: false,
|
|
3629
3629
|
isKnownModel: true
|
|
3630
3630
|
};
|
|
3631
|
+
} else if (/claude-(?:instant(?:-|$)|v?2(?=$|[-.:])|3(?=$|[-.]))/.test(modelId)) {
|
|
3632
|
+
return {
|
|
3633
|
+
maxOutputTokens: 4096,
|
|
3634
|
+
supportsStructuredOutput: false,
|
|
3635
|
+
rejectsSamplingParameters: false,
|
|
3636
|
+
isKnownModel: false
|
|
3637
|
+
};
|
|
3638
|
+
} else if (modelId.includes("claude-")) {
|
|
3639
|
+
return {
|
|
3640
|
+
maxOutputTokens: 128e3,
|
|
3641
|
+
supportsStructuredOutput: true,
|
|
3642
|
+
rejectsSamplingParameters: true,
|
|
3643
|
+
isKnownModel: false
|
|
3644
|
+
};
|
|
3631
3645
|
} else {
|
|
3632
3646
|
return {
|
|
3633
3647
|
maxOutputTokens: 4096,
|