@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-sdk/anthropic",
3
- "version": "3.0.64",
3
+ "version": "3.0.65",
4
4
  "license": "Apache-2.0",
5
5
  "sideEffects": false,
6
6
  "main": "./dist/index.js",
@@ -272,6 +272,8 @@ export class AnthropicMessagesLanguageModel implements LanguageModelV3 {
272
272
  isKnownModel,
273
273
  } = getModelCapabilities(this.modelId);
274
274
 
275
+ const isAnthropicModel = isKnownModel || this.modelId.startsWith('claude-');
276
+
275
277
  const supportsStructuredOutput =
276
278
  (this.config.supportsNativeStructuredOutput ?? true) &&
277
279
  modelSupportsStructuredOutput;
@@ -535,8 +537,10 @@ export class AnthropicMessagesLanguageModel implements LanguageModelV3 {
535
537
  // adjust max tokens to account for thinking:
536
538
  baseArgs.max_tokens = maxTokens + (thinkingBudget ?? 0);
537
539
  } else {
538
- // Only check temperature/topP mutual exclusivity when thinking is not enabled
539
- if (topP != null && temperature != null) {
540
+ // Only check temperature/topP mutual exclusivity for known Anthropic models
541
+ // when thinking is not enabled. Non-Anthropic models using the Anthropic-compatible
542
+ // API (e.g. Minimax) may require both parameters to be set.
543
+ if (isAnthropicModel && topP != null && temperature != null) {
540
544
  warnings.push({
541
545
  type: 'unsupported',
542
546
  feature: 'topP',