@openrouter/ai-sdk-provider 2.1.3 → 2.2.1

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.
@@ -2470,10 +2470,15 @@ function convertToOpenRouterChatMessages(prompt) {
2470
2470
  for (const { role, content, providerOptions } of prompt) {
2471
2471
  switch (role) {
2472
2472
  case "system": {
2473
+ const cacheControl = getCacheControl(providerOptions);
2473
2474
  messages.push({
2474
2475
  role: "system",
2475
- content,
2476
- cache_control: getCacheControl(providerOptions)
2476
+ content: [
2477
+ __spreadValues({
2478
+ type: "text",
2479
+ text: content
2480
+ }, cacheControl && { cache_control: cacheControl })
2481
+ ]
2477
2482
  });
2478
2483
  break;
2479
2484
  }