diff --git a/services/recommendation/worker.py b/services/recommendation/worker.py index 070707a..9c1c14c 100644 --- a/services/recommendation/worker.py +++ b/services/recommendation/worker.py @@ -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,