@ai-sdk/anthropic 2.0.79 → 2.0.80

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
@@ -11,7 +11,7 @@ import {
11
11
  } from "@ai-sdk/provider-utils";
12
12
 
13
13
  // src/version.ts
14
- var VERSION = true ? "2.0.79" : "0.0.0-test";
14
+ var VERSION = true ? "2.0.80" : "0.0.0-test";
15
15
 
16
16
  // src/anthropic-messages-language-model.ts
17
17
  import {
@@ -1433,19 +1433,20 @@ async function convertToAnthropicMessagesPrompt({
1433
1433
  const type = block.type;
1434
1434
  switch (type) {
1435
1435
  case "system": {
1436
- if (system != null) {
1437
- throw new UnsupportedFunctionalityError2({
1438
- functionality: "Multiple system messages that are separated by user/assistant messages"
1439
- });
1440
- }
1441
- system = block.messages.map(({ content, providerOptions }) => ({
1436
+ const content = block.messages.map(({ content: content2, providerOptions }) => ({
1442
1437
  type: "text",
1443
- text: content,
1438
+ text: content2,
1444
1439
  cache_control: validator.getCacheControl(providerOptions, {
1445
1440
  type: "system message",
1446
1441
  canCache: true
1447
1442
  })
1448
1443
  }));
1444
+ if (system == null) {
1445
+ system = content;
1446
+ } else {
1447
+ messages.push({ role: "system", content });
1448
+ betas.add("mid-conversation-system-2026-04-07");
1449
+ }
1449
1450
  break;
1450
1451
  }
1451
1452
  case "user": {
@@ -3468,7 +3469,7 @@ var AnthropicMessagesLanguageModel = class {
3468
3469
  }
3469
3470
  };
3470
3471
  function getModelCapabilities(modelId) {
3471
- if (modelId.includes("claude-opus-4-7")) {
3472
+ if (modelId.includes("claude-opus-4-8") || modelId.includes("claude-opus-4-7")) {
3472
3473
  return {
3473
3474
  maxOutputTokens: 128e3,
3474
3475
  supportsStructuredOutput: true,