@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.
@@ -805,6 +805,11 @@ var anthropicProviderOptions = z3.object({
805
805
  * @default 'high'
806
806
  */
807
807
  effort: z3.enum(["low", "medium", "high", "max"]).optional(),
808
+ /**
809
+ * Enable fast mode for faster inference (2.5x faster output token speeds).
810
+ * Only supported with claude-opus-4-6.
811
+ */
812
+ speed: z3.literal("fast").optional(),
808
813
  contextManagement: z3.object({
809
814
  edits: z3.array(
810
815
  z3.discriminatedUnion("type", [
@@ -2579,6 +2584,9 @@ var AnthropicMessagesLanguageModel = class {
2579
2584
  ...(anthropicOptions == null ? void 0 : anthropicOptions.effort) && {
2580
2585
  output_config: { effort: anthropicOptions.effort }
2581
2586
  },
2587
+ ...(anthropicOptions == null ? void 0 : anthropicOptions.speed) && {
2588
+ speed: anthropicOptions.speed
2589
+ },
2582
2590
  // structured output:
2583
2591
  ...useStructuredOutput && (responseFormat == null ? void 0 : responseFormat.type) === "json" && responseFormat.schema != null && {
2584
2592
  output_format: {
@@ -2737,6 +2745,9 @@ var AnthropicMessagesLanguageModel = class {
2737
2745
  if (anthropicOptions == null ? void 0 : anthropicOptions.effort) {
2738
2746
  betas.add("effort-2025-11-24");
2739
2747
  }
2748
+ if (anthropicOptions == null ? void 0 : anthropicOptions.speed) {
2749
+ betas.add("fast-mode-2026-02-01");
2750
+ }
2740
2751
  if (stream && ((_f = anthropicOptions == null ? void 0 : anthropicOptions.toolStreaming) != null ? _f : true)) {
2741
2752
  betas.add("fine-grained-tool-streaming-2025-05-14");
2742
2753
  }