Research LLM call runs once per pipeline but was logged with no run_id or post_id, making it invisible in per-article cost breakdowns. Now the pipeline's cost tracker flows through Source_Collector to the research provider, tagging costs with the run_id. After all articles complete, amortize_research_costs() divides the cost evenly and inserts one row per article. link_generation_logs() excludes llm_research stage so the first article doesn't grab the full cost. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
7.9 KiB
7.9 KiB