@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.
@@ -1418,19 +1418,20 @@ async function convertToAnthropicMessagesPrompt({
1418
1418
  const type = block.type;
1419
1419
  switch (type) {
1420
1420
  case "system": {
1421
- if (system != null) {
1422
- throw new UnsupportedFunctionalityError2({
1423
- functionality: "Multiple system messages that are separated by user/assistant messages"
1424
- });
1425
- }
1426
- system = block.messages.map(({ content, providerOptions }) => ({
1421
+ const content = block.messages.map(({ content: content2, providerOptions }) => ({
1427
1422
  type: "text",
1428
- text: content,
1423
+ text: content2,
1429
1424
  cache_control: validator.getCacheControl(providerOptions, {
1430
1425
  type: "system message",
1431
1426
  canCache: true
1432
1427
  })
1433
1428
  }));
1429
+ if (system == null) {
1430
+ system = content;
1431
+ } else {
1432
+ messages.push({ role: "system", content });
1433
+ betas.add("mid-conversation-system-2026-04-07");
1434
+ }
1434
1435
  break;
1435
1436
  }
1436
1437
  case "user": {
@@ -3453,7 +3454,7 @@ var AnthropicMessagesLanguageModel = class {
3453
3454
  }
3454
3455
  };
3455
3456
  function getModelCapabilities(modelId) {
3456
- if (modelId.includes("claude-opus-4-7")) {
3457
+ if (modelId.includes("claude-opus-4-8") || modelId.includes("claude-opus-4-7")) {
3457
3458
  return {
3458
3459
  maxOutputTokens: 128e3,
3459
3460
  supportsStructuredOutput: true,