@ai-sdk/anthropic 2.0.59 → 2.0.60

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,11 @@
1
1
  # @ai-sdk/anthropic
2
2
 
3
+ ## 2.0.60
4
+
5
+ ### Patch Changes
6
+
7
+ - 368f270: feat(anthropic): add support for Opus 4.6 fast mode
8
+
3
9
  ## 2.0.59
4
10
 
5
11
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -77,6 +77,7 @@ declare const anthropicProviderOptions: z.ZodObject<{
77
77
  high: "high";
78
78
  max: "max";
79
79
  }>>;
80
+ speed: z.ZodOptional<z.ZodLiteral<"fast">>;
80
81
  }, z.core.$strip>;
81
82
  type AnthropicProviderOptions = z.infer<typeof anthropicProviderOptions>;
82
83
 
package/dist/index.d.ts CHANGED
@@ -77,6 +77,7 @@ declare const anthropicProviderOptions: z.ZodObject<{
77
77
  high: "high";
78
78
  max: "max";
79
79
  }>>;
80
+ speed: z.ZodOptional<z.ZodLiteral<"fast">>;
80
81
  }, z.core.$strip>;
81
82
  type AnthropicProviderOptions = z.infer<typeof anthropicProviderOptions>;
82
83
 
package/dist/index.js CHANGED
@@ -31,7 +31,7 @@ var import_provider4 = require("@ai-sdk/provider");
31
31
  var import_provider_utils20 = require("@ai-sdk/provider-utils");
32
32
 
33
33
  // src/version.ts
34
- var VERSION = true ? "2.0.59" : "0.0.0-test";
34
+ var VERSION = true ? "2.0.60" : "0.0.0-test";
35
35
 
36
36
  // src/anthropic-messages-language-model.ts
37
37
  var import_provider3 = require("@ai-sdk/provider");
@@ -627,7 +627,12 @@ var anthropicProviderOptions = import_v43.z.object({
627
627
  /**
628
628
  * @default 'high'
629
629
  */
630
- effort: import_v43.z.enum(["low", "medium", "high", "max"]).optional()
630
+ effort: import_v43.z.enum(["low", "medium", "high", "max"]).optional(),
631
+ /**
632
+ * Enable fast mode for faster inference (2.5x faster output token speeds).
633
+ * Only supported with claude-opus-4-6.
634
+ */
635
+ speed: import_v43.z.literal("fast").optional()
631
636
  });
632
637
 
633
638
  // src/anthropic-prepare-tools.ts
@@ -1908,6 +1913,9 @@ var AnthropicMessagesLanguageModel = class {
1908
1913
  ...(anthropicOptions == null ? void 0 : anthropicOptions.effort) && {
1909
1914
  output_config: { effort: anthropicOptions.effort }
1910
1915
  },
1916
+ ...(anthropicOptions == null ? void 0 : anthropicOptions.speed) && {
1917
+ speed: anthropicOptions.speed
1918
+ },
1911
1919
  // structured output:
1912
1920
  ...useStructuredOutput && (responseFormat == null ? void 0 : responseFormat.type) === "json" && responseFormat.schema != null && {
1913
1921
  output_format: {
@@ -1988,6 +1996,9 @@ var AnthropicMessagesLanguageModel = class {
1988
1996
  if (anthropicOptions == null ? void 0 : anthropicOptions.effort) {
1989
1997
  betas.add("effort-2025-11-24");
1990
1998
  }
1999
+ if (anthropicOptions == null ? void 0 : anthropicOptions.speed) {
2000
+ betas.add("fast-mode-2026-02-01");
2001
+ }
1991
2002
  if (useStructuredOutput) {
1992
2003
  betas.add("structured-outputs-2025-11-13");
1993
2004
  }