From bec4902f1fad1f5cca51557425ca248fd668efd0 Mon Sep 17 00:00:00 2001 From: JOJO <1498581755@qq.com> Date: Wed, 25 Feb 2026 13:28:09 +0800 Subject: [PATCH] fix: request minimax stream usage properly --- utils/api_client.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/utils/api_client.py b/utils/api_client.py index 35941aa..f9a15c4 100644 --- a/utils/api_client.py +++ b/utils/api_client.py @@ -533,7 +533,9 @@ class DeepSeekClient: should_include_usage = True if should_include_usage: if is_minimax: + # MiniMax 流式需要 stream_options.include_usage 才会返回有效 usage payload["include_usage"] = True + payload.setdefault("stream_options", {})["include_usage"] = True else: payload.setdefault("stream_options", {})["include_usage"] = True # 注入模型额外参数(如 Qwen enable_thinking)