diff --git a/e2e/global-setup.ts b/e2e/global-setup.ts index 6fda3df..f4c958e 100644 --- a/e2e/global-setup.ts +++ b/e2e/global-setup.ts @@ -53,6 +53,12 @@ function startMockLlm(): Promise { let parsed: any = {}; try { parsed = JSON.parse(body); } catch { parsed = {}; } const model = parsed.model || "mock-model"; + const systemMsg = Array.isArray(parsed.messages) + ? parsed.messages.find((m: any) => m.role === "system") + : undefined; + if (systemMsg?.content) { + (globalThis as any).__lastMockSystemPrompt = systemMsg.content; + } const chars = Array.from(MOCK_REPLY); res.writeHead(200, { "Content-Type": "text/event-stream",