Feat: Enable automatic prompt caching for Claude

Co-authored-by: gemini-3.7-flash <noreply@google.com>
This commit is contained in:
2026-09-01 15:00:34 -07:00
parent a32e82fac3
commit 0afc0ca139

View File

@@ -238,6 +238,7 @@ export async function streamClaude({ apiKey, body, signal, onDelta, isRunning })
}).filter(Boolean),
})).filter(m => m.content.length),
max_tokens: CLAUDE_MAX_TOKENS,
cache_control: { type: 'ephemeral' },
}
if (system) payload.system = system
if (Number.isFinite(+body.temperature)) payload.temperature = +body.temperature