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]
Important fix: Catch CostLimitExceeded in retry because of format/block (#682)
Kilian Lieretd8ceb9da9264
diff --git a/sweagent/agent/agents.py b/sweagent/agent/agents.pyindex 2b70e027..6d3852e3 100644--- a/sweagent/agent/agents.py+++ b/sweagent/agent/agents.py@@ -642,7 +642,7 @@ class Agent:output: raw model output"""try:- output = self.forward_model(observation, state)+ return self.check_format_and_requery(self.forward_model(observation, state))except KeyboardInterrupt:raiseexcept RuntimeError as e:@@ -665,7 +665,6 @@ class Agent:"exit_api",f"exit due to retry error: {e}",)- return self.check_format_and_requery(output)def init_environment_vars(self, env: SWEEnv):self.set_environment_vars(env, self.config.env_variables)