diff --git a/deploy/profile-scripts/batch_reassess.py b/deploy/profile-scripts/batch_reassess.py index 12c598f6..142b73cd 100644 --- a/deploy/profile-scripts/batch_reassess.py +++ b/deploy/profile-scripts/batch_reassess.py @@ -998,7 +998,7 @@ def process_stock(code, force_today=False): prompt = build_prompt(data) # ── 使用共享 LLM 客户端(替代 curl subprocess)── - result = call_llm(prompt, model=REASSESS_MODEL, max_tokens=None) # 文档: 推理模型不指定max_tokens + result = call_llm(prompt, model=REASSESS_MODEL, max_tokens=None, concurrent=True) # 2026-08-24 并发模式: router round-robin分key(4worker不再全压同一key) if not result["ok"] or not (result.get("content") or "").strip(): print(f" \u274c LLM调用失败或空输出: {result.get('error') or 'empty content'}") @@ -1012,7 +1012,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=None) # 文档: 推理模型不指定max_tokens + result2 = call_llm(prompt, model=FALLBACK_MODEL, max_tokens=None, concurrent=True) # 2026-08-24 并发模式 if result2["ok"] and len((result2.get("content") or "").strip()) > len(full_text): full_text = result2["content"] parsed = parse_response(full_text) diff --git a/deploy/profile-scripts/parallel_batch.sh b/deploy/profile-scripts/parallel_batch.sh index 4a44bcd0..42243394 100644 --- a/deploy/profile-scripts/parallel_batch.sh +++ b/deploy/profile-scripts/parallel_batch.sh @@ -2,7 +2,7 @@ # parallel_batch.sh — 并发批量12维重评(分片+key池偏移+统一flush) # 用法: bash parallel_batch.sh [N] [type] # N=worker数(默认4) type=holding|watchlist|all(默认all) -N=${1:-4} +N=${1:-6} # 2026-08-24 4→6: OCG router 6 key 用满(concurrent=True round-robin防撞) TYPE=${2:-all} cd /home/hmo/MoFin/deploy/profile-scripts echo "[parallel] launching $N workers (type=$TYPE) at $(date '+%F %T')" diff --git a/deploy/profile-scripts/trade_capture.py b/deploy/profile-scripts/trade_capture.py index 7515ccbb..d65fd9f1 100644 --- a/deploy/profile-scripts/trade_capture.py +++ b/deploy/profile-scripts/trade_capture.py @@ -179,7 +179,7 @@ def process_screenshot(ocr_text): 【成本价】数字(有持仓时填写) """ - result = call_llm(prompt, model=REASSESS_MODEL, max_tokens=None) + result = call_llm(prompt, model=REASSESS_MODEL, concurrent=True, max_tokens=None) if not result["ok"] or not result.get("content"): return {"ok": False, "error": "LLM调用失败"}