fix: skip LLM thesis rewrite for informational/suppressed recs to prevent queue buildup

This commit is contained in:
Celes Renata
2026-04-17 19:29:41 +00:00
parent 7736554988
commit a6189fce6b
+3 -2
View File
@@ -808,9 +808,10 @@ async def generate_recommendation(
invalidation_conditions=result.invalidation_conditions,
)
# 5. Optional LLM thesis rewrite
# 5. Optional LLM thesis rewrite — only for trading-eligible recommendations
# to avoid the LLM bottleneck on informational/suppressed recs.
llm_thesis: str | None = None
if ollama_config is not None:
if ollama_config is not None and result.eligible and not suppression.suppressed:
deterministic_thesis = build_thesis(summary, result, projection=effective_projection)
llm_thesis = await rewrite_thesis_with_llm(
deterministic_thesis=deterministic_thesis,