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: Set default agent type

Kilian Lieret222403ea248f
diff --git a/sweagent/agent/agents.py b/sweagent/agent/agents.py
index b6a63dcf..b27f2c61 100644
--- a/sweagent/agent/agents.py
+++ b/sweagent/agent/agents.py
@@ -160,7 +160,7 @@ class RetryAgentConfig(BaseModel):
model_config = ConfigDict(extra="forbid")
-AgentConfig = Annotated[DefaultAgentConfig | RetryAgentConfig, Field(discriminator="type")]
+AgentConfig = Annotated[DefaultAgentConfig | RetryAgentConfig, Field(union_mode="left_to_right")]
class _BlockedActionError(Exception):