9router/open-sse/handlers
omar-nahhas 41606a37a3 fix(usage): don't lose cached tokens in the forced-SSE->JSON path
handleForcedSSEToJson dropped cached prompt tokens in two ways: the
Responses branch summed only input_tokens, which excludes cache_read
and cache_creation on cache-capable upstreams (measured 2012 reported
vs ~5344 actual, 5332 from cache); and the Chat Completions branch
computed usage correctly but it didn't always reach the client (an
Anthropic response with cache_read_input_tokens: 11022 arrived with no
usage field at all). Now folds cache counters into prompt_tokens,
surfaces them via prompt_tokens_details, and re-attaches usage before
serialisation.
2026-08-05 10:45:55 +07:00
..
chatCore fix(usage): don't lose cached tokens in the forced-SSE->JSON path 2026-08-05 10:45:55 +07:00
embeddingProviders refactor(open-sse): B1 consolidate media endpoint URLs into registry 2026-06-14 13:58:12 +07:00
fetch fix(jina-reader): recover after transient errors and use JSON POST API 2026-07-23 16:28:37 +07:00
imageProviders feat(antigravity): native image generation support 2026-06-21 17:54:32 +07:00
search chore: drop source-attribution comments from provider code 2026-07-29 21:05:23 +07:00
ttsProviders fix(tts): resolve Gemini TTS models from catalog 2026-06-26 10:32:34 +07:00
chatCore.js fix(refresh): rotate refresh_token between retry attempts 2026-07-25 17:30:11 +07:00
embeddingsCore.js fix(usage): record exact embedding tokens 2026-07-23 16:07:57 +07:00
imageGenerationCore.js feat(antigravity): native image generation support 2026-06-21 17:54:32 +07:00
responsesHandler.js refactor(open-sse): translator DRY + schema enums, bug fixes, dead code cleanup 2026-06-14 18:49:38 +07:00
sttCore.js refactor(open-sse): remove reverse coupling open-sse -> src (E2) 2026-06-13 16:35:07 +07:00
ttsCore.js feat: add STT support, Gemini TTS, and expand usage tracking 2026-05-05 10:32:59 +07:00
videoCore.js feat(xai): add Grok Imagine video generation (/v1/videos) + CLI 2026-07-16 15:29:52 +07:00