mirror of
https://github.com/fosrl/pangolin.git
synced 2026-11-09 10:51:53 -06:00
extractOpenAiResponses only took response.usage from response.completed, so a stream cut by max_output_tokens (response.incomplete) lost its usage and fell back to estimateUsage over the whole SSE text, over-counting cost and budget. Read response.usage from any event that carries it.