SIGN IN SIGN UP

fix: include streaming usage in responses (#18)

Preserve upstream usage from OpenAI chat-completion stream chunks and Anthropic message_delta stream events, then include it on the final response.completed event so Codex can track token counts and trigger auto-compaction after streamed BYOK turns. Adds regression tests for both stream shapes. Tests: git diff --check; python3 -m pytest tests -q (74 passed); python3 -m compileall codex_shim. Generated with [Devin](https://cli.devin.ai/docs)
T
TerpBot committed
53608e2ceef130cb223fb6c39d26064829c2ffcb
Parent: 2aebd48
Committed by GitHub <noreply@github.com> on 5/27/2026, 10:19:41 PM