fix: per_stock/self_repair按文档去掉显式max_tokens(改None不指定)

This commit is contained in:
xxm
2026-08-17 11:50:36 +08:00
parent 7eb2a9ee99
commit 93958d5c1a
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -405,7 +405,7 @@ def main():
if _prompt:
try:
# 2026-08-13 超时修复:timeout 150→90, retries 1→03只×(90+90+20)=600s临界,减到90+0重试=270s安全)
_llm_result = call_llm(_prompt, max_tokens=4096, timeout=90, retries=0, backoff=0)
_llm_result = call_llm(_prompt, max_tokens=None, timeout=90, retries=0, backoff=0) # 文档: 不指定max_tokens
if _llm_result["ok"]:
_full_analysis_text = _llm_result["content"]
print(f" ✅ LLM12维分析完成({len(_full_analysis_text)}字, {_llm_result['elapsed']:.1f}s)", flush=True)
+1 -1
View File
@@ -179,7 +179,7 @@ def llm_diagnose(failure):
# session 指令冻结+上下文无限累积,2026-07-21 废弃)
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
from llm_client import call_llm
res = call_llm(prompt, max_tokens=300, timeout=90, retries=0, backoff=0, concurrent=True)
res = call_llm(prompt, max_tokens=None, timeout=90, retries=0, backoff=0, concurrent=True) # 文档: 不指定max_tokens
if not res["ok"]:
raise RuntimeError(res["error"][:120])
text = res["content"]