@openrouter/ai-sdk-provider 2.1.2 → 2.2.0

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.d.mts CHANGED
@@ -312,7 +312,7 @@ type OpenRouterProviderOptions = {
312
312
  } & ({
313
313
  max_tokens: number;
314
314
  } | {
315
- effort: 'high' | 'medium' | 'low';
315
+ effort: 'xhigh' | 'high' | 'medium' | 'low' | 'minimal' | 'none';
316
316
  });
317
317
  /**
318
318
  * A unique identifier representing your end-user, which can
package/dist/index.d.ts CHANGED
@@ -312,7 +312,7 @@ type OpenRouterProviderOptions = {
312
312
  } & ({
313
313
  max_tokens: number;
314
314
  } | {
315
- effort: 'high' | 'medium' | 'low';
315
+ effort: 'xhigh' | 'high' | 'medium' | 'low' | 'minimal' | 'none';
316
316
  });
317
317
  /**
318
318
  * A unique identifier representing your end-user, which can
package/dist/index.js CHANGED
@@ -2538,10 +2538,15 @@ function convertToOpenRouterChatMessages(prompt) {
2538
2538
  for (const { role, content, providerOptions } of prompt) {
2539
2539
  switch (role) {
2540
2540
  case "system": {
2541
+ const cacheControl = getCacheControl(providerOptions);
2541
2542
  messages.push({
2542
2543
  role: "system",
2543
- content,
2544
- cache_control: getCacheControl(providerOptions)
2544
+ content: [
2545
+ __spreadValues({
2546
+ type: "text",
2547
+ text: content
2548
+ }, cacheControl && { cache_control: cacheControl })
2549
+ ]
2545
2550
  });
2546
2551
  break;
2547
2552
  }
@@ -4521,7 +4526,7 @@ function withUserAgentSuffix2(headers, ...userAgentSuffixParts) {
4521
4526
  }
4522
4527
 
4523
4528
  // src/version.ts
4524
- var VERSION2 = false ? "0.0.0-test" : "2.1.2";
4529
+ var VERSION2 = false ? "0.0.0-test" : "2.2.0";
4525
4530
 
4526
4531
  // src/provider.ts
4527
4532
  function createOpenRouter(options = {}) {