@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.
package/dist/index.mjs CHANGED
@@ -2505,10 +2505,15 @@ function convertToOpenRouterChatMessages(prompt) {
2505
2505
  for (const { role, content, providerOptions } of prompt) {
2506
2506
  switch (role) {
2507
2507
  case "system": {
2508
+ const cacheControl = getCacheControl(providerOptions);
2508
2509
  messages.push({
2509
2510
  role: "system",
2510
- content,
2511
- cache_control: getCacheControl(providerOptions)
2511
+ content: [
2512
+ __spreadValues({
2513
+ type: "text",
2514
+ text: content
2515
+ }, cacheControl && { cache_control: cacheControl })
2516
+ ]
2512
2517
  });
2513
2518
  break;
2514
2519
  }
@@ -4488,7 +4493,7 @@ function withUserAgentSuffix2(headers, ...userAgentSuffixParts) {
4488
4493
  }
4489
4494
 
4490
4495
  // src/version.ts
4491
- var VERSION2 = false ? "0.0.0-test" : "2.1.3";
4496
+ var VERSION2 = false ? "0.0.0-test" : "2.2.1";
4492
4497
 
4493
4498
  // src/provider.ts
4494
4499
  function createOpenRouter(options = {}) {