@ai-sdk/anthropic 3.0.0-beta.62 → 3.0.0-beta.63

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.
@@ -673,8 +673,8 @@ var CacheControlValidator = class {
673
673
  }
674
674
  if (!context.canCache) {
675
675
  this.warnings.push({
676
- type: "unsupported-setting",
677
- setting: "cacheControl",
676
+ type: "unsupported",
677
+ feature: "cache_control on non-cacheable context",
678
678
  details: `cache_control cannot be set on ${context.type}. It will be ignored.`
679
679
  });
680
680
  return void 0;
@@ -682,8 +682,8 @@ var CacheControlValidator = class {
682
682
  this.breakpointCount++;
683
683
  if (this.breakpointCount > MAX_CACHE_BREAKPOINTS) {
684
684
  this.warnings.push({
685
- type: "unsupported-setting",
686
- setting: "cacheControl",
685
+ type: "unsupported",
686
+ feature: "cacheControl breakpoint limit",
687
687
  details: `Maximum ${MAX_CACHE_BREAKPOINTS} cache breakpoints exceeded (found ${this.breakpointCount}). This breakpoint will be ignored.`
688
688
  });
689
689
  return void 0;
@@ -1017,14 +1017,20 @@ async function prepareTools({
1017
1017
  break;
1018
1018
  }
1019
1019
  default: {
1020
- toolWarnings.push({ type: "unsupported-tool", tool });
1020
+ toolWarnings.push({
1021
+ type: "unsupported",
1022
+ feature: `provider-defined tool ${tool.id}`
1023
+ });
1021
1024
  break;
1022
1025
  }
1023
1026
  }
1024
1027
  break;
1025
1028
  }
1026
1029
  default: {
1027
- toolWarnings.push({ type: "unsupported-tool", tool });
1030
+ toolWarnings.push({
1031
+ type: "unsupported",
1032
+ feature: `tool ${tool}`
1033
+ });
1028
1034
  break;
1029
1035
  }
1030
1036
  }
@@ -1926,34 +1932,25 @@ var AnthropicMessagesLanguageModel = class {
1926
1932
  var _a, _b, _c, _d, _e, _f;
1927
1933
  const warnings = [];
1928
1934
  if (frequencyPenalty != null) {
1929
- warnings.push({
1930
- type: "unsupported-setting",
1931
- setting: "frequencyPenalty"
1932
- });
1935
+ warnings.push({ type: "unsupported", feature: "frequencyPenalty" });
1933
1936
  }
1934
1937
  if (presencePenalty != null) {
1935
- warnings.push({
1936
- type: "unsupported-setting",
1937
- setting: "presencePenalty"
1938
- });
1938
+ warnings.push({ type: "unsupported", feature: "presencePenalty" });
1939
1939
  }
1940
1940
  if (seed != null) {
1941
- warnings.push({
1942
- type: "unsupported-setting",
1943
- setting: "seed"
1944
- });
1941
+ warnings.push({ type: "unsupported", feature: "seed" });
1945
1942
  }
1946
1943
  if (temperature != null && temperature > 1) {
1947
1944
  warnings.push({
1948
- type: "unsupported-setting",
1949
- setting: "temperature",
1945
+ type: "unsupported",
1946
+ feature: "temperature",
1950
1947
  details: `${temperature} exceeds anthropic maximum of 1.0. clamped to 1.0`
1951
1948
  });
1952
1949
  temperature = 1;
1953
1950
  } else if (temperature != null && temperature < 0) {
1954
1951
  warnings.push({
1955
- type: "unsupported-setting",
1956
- setting: "temperature",
1952
+ type: "unsupported",
1953
+ feature: "temperature",
1957
1954
  details: `${temperature} is below anthropic minimum of 0. clamped to 0`
1958
1955
  });
1959
1956
  temperature = 0;
@@ -1961,8 +1958,8 @@ var AnthropicMessagesLanguageModel = class {
1961
1958
  if ((responseFormat == null ? void 0 : responseFormat.type) === "json") {
1962
1959
  if (responseFormat.schema == null) {
1963
1960
  warnings.push({
1964
- type: "unsupported-setting",
1965
- setting: "responseFormat",
1961
+ type: "unsupported",
1962
+ feature: "responseFormat",
1966
1963
  details: "JSON response format requires a schema. The response format is ignored."
1967
1964
  });
1968
1965
  }
@@ -2055,24 +2052,24 @@ var AnthropicMessagesLanguageModel = class {
2055
2052
  if (baseArgs.temperature != null) {
2056
2053
  baseArgs.temperature = void 0;
2057
2054
  warnings.push({
2058
- type: "unsupported-setting",
2059
- setting: "temperature",
2055
+ type: "unsupported",
2056
+ feature: "temperature",
2060
2057
  details: "temperature is not supported when thinking is enabled"
2061
2058
  });
2062
2059
  }
2063
2060
  if (topK != null) {
2064
2061
  baseArgs.top_k = void 0;
2065
2062
  warnings.push({
2066
- type: "unsupported-setting",
2067
- setting: "topK",
2063
+ type: "unsupported",
2064
+ feature: "topK",
2068
2065
  details: "topK is not supported when thinking is enabled"
2069
2066
  });
2070
2067
  }
2071
2068
  if (topP != null) {
2072
2069
  baseArgs.top_p = void 0;
2073
2070
  warnings.push({
2074
- type: "unsupported-setting",
2075
- setting: "topP",
2071
+ type: "unsupported",
2072
+ feature: "topP",
2076
2073
  details: "topP is not supported when thinking is enabled"
2077
2074
  });
2078
2075
  }
@@ -2081,8 +2078,8 @@ var AnthropicMessagesLanguageModel = class {
2081
2078
  if (isKnownModel && baseArgs.max_tokens > maxOutputTokensForModel) {
2082
2079
  if (maxOutputTokens != null) {
2083
2080
  warnings.push({
2084
- type: "unsupported-setting",
2085
- setting: "maxOutputTokens",
2081
+ type: "unsupported",
2082
+ feature: "maxOutputTokens",
2086
2083
  details: `${baseArgs.max_tokens} (maxOutputTokens + thinkingBudget) is greater than ${this.modelId} ${maxOutputTokensForModel} max output tokens. The max output tokens have been limited to ${maxOutputTokensForModel}.`
2087
2084
  });
2088
2085
  }