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)