@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 CHANGED
@@ -1,5 +1,19 @@
1
1
  # @ai-sdk/anthropic
2
2
 
3
+ ## 3.0.39
4
+
5
+ ### Patch Changes
6
+
7
+ - 0a0d29c: feat(anthropic): add support for Opus 4.6 fast mode
8
+
9
+ ## 3.0.38
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies [7168375]
14
+ - @ai-sdk/provider@3.0.8
15
+ - @ai-sdk/provider-utils@4.0.14
16
+
3
17
  ## 3.0.37
4
18
 
5
19
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -140,6 +140,7 @@ declare const anthropicProviderOptions: z.ZodObject<{
140
140
  high: "high";
141
141
  max: "max";
142
142
  }>>;
143
+ speed: z.ZodOptional<z.ZodLiteral<"fast">>;
143
144
  contextManagement: z.ZodOptional<z.ZodObject<{
144
145
  edits: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
145
146
  type: z.ZodLiteral<"clear_tool_uses_20250919">;
package/dist/index.d.ts CHANGED
@@ -140,6 +140,7 @@ declare const anthropicProviderOptions: z.ZodObject<{
140
140
  high: "high";
141
141
  max: "max";
142
142
  }>>;
143
+ speed: z.ZodOptional<z.ZodLiteral<"fast">>;
143
144
  contextManagement: z.ZodOptional<z.ZodObject<{
144
145
  edits: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
145
146
  type: z.ZodLiteral<"clear_tool_uses_20250919">;
package/dist/index.js CHANGED
@@ -32,7 +32,7 @@ var import_provider4 = require("@ai-sdk/provider");
32
32
  var import_provider_utils23 = require("@ai-sdk/provider-utils");
33
33
 
34
34
  // src/version.ts
35
- var VERSION = true ? "3.0.37" : "0.0.0-test";
35
+ var VERSION = true ? "3.0.39" : "0.0.0-test";
36
36
 
37
37
  // src/anthropic-messages-language-model.ts
38
38
  var import_provider3 = require("@ai-sdk/provider");
@@ -826,6 +826,11 @@ var anthropicProviderOptions = import_v43.z.object({
826
826
  * @default 'high'
827
827
  */
828
828
  effort: import_v43.z.enum(["low", "medium", "high", "max"]).optional(),
829
+ /**
830
+ * Enable fast mode for faster inference (2.5x faster output token speeds).
831
+ * Only supported with claude-opus-4-6.
832
+ */
833
+ speed: import_v43.z.literal("fast").optional(),
829
834
  contextManagement: import_v43.z.object({
830
835
  edits: import_v43.z.array(
831
836
  import_v43.z.discriminatedUnion("type", [
@@ -2571,6 +2576,9 @@ var AnthropicMessagesLanguageModel = class {
2571
2576
  ...(anthropicOptions == null ? void 0 : anthropicOptions.effort) && {
2572
2577
  output_config: { effort: anthropicOptions.effort }
2573
2578
  },
2579
+ ...(anthropicOptions == null ? void 0 : anthropicOptions.speed) && {
2580
+ speed: anthropicOptions.speed
2581
+ },
2574
2582
  // structured output:
2575
2583
  ...useStructuredOutput && (responseFormat == null ? void 0 : responseFormat.type) === "json" && responseFormat.schema != null && {
2576
2584
  output_format: {
@@ -2729,6 +2737,9 @@ var AnthropicMessagesLanguageModel = class {
2729
2737
  if (anthropicOptions == null ? void 0 : anthropicOptions.effort) {
2730
2738
  betas.add("effort-2025-11-24");
2731
2739
  }
2740
+ if (anthropicOptions == null ? void 0 : anthropicOptions.speed) {
2741
+ betas.add("fast-mode-2026-02-01");
2742
+ }
2732
2743
  if (stream && ((_f = anthropicOptions == null ? void 0 : anthropicOptions.toolStreaming) != null ? _f : true)) {
2733
2744
  betas.add("fine-grained-tool-streaming-2025-05-14");
2734
2745
  }