mirror of
https://github.com/stack-auth/stack.git
synced 2026-06-19 21:00:40 +08:00
Add an ephemeral cache_control breakpoint on the system message so OpenRouter forwards it to upstream Anthropic providers (Anthropic direct, Amazon Bedrock, Google Vertex). Without the breakpoint, none of them cache — the OpenRouter activity log showed tokens_cached=0 on every Claude request. Verified with live OpenRouter calls: 2nd identical request now reports ~99% cache hit on the system prompt, cutting per-call input cost ~12x. |
||
|---|---|---|
| .. | ||
| prisma | ||
| scripts | ||
| src | ||
| .env | ||
| .env.development | ||
| .eslintrc.cjs | ||
| .gitignore | ||
| instrumentation-client.ts | ||
| LICENSE | ||
| next.config.mjs | ||
| package.json | ||
| prisma.config.ts | ||
| tsconfig.json | ||
| vercel.json | ||
| vitest.config.ts | ||
| vitest.setup.ts | ||