From 5f58a62d314fa75f878676b73585582301755895 Mon Sep 17 00:00:00 2001 From: Guillaume Sabran Date: Thu, 29 May 2025 09:49:44 -0700 Subject: [PATCH 1/2] Update cache-control.test.ts --- e2e/cache-control.test.ts | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/e2e/cache-control.test.ts b/e2e/cache-control.test.ts index 7887f2b..109767f 100644 --- a/e2e/cache-control.test.ts +++ b/e2e/cache-control.test.ts @@ -47,22 +47,31 @@ async function callLLM() { model, messages: [ { - role: 'user', + role: "user", content: [ { - type: 'text', - text: 'a'.repeat(4200), + type: "text", + text: "a".repeat(4200), + }, + { + type: "text", + text: 'How many "a" did I use in the previous message?', providerOptions: { openrouter: { cache_control: { - type: 'ephemeral', + type: "ephemeral", }, }, }, }, + ], + }, + { + role: "user", + content: [ { - type: 'text', - text: 'How many "a" did I use in the previous message?', + type: "text", + text: "hi", }, ], }, From dc14738e3d5ba703949bef6c494c9c5c01249092 Mon Sep 17 00:00:00 2001 From: Guillaume Sabran Date: Thu, 29 May 2025 09:52:19 -0700 Subject: [PATCH 2/2] Update cache-control.test.ts --- e2e/cache-control.test.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/e2e/cache-control.test.ts b/e2e/cache-control.test.ts index 109767f..73bec1d 100644 --- a/e2e/cache-control.test.ts +++ b/e2e/cache-control.test.ts @@ -52,10 +52,6 @@ async function callLLM() { { type: "text", text: "a".repeat(4200), - }, - { - type: "text", - text: 'How many "a" did I use in the previous message?', providerOptions: { openrouter: { cache_control: { @@ -64,6 +60,10 @@ async function callLLM() { }, }, }, + { + type: "text", + text: 'How many "a" did I use in the previous message?', + }, ], }, {