@ai-sdk/anthropic 3.0.98 → 3.0.100

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.98",
3
+ "version": "3.0.100",
4
4
  "license": "Apache-2.0",
5
5
  "sideEffects": false,
6
6
  "main": "./dist/index.js",
@@ -279,6 +279,17 @@ export class AnthropicMessagesLanguageModel implements LanguageModelV3 {
279
279
  isKnownModel,
280
280
  } = getModelCapabilities(this.modelId);
281
281
 
282
+ if (!isKnownModel && maxOutputTokens == null) {
283
+ warnings.push({
284
+ type: 'compatibility',
285
+ feature: 'maxOutputTokens',
286
+ details:
287
+ `The model "${this.modelId}" is unknown. ` +
288
+ `The max output tokens have been limited to ${maxOutputTokensForModel}. ` +
289
+ `Set maxOutputTokens explicitly to override this limit.`,
290
+ });
291
+ }
292
+
282
293
  if (rejectsSamplingParameters) {
283
294
  if (temperature != null) {
284
295
  warnings.push({
@@ -334,6 +345,19 @@ export class AnthropicMessagesLanguageModel implements LanguageModelV3 {
334
345
  }
335
346
  : undefined;
336
347
 
348
+ if (
349
+ jsonResponseTool != null &&
350
+ anthropicOptions?.disableParallelToolUse === false
351
+ ) {
352
+ warnings.push({
353
+ type: 'unsupported',
354
+ feature: 'providerOptions.anthropic.disableParallelToolUse',
355
+ details:
356
+ '`disableParallelToolUse: false` is ignored when using the JSON response tool. ' +
357
+ 'Parallel tool use is disabled to ensure a single coherent JSON tool call.',
358
+ });
359
+ }
360
+
337
361
  const contextManagement = anthropicOptions?.contextManagement;
338
362
 
339
363
  // Create a shared cache control validator to track breakpoints across tools and messages
@@ -2,3 +2,4 @@ export { AnthropicMessagesLanguageModel } from '../anthropic-messages-language-m
2
2
  export { anthropicTools } from '../anthropic-tools';
3
3
  export type { AnthropicMessagesModelId } from '../anthropic-messages-options';
4
4
  export { prepareTools } from '../anthropic-prepare-tools';
5
+ export { sanitizeJsonSchema } from '../sanitize-json-schema';