Skip to content

"Vibe-Trading: Your Personal Trading Agent"

Merge PR #1641 into reviewed maintenance batch

Haozhe Wu9c643c267c81
diff --cc agent/src/agent/loop.py
index 9ac7306fd,006cdff52..f9098cd1d
--- a/agent/src/agent/loop.py
+++ b/agent/src/agent/loop.py
@@@ -692,19 -895,15 +691,26 @@@ from src.agent.tool_results import (
_previously_archived as _previously_archived,
_archive_backtest_result,
)
+ from src.agent.run_outcome import ( # noqa: E402
+ OutcomeInputs,
+ RunOutcome as RunOutcome, # noqa: F401 — re-exported for callers/tests
+ build_end_event,
+ build_result_dict,
+ resolve_final_status,
+ )
+# --- LLM usage accounting, moved to src.agent.llm_usage (issue #1624) ---
+# Re-exported here so existing ``from src.agent.loop import ...`` keeps working.
+from src.agent.llm_usage import ( # noqa: E402
+ LLM_USAGE_ARTIFACT as LLM_USAGE_ARTIFACT,
+ _coerce_usage_int as _coerce_usage_int,
+ _normalize_llm_usage as _normalize_llm_usage,
+ _new_llm_usage_summary as _new_llm_usage_summary,
+ _record_llm_usage as _record_llm_usage,
+)
+
+
class AgentLoop:
"""ReAct Agent core loop.