@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.d.mts +17 -0
- package/dist/index.d.ts +17 -0
- package/dist/index.js +8 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8 -3
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.d.mts +17 -0
- package/dist/internal/index.d.ts +17 -0
- package/dist/internal/index.js +7 -2
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +7 -2
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/internal/index.mjs
CHANGED
|
@@ -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
|
-
|
|
2476
|
+
content: [
|
|
2477
|
+
__spreadValues({
|
|
2478
|
+
type: "text",
|
|
2479
|
+
text: content
|
|
2480
|
+
}, cacheControl && { cache_control: cacheControl })
|
|
2481
|
+
]
|
|
2477
2482
|
});
|
|
2478
2483
|
break;
|
|
2479
2484
|
}
|