Conversation
…hunks (diegosouzapw#11817) Signed-off-by: Minxi Hou <houminxi@gmail.com>
…ives (#11915 follow-up on #11883) (#11933) Merges #11883's already-merged usage-harvesting extraction with #11915's finish-deferral mechanism, verified to fix a real remaining bug: the client-visible message_delta carried stale/zero usage when finish_reason arrived before the trailing usage chunk. 86/86 tests passing across 16 translator regression files.
|
Thanks for this — and genuinely good catch. #11883 landed first with a narrower fix I hand-merged your deferral mechanism onto #11883's already-merged |
…ives (diegosouzapw#11915 follow-up on diegosouzapw#11883) (diegosouzapw#11933) Merges diegosouzapw#11883's already-merged usage-harvesting extraction with diegosouzapw#11915's finish-deferral mechanism, verified to fix a real remaining bug: the client-visible message_delta carried stale/zero usage when finish_reason arrived before the trailing usage chunk. 86/86 tests passing across 16 translator regression files.
Fixes #11817. Preserves usage (including cache tokens) from trailing OpenAI chunks with empty choices array in the OpenAI→Claude stream translator. Includes TDD test coverage.⚠️ base-red inherited: #11449