From dabef038db93a0cea031bd07c4e8a03f3f633f79 Mon Sep 17 00:00:00 2001 From: hmo Date: Wed, 22 Jul 2026 14:00:14 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20max=5Ftokens=E4=B8=8B=E9=99=90512?= =?UTF-8?q?=EF=BC=88OCG=E5=AF=B9=E5=B0=8Fmax=5Ftokens=E7=9F=AD=E8=B7=AF?= =?UTF-8?q?=E8=BF=94=E5=9B=9E=E7=A9=BA=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- deploy/profile-scripts/llm_client.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/deploy/profile-scripts/llm_client.py b/deploy/profile-scripts/llm_client.py index 438d04e7..d006c1f9 100644 --- a/deploy/profile-scripts/llm_client.py +++ b/deploy/profile-scripts/llm_client.py @@ -187,6 +187,9 @@ def call_llm(prompt, model=None, max_tokens=4096, timeout=150, 永远不抛异常到调用方。 """ model_name = model or REASSESS_MODEL + # OCG/deepseek 对过小 max_tokens 会短路返回空(2026-07-22 实测 max_tokens=64 必空) + if max_tokens < 512: + max_tokens = 512 messages = [] if system: messages.append({"role": "system", "content": system})