@ai-sdk/anthropic 2.0.75 → 2.0.77

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.
@@ -722,6 +722,15 @@ var anthropicProviderOptions = import_v43.z.object({
722
722
  * Only supported with claude-opus-4-6.
723
723
  */
724
724
  speed: import_v43.z.enum(["fast", "standard"]).optional(),
725
+ /**
726
+ * Controls where model inference runs for this request.
727
+ *
728
+ * - `"global"`: Inference may run in any available geography (default).
729
+ * - `"us"`: Inference runs only in US-based infrastructure.
730
+ *
731
+ * See https://platform.claude.com/docs/en/build-with-claude/data-residency
732
+ */
733
+ inferenceGeo: import_v43.z.enum(["us", "global"]).optional(),
725
734
  /**
726
735
  * Context management configuration for automatic context window management.
727
736
  * Enables features like automatic compaction and clearing of tool uses/thinking blocks.
@@ -2133,6 +2142,9 @@ var AnthropicMessagesLanguageModel = class {
2133
2142
  ...(anthropicOptions == null ? void 0 : anthropicOptions.speed) && {
2134
2143
  speed: anthropicOptions.speed
2135
2144
  },
2145
+ ...(anthropicOptions == null ? void 0 : anthropicOptions.inferenceGeo) && {
2146
+ inference_geo: anthropicOptions.inferenceGeo
2147
+ },
2136
2148
  ...(anthropicOptions == null ? void 0 : anthropicOptions.cacheControl) && {
2137
2149
  cache_control: anthropicOptions.cacheControl
2138
2150
  },
@@ -2214,9 +2226,15 @@ var AnthropicMessagesLanguageModel = class {
2214
2226
  };
2215
2227
  if (isThinking) {
2216
2228
  if (thinkingType === "enabled" && thinkingBudget == null) {
2217
- throw new import_provider3.UnsupportedFunctionalityError({
2218
- functionality: "thinking requires a budget"
2229
+ warnings.push({
2230
+ type: "other",
2231
+ message: "thinking budget is required when thinking is enabled. using default budget of 1024 tokens."
2219
2232
  });
2233
+ baseArgs.thinking = {
2234
+ type: "enabled",
2235
+ budget_tokens: 1024
2236
+ };
2237
+ thinkingBudget = 1024;
2220
2238
  }
2221
2239
  if (baseArgs.temperature != null) {
2222
2240
  baseArgs.temperature = void 0;