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]

Doc: Recommend sonnet 4 as the default (#1181)

Kilian Lieretfe2fd09d6022
diff --git a/.devcontainer/bashrc_epilog.sh b/.devcontainer/bashrc_epilog.sh
index 172c8432..1e67b0d7 100644
--- a/.devcontainer/bashrc_epilog.sh
+++ b/.devcontainer/bashrc_epilog.sh
@@ -6,7 +6,7 @@ fi
echo "Here's an example SWE-agent command to try out:"
echo "sweagent run \\
- --agent.model.name=claude-3-7-sonnet-latest \\
+ --agent.model.name=claude-sonnet-4-20250514 \\
--agent.model.per_instance_cost_limit=2.00 \\
--env.repo.github_url=https://github.com/SWE-agent/test-repo \\
--problem_statement.github_url=https://github.com/SWE-agent/test-repo/issues/1 \\
diff --git a/README.md b/README.md
index 7001dfb7..51250a9c 100644
--- a/README.md
+++ b/README.md
@@ -11,7 +11,7 @@
</p>
-SWE-agent enables your language model of choice (e.g. GPT-4o or Claude Sonnet 3.7) to autonomously use tools to
+SWE-agent enables your language model of choice (e.g. GPT-4o or Claude Sonnet 4) to autonomously use tools to
[fix issues in real GitHub repositories](https://swe-agent.com/latest/usage/hello_world),
[find cybersecurity vulnerabilities](https://enigma-agent.com/), or
[perform any custom task](https://swe-agent.com/latest/usage/coding_challenges).
diff --git a/docs/config/models.md b/docs/config/models.md
index 8445a96a..c2114b84 100644
--- a/docs/config/models.md
+++ b/docs/config/models.md
@@ -48,7 +48,7 @@ We recommend that you check how often you hit the cache. A very simple way is to
grep -o "cached_tokens=[0-9]*" django__django-11299.debug.log
```
-Note that the maximum number of output tokens of Claude 3.7 can be extended with extra headers.
+Note that the maximum number of output tokens of Claude 3.7/4 can be extended with extra headers.
See [this issue in litellm](https://github.com/BerriAI/litellm/issues/8984) and and [swe-agent PR #1035](https://github.com/SWE-agent/SWE-agent/issues/1035)
for omore information.
Since [#1036](https://github.com/SWE-agent/SWE-agent/pull/1036) you can also manually set the maximum output tokens and override the information
diff --git a/docs/index.md b/docs/index.md
index 35a97a97..3a1fe9c3 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -13,7 +13,7 @@ title: "Getting Started"
<img class="dark-mode-only" src="assets/readme_assets/swe-agent-banner-dark.svg" alt="SWE-agent banner" style="height: 10em;">
</div>
-SWE-agent enables your language model of choice (e.g. GPT-4o or Claude Sonnet 3.7) to autonomously use tools to
+SWE-agent enables your language model of choice (e.g. GPT-4o or Claude Sonnet 4) to autonomously use tools to
[fix issues in real GitHub repositories](https://swe-agent.com/latest/usage/hello_world),
[find cybersecurity vulnerabilities](https://enigma-agent.com/), or
[perform any custom task](https://swe-agent.com/latest/usage/coding_challenges).
diff --git a/docs/installation/keys.md b/docs/installation/keys.md
index be27a7ac..82923e84 100644
--- a/docs/installation/keys.md
+++ b/docs/installation/keys.md
@@ -40,7 +40,7 @@ Here are a few options for `--agent.model.name`:
| Model | API key | Comment |
| ----- | ------- | ------- |
-| `claude-3-7-sonnet-latest` | `ANTHROPIC_API_KEY` | Our recommended model |
+| `claude-sonnet-4-20250514)` | `ANTHROPIC_API_KEY` | Our recommended model |
| `gpt-4o` | `OPENAI_API_KEY` | |
| `o1-preview` | `OPENAI_API_KEY` | You might need to set temperature and sampling to the supported values. |
diff --git a/docs/usage/cl_tutorial.md b/docs/usage/cl_tutorial.md
index b3ccdff3..6d593cfd 100644
--- a/docs/usage/cl_tutorial.md
+++ b/docs/usage/cl_tutorial.md
@@ -30,7 +30,7 @@ python run.py \
```bash title="Fix a bug in a local repository using a custom docker image" hl_lines="4 5 6"
git clone https://github.com/SWE-agent/test-repo.git
python run.py \
- --agent.model.name=claude-3.5 \
+ --agent.model.name=claude-sonnet-4-20250514\
--env.repo.path=test-repo \
--problem_statement.path=test-repo/problem_statements/1.md \
--env.deployment.image=python:3.12
diff --git a/docs/usage/hello_world.md b/docs/usage/hello_world.md
index 824abfb0..b4fdece2 100644
--- a/docs/usage/hello_world.md
+++ b/docs/usage/hello_world.md
@@ -20,7 +20,7 @@ Let's start with an absolutely trivial example and solve an issue about a simple
```bash
sweagent run \
- --agent.model.name=claude-3-7-sonnet-latest \
+ --agent.model.name=claude-sonnet-4-20250514) \
--agent.model.per_instance_cost_limit=2.00 \
--env.repo.github_url=https://github.com/SWE-agent/test-repo \
--problem_statement.github_url=https://github.com/SWE-agent/test-repo/issues/1