@ai-sdk/anthropic 3.0.37 → 3.0.39
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 +14 -0
- package/dist/index.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +12 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +12 -1
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.js +11 -0
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +11 -0
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +3 -3
- package/src/anthropic-messages-language-model.ts +7 -0
- package/src/anthropic-messages-options.ts +6 -0
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.39" : "0.0.0-test";
|
|
16
16
|
|
|
17
17
|
// src/anthropic-messages-language-model.ts
|
|
18
18
|
import {
|
|
@@ -821,6 +821,11 @@ var anthropicProviderOptions = z3.object({
|
|
|
821
821
|
* @default 'high'
|
|
822
822
|
*/
|
|
823
823
|
effort: z3.enum(["low", "medium", "high", "max"]).optional(),
|
|
824
|
+
/**
|
|
825
|
+
* Enable fast mode for faster inference (2.5x faster output token speeds).
|
|
826
|
+
* Only supported with claude-opus-4-6.
|
|
827
|
+
*/
|
|
828
|
+
speed: z3.literal("fast").optional(),
|
|
824
829
|
contextManagement: z3.object({
|
|
825
830
|
edits: z3.array(
|
|
826
831
|
z3.discriminatedUnion("type", [
|
|
@@ -2595,6 +2600,9 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
2595
2600
|
...(anthropicOptions == null ? void 0 : anthropicOptions.effort) && {
|
|
2596
2601
|
output_config: { effort: anthropicOptions.effort }
|
|
2597
2602
|
},
|
|
2603
|
+
...(anthropicOptions == null ? void 0 : anthropicOptions.speed) && {
|
|
2604
|
+
speed: anthropicOptions.speed
|
|
2605
|
+
},
|
|
2598
2606
|
// structured output:
|
|
2599
2607
|
...useStructuredOutput && (responseFormat == null ? void 0 : responseFormat.type) === "json" && responseFormat.schema != null && {
|
|
2600
2608
|
output_format: {
|
|
@@ -2753,6 +2761,9 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
2753
2761
|
if (anthropicOptions == null ? void 0 : anthropicOptions.effort) {
|
|
2754
2762
|
betas.add("effort-2025-11-24");
|
|
2755
2763
|
}
|
|
2764
|
+
if (anthropicOptions == null ? void 0 : anthropicOptions.speed) {
|
|
2765
|
+
betas.add("fast-mode-2026-02-01");
|
|
2766
|
+
}
|
|
2756
2767
|
if (stream && ((_f = anthropicOptions == null ? void 0 : anthropicOptions.toolStreaming) != null ? _f : true)) {
|
|
2757
2768
|
betas.add("fine-grained-tool-streaming-2025-05-14");
|
|
2758
2769
|
}
|