root ddb8779ec7 fix: track bridge tokens in request_tracking for dashboard totals
codex-bridge passthrough previously hardcoded tokens_in=0 and used
text.length (char count) for tokens_out, writing only to llm_calls.
request_tracking never received these entries so all Codex/Claude/
Copilot bridge traffic was invisible in dashboard token totals.

Fix:
- Extract real token counts from upstreamJson.usage (prompt_tokens /
  completion_tokens) with char/4 estimation as fallback
- Call requestLogger.logRequest() to write to request_tracking
- Pass real totals to recordSubscriptionUsage() (was 0)
- Both audit log (llm_calls) and dashboard log (request_tracking) now
  receive consistent bridgeCaller + real token counts
2026-07-06 21:07:11 +00:00
..