@ai-sdk/anthropic 3.0.100 → 3.0.101
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.d.mts +13 -1
- package/dist/internal/index.d.ts +13 -1
- package/dist/internal/index.js +17 -1
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +16 -1
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/anthropic-messages-language-model.ts +21 -2
- package/src/internal/index.ts +4 -1
package/dist/index.mjs
CHANGED
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
} from "@ai-sdk/provider-utils";
|
|
13
13
|
|
|
14
14
|
// src/version.ts
|
|
15
|
-
var VERSION = true ? "3.0.
|
|
15
|
+
var VERSION = true ? "3.0.101" : "0.0.0-test";
|
|
16
16
|
|
|
17
17
|
// src/anthropic-messages-language-model.ts
|
|
18
18
|
import {
|
|
@@ -3480,7 +3480,7 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
3480
3480
|
topP = void 0;
|
|
3481
3481
|
}
|
|
3482
3482
|
}
|
|
3483
|
-
const isAnthropicModel = isKnownModel || this.modelId.
|
|
3483
|
+
const isAnthropicModel = isKnownModel || this.modelId.includes("claude-");
|
|
3484
3484
|
const supportsStructuredOutput = ((_a = this.config.supportsNativeStructuredOutput) != null ? _a : true) && modelSupportsStructuredOutput;
|
|
3485
3485
|
const supportsStrictTools = ((_b = this.config.supportsStrictTools) != null ? _b : true) && modelSupportsStructuredOutput;
|
|
3486
3486
|
const structureOutputMode = (_c = anthropicOptions == null ? void 0 : anthropicOptions.structuredOutputMode) != null ? _c : "auto";
|
|
@@ -5298,6 +5298,20 @@ function getModelCapabilities(modelId) {
|
|
|
5298
5298
|
rejectsSamplingParameters: false,
|
|
5299
5299
|
isKnownModel: true
|
|
5300
5300
|
};
|
|
5301
|
+
} else if (/claude-(?:instant(?:-|$)|v?2(?=$|[-.:])|3(?=$|[-.]))/.test(modelId)) {
|
|
5302
|
+
return {
|
|
5303
|
+
maxOutputTokens: 4096,
|
|
5304
|
+
supportsStructuredOutput: false,
|
|
5305
|
+
rejectsSamplingParameters: false,
|
|
5306
|
+
isKnownModel: false
|
|
5307
|
+
};
|
|
5308
|
+
} else if (modelId.includes("claude-")) {
|
|
5309
|
+
return {
|
|
5310
|
+
maxOutputTokens: 128e3,
|
|
5311
|
+
supportsStructuredOutput: true,
|
|
5312
|
+
rejectsSamplingParameters: true,
|
|
5313
|
+
isKnownModel: false
|
|
5314
|
+
};
|
|
5301
5315
|
} else {
|
|
5302
5316
|
return {
|
|
5303
5317
|
maxOutputTokens: 4096,
|