Merge pull request #102 from QwenLM/feature/fan/fix-token-usage

fix: streaming token usage
This commit is contained in:
pomelo 2025-07-24 20:30:47 +08:00 committed by GitHub
commit b8e2891f3b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -300,6 +300,7 @@ export class OpenAIContentGenerator implements ContentGenerator {
messages,
...samplingParams,
stream: true,
stream_options: { include_usage: true },
};
if (request.config?.tools) {