9router/open-sse/handlers/chatCore
hodtien 54e3245ace feat(usage): track cached tokens + correct input/output/cache cost (#2209)
Normalize every provider to one cache-inclusive convention via
canonicalizeUsage() before persist, and price cached + cache_creation as
subsets of prompt_tokens in calculateCostFromTokens() to stop
double-counting. usageRepo now delegates cost math to a single source.
Surface Cached tokens/cost across dashboard (overview, tokens, cost,
details). Merge Claude message_start cache with message_delta output so
cache counts survive. Compatible LLM nodes now allow multiple API-key
connections (key pool).

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-03 15:18:27 +07:00
..
nonStreamingHandler.js feat(kimchi): add Kimchi OAuth provider support 2026-06-29 15:29:17 +07:00
requestDetail.js feat(usage): track cached tokens + correct input/output/cache cost (#2209) 2026-07-03 15:18:27 +07:00
sseToJsonHandler.js refactor(open-sse): registry consolidation + DRY media/oauth/adhoc cleanup 2026-06-14 13:15:48 +07:00
streamingHandler.js fix(usage): dedupe streaming request-details log entries 2026-07-03 15:14:49 +07:00