refactor(agent): make run usage explicit (#5546)

* refactor(agent): make run usage explicit

* fix(api): capture usage per run
This commit is contained in:
chengyongru authored and GitHub committed 2026-08-26 15:18:53 +08:00
1 parent 0c84725b13
commit 4f6c0aedfa
20 files changed
+184 -233

No files matched your search

-1
View File
@@ -33,7 +33,6 @@ def _make_mock_agent(response_text: str = "mock response") -> MagicMock:
agent = MagicMock()
agent.process_direct = AsyncMock(return_value=response_text)
agent.aclose = AsyncMock()
agent._last_usage = None
return agent