From 7eb2a9ee99f554b86ee82e06d6d6dc12fcd8d874 Mon Sep 17 00:00:00 2001 From: xxm Date: Mon, 17 Aug 2026 11:48:49 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20batch=5Freassess=E6=8C=89=E6=96=87?= =?UTF-8?q?=E6=A1=A3=E5=8E=BB=E6=8E=89=E6=98=BE=E5=BC=8Fmax=5Ftokens=3D409?= =?UTF-8?q?6(=E6=94=B9None=E4=B8=8D=E6=8C=87=E5=AE=9A)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- deploy/profile-scripts/batch_reassess.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/deploy/profile-scripts/batch_reassess.py b/deploy/profile-scripts/batch_reassess.py index 99932086..11291b10 100644 --- a/deploy/profile-scripts/batch_reassess.py +++ b/deploy/profile-scripts/batch_reassess.py @@ -619,7 +619,7 @@ def process_stock(code, force_today=False): prompt = build_prompt(data) # ── 使用共享 LLM 客户端(替代 curl subprocess)── - result = call_llm(prompt, model=REASSESS_MODEL, max_tokens=4096) + result = call_llm(prompt, model=REASSESS_MODEL, max_tokens=None) # 文档: 推理模型不指定max_tokens if not result["ok"] or not (result.get("content") or "").strip(): print(f" \u274c LLM调用失败或空输出: {result.get('error') or 'empty content'}") @@ -633,7 +633,7 @@ def process_stock(code, force_today=False): # ── 截断保护:输出过短且无信号 = 低质输出,升级 pro 重试一次 ── if not parsed.get("signal") and len(full_text) < 1500: print(f" ⚠️ 输出截断({len(full_text)}字)且无信号,升级 {FALLBACK_MODEL} 重试...", flush=True) - result2 = call_llm(prompt, model=FALLBACK_MODEL, max_tokens=4096) + result2 = call_llm(prompt, model=FALLBACK_MODEL, max_tokens=None) # 文档: 推理模型不指定max_tokens if result2["ok"] and len((result2.get("content") or "").strip()) > len(full_text): full_text = result2["content"] parsed = parse_response(full_text)