Skip to content

SWE-agent takes a GitHub issue and tries to automatically fix it, using your LM of choice. It can also be employed for offensive cybersecurity or competitive coding challenges. [NeurIPS 2024]

Fix: Correct instance cost

Kilian Lieret5435deaea46b
diff --git a/sweagent/agent/hooks/status.py b/sweagent/agent/hooks/status.py
index 1e217a39..75b18751 100644
--- a/sweagent/agent/hooks/status.py
+++ b/sweagent/agent/hooks/status.py
@@ -19,7 +19,7 @@ class SetStatusAgentHook(AbstractAgentHook):
self._update(f"Step {self._i_step} (${self._cost:.2f})")
def on_step_done(self, *, step: StepOutput, info: AgentInfo):
- self._cost = info.get("cost", 0.0)
+ self._cost = info["model_stats"]["instance_cost"] # type: ignore
def on_tools_installation_started(self):
self._update("Installing tools...")