feat(ai): enable Mistral prompt caching

This commit is contained in:
Armin Ronacher
2026-06-18 23:47:25 +02:00
parent 8025fdd01f
commit 651d10d90b
8 changed files with 152 additions and 45 deletions

View File

@@ -948,7 +948,7 @@ async function loadModelsDevData(): Promise<Model<any>[]> {
cost: {
input: m.cost?.input || 0,
output: m.cost?.output || 0,
cacheRead: m.cost?.cache_read || 0,
cacheRead: m.cost?.cache_read ?? (m.cost?.input ? roundCost(m.cost.input * 0.1) : 0),
cacheWrite: m.cost?.cache_write || 0,
},
contextWindow: m.limit?.context || 4096,