@ai-sdk/anthropic 4.0.0-beta.13 → 4.0.0-beta.15

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/dist/index.mjs CHANGED
@@ -12,7 +12,7 @@ import {
12
12
  } from "@ai-sdk/provider-utils";
13
13
 
14
14
  // src/version.ts
15
- var VERSION = true ? "4.0.0-beta.13" : "0.0.0-test";
15
+ var VERSION = true ? "4.0.0-beta.15" : "0.0.0-test";
16
16
 
17
17
  // src/anthropic-messages-language-model.ts
18
18
  import {
@@ -2991,6 +2991,7 @@ var AnthropicMessagesLanguageModel = class {
2991
2991
  supportsAdaptiveThinking,
2992
2992
  isKnownModel
2993
2993
  } = getModelCapabilities(this.modelId);
2994
+ const isAnthropicModel = isKnownModel || this.modelId.startsWith("claude-");
2994
2995
  const supportsStructuredOutput = ((_a = this.config.supportsNativeStructuredOutput) != null ? _a : true) && modelSupportsStructuredOutput;
2995
2996
  const supportsStrictTools = ((_b = this.config.supportsStrictTools) != null ? _b : true) && modelSupportsStructuredOutput;
2996
2997
  const structureOutputMode = (_c = anthropicOptions == null ? void 0 : anthropicOptions.structuredOutputMode) != null ? _c : "auto";
@@ -3212,7 +3213,7 @@ var AnthropicMessagesLanguageModel = class {
3212
3213
  }
3213
3214
  baseArgs.max_tokens = maxTokens + (thinkingBudget != null ? thinkingBudget : 0);
3214
3215
  } else {
3215
- if (topP != null && temperature != null) {
3216
+ if (isAnthropicModel && topP != null && temperature != null) {
3216
3217
  warnings.push({
3217
3218
  type: "unsupported",
3218
3219
  feature: "topP",