[Bug] Request log rows are never written for streaming requests routed through a fusion model — Observability dashboard stays empty

Author: RamessesNCreated Sep 16, 2026Updated Sep 17, 2026

Summary

With a fusion/composite model in use, no request_logs row is ever written for normal Claude Code traffic, because Claude Code always streams. The Overview and Logs pages stay at 0 requests / 0 tokens permanently, making usage and cost tracking unusable.

Environment

  • CCR 3.1.1 (Homebrew install, macOS 27.0.0, Apple Silicon)
  • Claude Code 2.1.267 routed through the gateway at http://127.0.0.1:3456
  • Settings: observability.requestLogs = true, observability.requestLogSuccessSampleRate = 1, observability.requestLogBodyCapture = "all", observability.requestLogMaxBodyBytes = 52428800

Reproduction

Read app-data/request-logs.sqlite directly before and after each request. All four requests below go to the same gateway, with the same credential, max_tokens 1–4, via POST /v1/messages:

request HTTP row written
fusion model + stream: true 200 none
fusion model, no stream 200
direct provider model + stream: true 200
direct provider model, no stream 200

The only variable in each pair is stream: true combined with fusion routing. For the failing case I waited 20s and re-checked — the row never appears, so it is not a delayed write. Re-ran the failing and passing cases to confirm reproducibility.

Impact

After hours of continuous Claude Code use the Logs page is empty and the Overview counters are all 0, while lsof confirms the claude process holds an ESTABLISHED connection to the gateway port — i.e. the traffic definitely passes through the gateway. Any user running a fusion model gets no observability at all.

Notes / possible relation

This may share a root cause with #1234 (usage not collected because stream processing stops after finish_reason) and its open PR #1235. That fix targets zeroed usage counters; here the row is not written at all. It may be worth checking whether the same stream-termination path also skips the recordGatewayRequestLog call.

Happy to test a patch, or provide raw sqlite dumps / gateway logs.

Source: musistudio/claude-code-router