@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/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # @ai-sdk/anthropic
2
2
 
3
+ ## 4.0.0-beta.15
4
+
5
+ ### Patch Changes
6
+
7
+ - f57c702: 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
+
11
+ ## 4.0.0-beta.14
12
+
13
+ ### Patch Changes
14
+
15
+ - Updated dependencies [2e17091]
16
+ - @ai-sdk/provider-utils@5.0.0-beta.9
17
+
3
18
  ## 4.0.0-beta.13
4
19
 
5
20
  ### 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 ? "4.0.0-beta.13" : "0.0.0-test";
35
+ var VERSION = true ? "4.0.0-beta.15" : "0.0.0-test";
36
36
 
37
37
  // src/anthropic-messages-language-model.ts
38
38
  var import_provider3 = require("@ai-sdk/provider");
@@ -2951,6 +2951,7 @@ var AnthropicMessagesLanguageModel = class {
2951
2951
  supportsAdaptiveThinking,
2952
2952
  isKnownModel
2953
2953
  } = getModelCapabilities(this.modelId);
2954
+ const isAnthropicModel = isKnownModel || this.modelId.startsWith("claude-");
2954
2955
  const supportsStructuredOutput = ((_a = this.config.supportsNativeStructuredOutput) != null ? _a : true) && modelSupportsStructuredOutput;
2955
2956
  const supportsStrictTools = ((_b = this.config.supportsStrictTools) != null ? _b : true) && modelSupportsStructuredOutput;
2956
2957
  const structureOutputMode = (_c = anthropicOptions == null ? void 0 : anthropicOptions.structuredOutputMode) != null ? _c : "auto";
@@ -3172,7 +3173,7 @@ var AnthropicMessagesLanguageModel = class {
3172
3173
  }
3173
3174
  baseArgs.max_tokens = maxTokens + (thinkingBudget != null ? thinkingBudget : 0);
3174
3175
  } else {
3175
- if (topP != null && temperature != null) {
3176
+ if (isAnthropicModel && topP != null && temperature != null) {
3176
3177
  warnings.push({
3177
3178
  type: "unsupported",
3178
3179
  feature: "topP",