Verbose per-call LLM logging, raw request/response dumps, and end-of-log cost summary.
- [LLM] line per call: stage, model, prompt size, output size, cost, parsed item counts - LLM_RAW_DUMP: full prompt/response JSON per call under outputs/<job>/llm_raw/ - Cost block at tail of job.log (per-stage, per-model, cached vs live) - Agent mode: reset llm cost counters per job; review finalization now teed into job.log + dumps
This commit is contained in:
@@ -20,6 +20,7 @@ from backend.agents.linker import LinkerAgent, build_link_scopes, build_object_g
|
||||
from backend.agents.memory import ProjectMemory
|
||||
from backend.agents.orchestrator import Orchestrator
|
||||
from backend.agents.rfi_writer import RFIWriterAgent
|
||||
from backend.llm import reset_cost
|
||||
from backend.pipeline.pdf_processor import convert_pdf_to_images
|
||||
from backend.pipeline.report import build_report, to_markdown
|
||||
from backend.pipeline.sheet_index import derive_project_meta_from_cover
|
||||
@@ -39,6 +40,10 @@ def run_agent_pipeline(
|
||||
if not os.path.isfile(pdf_path):
|
||||
raise FileNotFoundError(pdf_path)
|
||||
|
||||
# Keep the llm module's counters job-local (matches Classic): the job
|
||||
# log's failure-path cost estimate in jobs.py reads llm.get_cost().
|
||||
reset_cost()
|
||||
|
||||
agent_dir = os.path.join(out_dir, "agent") if out_dir else None
|
||||
memory = ProjectMemory(artifact_dir=agent_dir)
|
||||
orchestrator = Orchestrator(memory=memory, on_stage=on_stage)
|
||||
|
||||
Reference in New Issue
Block a user