Prompt Caching: Top-Level cache_control im Request-Body

This commit is contained in:
Meleki committed 2026-02-28 17:16:58 +01:00
1 parent 52e9ef7f9e
commit 92072f5064
3 files changed
+14 -33

No files matched your search

+1 -3
View File
@@ -142,11 +142,9 @@ public static class ChatEndpoint
}, attachmentRecords);
}
// cache_control markiert den System-Prompt als Cache-Breakpoint.
// Anthropic cached alles bis einschließlich dieses Blocks für 5 Minuten → 90% Rabatt auf diese Tokens.
var systemPrompt = new List<object>
{
new { type = "text", text = systemPromptText, cache_control = new { type = "ephemeral" } }
new { type = "text", text = systemPromptText }
};
var workspace = session.Workspace;