mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-08-01 13:33:48 +08:00
## Summary - LongCat's token usage did not appear in the server terminal, while DeepSeek's did — even though both drivers parse and record usage through the same shared helpers. The gap was a missing debug log in LongCat's SSE loop, so aggregate usage events were silently processed instead of printed. - The official LongCat API docs and live responses from `api.longcat.chat` return a nested `usage.completion_tokens_details.reasoning_tokens` breakdown for thinking mode. The previous flat `LongCatChatResponse.Usage` struct dropped this field on unmarshal. - Add test coverage for the nested `reasoning_tokens` field on both the non-streaming and streaming paths. Closes #17284