@ai-sdk/anthropic 3.0.64 → 3.0.65

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,13 @@
1
1
  # @ai-sdk/anthropic
2
2
 
3
+ ## 3.0.65
4
+
5
+ ### Patch Changes
6
+
7
+ - 94aed06: fix(anthropic): allow both temperature and topP for non-Anthropic models using the Anthropic-compatible API
8
+
9
+ The temperature/topP mutual exclusivity check now only applies to known Anthropic models (model IDs starting with `claude-`). Non-Anthropic models using the Anthropic-compatible API (e.g. Minimax) can now send both parameters as required by their APIs.
10
+
3
11
  ## 3.0.64
4
12
 
5
13
  ### Patch Changes
package/dist/index.js CHANGED
@@ -32,7 +32,7 @@ var import_provider4 = require("@ai-sdk/provider");
32
32
  var import_provider_utils26 = require("@ai-sdk/provider-utils");
33
33
 
34
34
  // src/version.ts
35
- var VERSION = true ? "3.0.64" : "0.0.0-test";
35
+ var VERSION = true ? "3.0.65" : "0.0.0-test";
36
36
 
37
37
  // src/anthropic-messages-language-model.ts
38
38
  var import_provider3 = require("@ai-sdk/provider");
@@ -2949,6 +2949,7 @@ var AnthropicMessagesLanguageModel = class {
2949
2949
  supportsStructuredOutput: modelSupportsStructuredOutput,
2950
2950
  isKnownModel
2951
2951
  } = getModelCapabilities(this.modelId);
2952
+ const isAnthropicModel = isKnownModel || this.modelId.startsWith("claude-");
2952
2953
  const supportsStructuredOutput = ((_a = this.config.supportsNativeStructuredOutput) != null ? _a : true) && modelSupportsStructuredOutput;
2953
2954
  const supportsStrictTools = ((_b = this.config.supportsStrictTools) != null ? _b : true) && modelSupportsStructuredOutput;
2954
2955
  const structureOutputMode = (_c = anthropicOptions == null ? void 0 : anthropicOptions.structuredOutputMode) != null ? _c : "auto";
@@ -3156,7 +3157,7 @@ var AnthropicMessagesLanguageModel = class {
3156
3157
  }
3157
3158
  baseArgs.max_tokens = maxTokens + (thinkingBudget != null ? thinkingBudget : 0);
3158
3159
  } else {
3159
- if (topP != null && temperature != null) {
3160
+ if (isAnthropicModel && topP != null && temperature != null) {
3160
3161
  warnings.push({
3161
3162
  type: "unsupported",
3162
3163
  feature: "topP",