9router/open-sse/handlers/chatCore
Qin Li 960f8a0379 fix(usage): dedupe streaming request-details log entries
handleStreamingResponse and buildOnStreamComplete each generated their
own streamDetailId for what should be one logical record — the
placeholder row (0 tokens) and the final row (real usage) never shared
an id, so the DB's ON CONFLICT(id) upsert never merged them, leaving a
permanent 0-token stub for every streaming request.

Share the id from buildOnStreamComplete with handleStreamingResponse
so both writes hit the same row.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-03 15:14:49 +07:00
..
nonStreamingHandler.js feat(kimchi): add Kimchi OAuth provider support 2026-06-29 15:29:17 +07:00
requestDetail.js Feat : console log 2026-03-02 09:31:16 +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