mini-swe-agent 1.14.4__tar.gz → 1.16.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. {mini_swe_agent-1.14.4/src/mini_swe_agent.egg-info → mini_swe_agent-1.16.0}/PKG-INFO +18 -15
  2. {mini_swe_agent-1.14.4 → mini_swe_agent-1.16.0}/README.md +16 -14
  3. {mini_swe_agent-1.14.4 → mini_swe_agent-1.16.0}/pyproject.toml +1 -0
  4. {mini_swe_agent-1.14.4 → mini_swe_agent-1.16.0/src/mini_swe_agent.egg-info}/PKG-INFO +18 -15
  5. {mini_swe_agent-1.14.4 → mini_swe_agent-1.16.0}/src/mini_swe_agent.egg-info/SOURCES.txt +5 -0
  6. {mini_swe_agent-1.14.4 → mini_swe_agent-1.16.0}/src/mini_swe_agent.egg-info/requires.txt +1 -0
  7. {mini_swe_agent-1.14.4 → mini_swe_agent-1.16.0}/src/minisweagent/__init__.py +1 -1
  8. {mini_swe_agent-1.14.4 → mini_swe_agent-1.16.0}/src/minisweagent/agents/default.py +3 -3
  9. mini_swe_agent-1.16.0/src/minisweagent/config/extra/swebench_xml.yaml +215 -0
  10. {mini_swe_agent-1.14.4 → mini_swe_agent-1.16.0}/src/minisweagent/environments/docker.py +7 -1
  11. {mini_swe_agent-1.14.4 → mini_swe_agent-1.16.0}/src/minisweagent/models/__init__.py +3 -0
  12. {mini_swe_agent-1.14.4 → mini_swe_agent-1.16.0}/src/minisweagent/models/extra/roulette.py +2 -3
  13. {mini_swe_agent-1.14.4 → mini_swe_agent-1.16.0}/src/minisweagent/models/litellm_model.py +18 -8
  14. mini_swe_agent-1.16.0/src/minisweagent/models/litellm_response_api_model.py +80 -0
  15. {mini_swe_agent-1.14.4 → mini_swe_agent-1.16.0}/src/minisweagent/models/openrouter_model.py +9 -8
  16. {mini_swe_agent-1.14.4 → mini_swe_agent-1.16.0}/src/minisweagent/models/portkey_model.py +38 -30
  17. mini_swe_agent-1.16.0/src/minisweagent/models/portkey_response_api_model.py +74 -0
  18. mini_swe_agent-1.16.0/src/minisweagent/models/requesty_model.py +119 -0
  19. mini_swe_agent-1.16.0/src/minisweagent/models/utils/openai_utils.py +41 -0
  20. {mini_swe_agent-1.14.4 → mini_swe_agent-1.16.0}/src/minisweagent/run/extra/config.py +2 -2
  21. {mini_swe_agent-1.14.4 → mini_swe_agent-1.16.0}/src/minisweagent/run/mini.py +1 -2
  22. {mini_swe_agent-1.14.4 → mini_swe_agent-1.16.0}/src/minisweagent/run/utils/save.py +3 -1
  23. {mini_swe_agent-1.14.4 → mini_swe_agent-1.16.0}/LICENSE.md +0 -0
  24. {mini_swe_agent-1.14.4 → mini_swe_agent-1.16.0}/setup.cfg +0 -0
  25. {mini_swe_agent-1.14.4 → mini_swe_agent-1.16.0}/src/mini_swe_agent.egg-info/dependency_links.txt +0 -0
  26. {mini_swe_agent-1.14.4 → mini_swe_agent-1.16.0}/src/mini_swe_agent.egg-info/entry_points.txt +0 -0
  27. {mini_swe_agent-1.14.4 → mini_swe_agent-1.16.0}/src/mini_swe_agent.egg-info/top_level.txt +0 -0
  28. {mini_swe_agent-1.14.4 → mini_swe_agent-1.16.0}/src/minisweagent/__main__.py +0 -0
  29. {mini_swe_agent-1.14.4 → mini_swe_agent-1.16.0}/src/minisweagent/agents/__init__.py +0 -0
  30. {mini_swe_agent-1.14.4 → mini_swe_agent-1.16.0}/src/minisweagent/agents/interactive.py +0 -0
  31. {mini_swe_agent-1.14.4 → mini_swe_agent-1.16.0}/src/minisweagent/agents/interactive_textual.py +0 -0
  32. {mini_swe_agent-1.14.4 → mini_swe_agent-1.16.0}/src/minisweagent/config/README.md +0 -0
  33. {mini_swe_agent-1.14.4 → mini_swe_agent-1.16.0}/src/minisweagent/config/__init__.py +0 -0
  34. {mini_swe_agent-1.14.4 → mini_swe_agent-1.16.0}/src/minisweagent/config/default.yaml +0 -0
  35. {mini_swe_agent-1.14.4 → mini_swe_agent-1.16.0}/src/minisweagent/config/extra/__init__.py +0 -0
  36. {mini_swe_agent-1.14.4 → mini_swe_agent-1.16.0}/src/minisweagent/config/extra/swebench.yaml +0 -0
  37. {mini_swe_agent-1.14.4 → mini_swe_agent-1.16.0}/src/minisweagent/config/extra/swebench_roulette.yaml +0 -0
  38. {mini_swe_agent-1.14.4 → mini_swe_agent-1.16.0}/src/minisweagent/config/github_issue.yaml +0 -0
  39. {mini_swe_agent-1.14.4 → mini_swe_agent-1.16.0}/src/minisweagent/config/mini.tcss +0 -0
  40. {mini_swe_agent-1.14.4 → mini_swe_agent-1.16.0}/src/minisweagent/config/mini.yaml +0 -0
  41. {mini_swe_agent-1.14.4 → mini_swe_agent-1.16.0}/src/minisweagent/config/mini_no_temp.yaml +0 -0
  42. {mini_swe_agent-1.14.4 → mini_swe_agent-1.16.0}/src/minisweagent/environments/__init__.py +0 -0
  43. {mini_swe_agent-1.14.4 → mini_swe_agent-1.16.0}/src/minisweagent/environments/extra/__init__.py +0 -0
  44. {mini_swe_agent-1.14.4 → mini_swe_agent-1.16.0}/src/minisweagent/environments/extra/bubblewrap.py +0 -0
  45. {mini_swe_agent-1.14.4 → mini_swe_agent-1.16.0}/src/minisweagent/environments/extra/swerex_docker.py +0 -0
  46. {mini_swe_agent-1.14.4 → mini_swe_agent-1.16.0}/src/minisweagent/environments/local.py +0 -0
  47. {mini_swe_agent-1.14.4 → mini_swe_agent-1.16.0}/src/minisweagent/environments/singularity.py +0 -0
  48. {mini_swe_agent-1.14.4 → mini_swe_agent-1.16.0}/src/minisweagent/models/anthropic.py +0 -0
  49. {mini_swe_agent-1.14.4 → mini_swe_agent-1.16.0}/src/minisweagent/models/extra/__init__.py +0 -0
  50. {mini_swe_agent-1.14.4 → mini_swe_agent-1.16.0}/src/minisweagent/models/test_models.py +0 -0
  51. {mini_swe_agent-1.14.4 → mini_swe_agent-1.16.0}/src/minisweagent/models/utils/__init__.py +0 -0
  52. {mini_swe_agent-1.14.4 → mini_swe_agent-1.16.0}/src/minisweagent/models/utils/cache_control.py +0 -0
  53. {mini_swe_agent-1.14.4 → mini_swe_agent-1.16.0}/src/minisweagent/models/utils/key_per_thread.py +0 -0
  54. {mini_swe_agent-1.14.4 → mini_swe_agent-1.16.0}/src/minisweagent/py.typed +0 -0
  55. {mini_swe_agent-1.14.4 → mini_swe_agent-1.16.0}/src/minisweagent/run/__init__.py +0 -0
  56. {mini_swe_agent-1.14.4 → mini_swe_agent-1.16.0}/src/minisweagent/run/extra/__init__.py +0 -0
  57. {mini_swe_agent-1.14.4 → mini_swe_agent-1.16.0}/src/minisweagent/run/extra/swebench.py +0 -0
  58. {mini_swe_agent-1.14.4 → mini_swe_agent-1.16.0}/src/minisweagent/run/extra/swebench_single.py +0 -0
  59. {mini_swe_agent-1.14.4 → mini_swe_agent-1.16.0}/src/minisweagent/run/extra/utils/__init__.py +0 -0
  60. {mini_swe_agent-1.14.4 → mini_swe_agent-1.16.0}/src/minisweagent/run/extra/utils/batch_progress.py +0 -0
  61. {mini_swe_agent-1.14.4 → mini_swe_agent-1.16.0}/src/minisweagent/run/github_issue.py +0 -0
  62. {mini_swe_agent-1.14.4 → mini_swe_agent-1.16.0}/src/minisweagent/run/hello_world.py +0 -0
  63. {mini_swe_agent-1.14.4 → mini_swe_agent-1.16.0}/src/minisweagent/run/inspector.py +0 -0
  64. {mini_swe_agent-1.14.4 → mini_swe_agent-1.16.0}/src/minisweagent/run/mini_extra.py +0 -0
  65. {mini_swe_agent-1.14.4 → mini_swe_agent-1.16.0}/src/minisweagent/run/utils/__init__.py +0 -0
  66. {mini_swe_agent-1.14.4 → mini_swe_agent-1.16.0}/src/minisweagent/utils/__init__.py +0 -0
  67. {mini_swe_agent-1.14.4 → mini_swe_agent-1.16.0}/src/minisweagent/utils/log.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mini-swe-agent
3
- Version: 1.14.4
3
+ Version: 1.16.0
4
4
  Summary: Nano SWE Agent - A simple AI software engineering agent
5
5
  Author-email: Kilian Lieret <kilian.lieret@posteo.de>, "Carlos E. Jimenez" <carlosej@princeton.edu>
6
6
  License: MIT License
@@ -66,6 +66,7 @@ Requires-Dist: mike; extra == "dev"
66
66
  Requires-Dist: mkdocs-material; extra == "dev"
67
67
  Requires-Dist: mkdocs-glightbox; extra == "dev"
68
68
  Requires-Dist: mkdocs-redirects; extra == "dev"
69
+ Requires-Dist: portkey-ai; extra == "dev"
69
70
  Dynamic: license-file
70
71
 
71
72
  <div align="center">
@@ -74,6 +75,7 @@ Dynamic: license-file
74
75
 
75
76
  # The 100 line AI agent that solves GitHub issues & more
76
77
 
78
+ 📣 [Gemini 3 Pro reaches 74% on SWE-bench verified with mini-swe-agent!](https://x.com/KLieret/status/1991164693839270372)<br/>
77
79
  📣 [New blogpost: Randomly switching between GPT-5 and Sonnet 4 boosts performance](https://www.swebench.com/SWE-bench/blog/2025/08/19/mini-roulette/)
78
80
 
79
81
  [![Docs](https://img.shields.io/badge/Docs-green?style=for-the-badge&logo=materialformkdocs&logoColor=white)](https://mini-swe-agent.com/latest/)
@@ -94,7 +96,7 @@ Here's some details:
94
96
 
95
97
  - **Minimal**: Just [100 lines of python](https://github.com/SWE-agent/mini-swe-agent/blob/main/src/minisweagent/agents/default.py) (+100 total for [env](https://github.com/SWE-agent/mini-swe-agent/blob/main/src/minisweagent/environments/local.py),
96
98
  [model](https://github.com/SWE-agent/mini-swe-agent/blob/main/src/minisweagent/models/litellm_model.py), [script](https://github.com/SWE-agent/mini-swe-agent/blob/main/src/minisweagent/run/hello_world.py)) — no fancy dependencies!
97
- - **Powerful:** Resolves >70% of GitHub issues in the [SWE-bench verified benchmark](https://www.swebench.com/) ([leaderboard](https://swe-bench.com/)).
99
+ - **Powerful:** Resolves >74% of GitHub issues in the [SWE-bench verified benchmark](https://www.swebench.com/) ([leaderboard](https://swe-bench.com/)).
98
100
  - **Convenient:** Comes with UIs that turn this into your daily dev swiss army knife!
99
101
  - **Deployable:** In addition to local envs, you can use **docker**, **podman**, **singularity**, **apptainer**, and more
100
102
  - **Tested:** [![Codecov](https://img.shields.io/codecov/c/github/swe-agent/mini-swe-agent?style=flat-square)](https://codecov.io/gh/SWE-agent/mini-swe-agent)
@@ -248,7 +250,7 @@ agent.run("Write a sudoku game")
248
250
 
249
251
  ## Let's get started!
250
252
 
251
- Option 1: Install + run in virtual environment
253
+ **Option 1:** If you just want to try out the CLI (package installed in anonymous virtual environment)
252
254
 
253
255
  ```bash
254
256
  pip install uv && uvx mini-swe-agent [-v]
@@ -256,19 +258,19 @@ pip install uv && uvx mini-swe-agent [-v]
256
258
  pip install pipx && pipx ensurepath && pipx run mini-swe-agent [-v]
257
259
  ```
258
260
 
259
- Option 2: Install in current environment
261
+ **Option 2:** Install CLI & python bindings in current environment
260
262
 
261
263
  ```bash
262
- pip install mini-swe-agent && mini [-v]
264
+ pip install mini-swe-agent
265
+ mini -v # run the CLI
263
266
  ```
264
267
 
265
- Option 3: Install from source
268
+ **Option 3:** Install from source (developer setup)
266
269
 
267
270
  ```bash
268
271
  git clone https://github.com/SWE-agent/mini-swe-agent.git
269
- cd mini-swe-agent
270
- pip install -e .
271
- mini [-v]
272
+ cd mini-swe-agent && pip install -e .
273
+ mini [-v] # run the CLI
272
274
  ```
273
275
 
274
276
  Read more in our [documentation](https://mini-swe-agent.com/latest/):
@@ -298,14 +300,15 @@ If you found this work helpful, please consider citing the [SWE-agent paper](htt
298
300
  Our other projects:
299
301
 
300
302
  <div align="center">
301
- <a href="https://github.com/SWE-agent/SWE-agent"><img src="https://github.com/SWE-agent/mini-swe-agent/raw/main/docs/assets/sweagent_logo_text_below.svg" alt="SWE-agent" height="120px"></a>
303
+ <a href="https://github.com/SWE-agent/SWE-agent"><img src="https://raw.githubusercontent.com/SWE-agent/swe-agent-media/refs/heads/main/media/logos_banners/sweagent_logo_text_below.svg" alt="SWE-agent" height="120px"></a>
302
304
  &nbsp;&nbsp;
303
- <a href="https://github.com/SWE-agent/SWE-ReX"><img src="https://github.com/SWE-agent/mini-swe-agent/raw/main/docs/assets/swerex_logo_text_below.svg" alt="SWE-ReX" height="120px"></a>
305
+ <a href="https://github.com/SWE-agent/SWE-ReX"><img src="https://raw.githubusercontent.com/SWE-agent/swe-agent-media/refs/heads/main/media/logos_banners/swerex_logo_text_below.svg" alt="SWE-ReX" height="120px"></a>
304
306
  &nbsp;&nbsp;
305
- <a href="https://github.com/SWE-bench/SWE-bench"><img src="https://github.com/SWE-agent/mini-swe-agent/raw/main/docs/assets/swebench_logo_text_below.svg" alt="SWE-bench" height="120px"></a>
307
+ <a href="https://github.com/SWE-bench/SWE-bench"><img src="https://raw.githubusercontent.com/SWE-agent/swe-agent-media/refs/heads/main/media/logos_banners/swebench_logo_text_below.svg" alt="SWE-bench" height="120px"></a>
306
308
  &nbsp;&nbsp;
307
- <a href="https://github.com/SWE-bench/SWE-smith"><img src="https://github.com/SWE-agent/mini-swe-agent/raw/main/docs/assets/swesmith_logo_text_below.svg" alt="SWE-smith" height="120px"></a>
309
+ <a href="https://github.com/SWE-bench/SWE-smith"><img src="https://raw.githubusercontent.com/SWE-agent/swe-agent-media/refs/heads/main/media/logos_banners/swesmith_logo_text_below.svg" alt="SWE-smith" height="120px"></a>
308
310
  &nbsp;&nbsp;
309
- <a href="https://github.com/SWE-bench/sb-cli"><img src="https://github.com/SWE-agent/mini-swe-agent/raw/main/docs/assets/sbcli_logo_text_below.svg" alt="sb-cli" height="120px"></a>
311
+ <a href="https://github.com/codeclash-ai/codeclash"><img src="https://raw.githubusercontent.com/SWE-agent/swe-agent-media/refs/heads/main/media/logos_banners/codeclash_logo_text_below.svg" alt="CodeClash" height="120px"></a>
312
+ &nbsp;&nbsp;
313
+ <a href="https://github.com/SWE-bench/sb-cli"><img src="https://raw.githubusercontent.com/SWE-agent/swe-agent-media/refs/heads/main/media/logos_banners/sbcli_logo_text_below.svg" alt="sb-cli" height="120px"></a>
310
314
  </div>
311
-
@@ -4,6 +4,7 @@
4
4
 
5
5
  # The 100 line AI agent that solves GitHub issues & more
6
6
 
7
+ 📣 [Gemini 3 Pro reaches 74% on SWE-bench verified with mini-swe-agent!](https://x.com/KLieret/status/1991164693839270372)<br/>
7
8
  📣 [New blogpost: Randomly switching between GPT-5 and Sonnet 4 boosts performance](https://www.swebench.com/SWE-bench/blog/2025/08/19/mini-roulette/)
8
9
 
9
10
  [![Docs](https://img.shields.io/badge/Docs-green?style=for-the-badge&logo=materialformkdocs&logoColor=white)](https://mini-swe-agent.com/latest/)
@@ -24,7 +25,7 @@ Here's some details:
24
25
 
25
26
  - **Minimal**: Just [100 lines of python](https://github.com/SWE-agent/mini-swe-agent/blob/main/src/minisweagent/agents/default.py) (+100 total for [env](https://github.com/SWE-agent/mini-swe-agent/blob/main/src/minisweagent/environments/local.py),
26
27
  [model](https://github.com/SWE-agent/mini-swe-agent/blob/main/src/minisweagent/models/litellm_model.py), [script](https://github.com/SWE-agent/mini-swe-agent/blob/main/src/minisweagent/run/hello_world.py)) — no fancy dependencies!
27
- - **Powerful:** Resolves >70% of GitHub issues in the [SWE-bench verified benchmark](https://www.swebench.com/) ([leaderboard](https://swe-bench.com/)).
28
+ - **Powerful:** Resolves >74% of GitHub issues in the [SWE-bench verified benchmark](https://www.swebench.com/) ([leaderboard](https://swe-bench.com/)).
28
29
  - **Convenient:** Comes with UIs that turn this into your daily dev swiss army knife!
29
30
  - **Deployable:** In addition to local envs, you can use **docker**, **podman**, **singularity**, **apptainer**, and more
30
31
  - **Tested:** [![Codecov](https://img.shields.io/codecov/c/github/swe-agent/mini-swe-agent?style=flat-square)](https://codecov.io/gh/SWE-agent/mini-swe-agent)
@@ -178,7 +179,7 @@ agent.run("Write a sudoku game")
178
179
 
179
180
  ## Let's get started!
180
181
 
181
- Option 1: Install + run in virtual environment
182
+ **Option 1:** If you just want to try out the CLI (package installed in anonymous virtual environment)
182
183
 
183
184
  ```bash
184
185
  pip install uv && uvx mini-swe-agent [-v]
@@ -186,19 +187,19 @@ pip install uv && uvx mini-swe-agent [-v]
186
187
  pip install pipx && pipx ensurepath && pipx run mini-swe-agent [-v]
187
188
  ```
188
189
 
189
- Option 2: Install in current environment
190
+ **Option 2:** Install CLI & python bindings in current environment
190
191
 
191
192
  ```bash
192
- pip install mini-swe-agent && mini [-v]
193
+ pip install mini-swe-agent
194
+ mini -v # run the CLI
193
195
  ```
194
196
 
195
- Option 3: Install from source
197
+ **Option 3:** Install from source (developer setup)
196
198
 
197
199
  ```bash
198
200
  git clone https://github.com/SWE-agent/mini-swe-agent.git
199
- cd mini-swe-agent
200
- pip install -e .
201
- mini [-v]
201
+ cd mini-swe-agent && pip install -e .
202
+ mini [-v] # run the CLI
202
203
  ```
203
204
 
204
205
  Read more in our [documentation](https://mini-swe-agent.com/latest/):
@@ -228,14 +229,15 @@ If you found this work helpful, please consider citing the [SWE-agent paper](htt
228
229
  Our other projects:
229
230
 
230
231
  <div align="center">
231
- <a href="https://github.com/SWE-agent/SWE-agent"><img src="https://github.com/SWE-agent/mini-swe-agent/raw/main/docs/assets/sweagent_logo_text_below.svg" alt="SWE-agent" height="120px"></a>
232
+ <a href="https://github.com/SWE-agent/SWE-agent"><img src="https://raw.githubusercontent.com/SWE-agent/swe-agent-media/refs/heads/main/media/logos_banners/sweagent_logo_text_below.svg" alt="SWE-agent" height="120px"></a>
232
233
  &nbsp;&nbsp;
233
- <a href="https://github.com/SWE-agent/SWE-ReX"><img src="https://github.com/SWE-agent/mini-swe-agent/raw/main/docs/assets/swerex_logo_text_below.svg" alt="SWE-ReX" height="120px"></a>
234
+ <a href="https://github.com/SWE-agent/SWE-ReX"><img src="https://raw.githubusercontent.com/SWE-agent/swe-agent-media/refs/heads/main/media/logos_banners/swerex_logo_text_below.svg" alt="SWE-ReX" height="120px"></a>
234
235
  &nbsp;&nbsp;
235
- <a href="https://github.com/SWE-bench/SWE-bench"><img src="https://github.com/SWE-agent/mini-swe-agent/raw/main/docs/assets/swebench_logo_text_below.svg" alt="SWE-bench" height="120px"></a>
236
+ <a href="https://github.com/SWE-bench/SWE-bench"><img src="https://raw.githubusercontent.com/SWE-agent/swe-agent-media/refs/heads/main/media/logos_banners/swebench_logo_text_below.svg" alt="SWE-bench" height="120px"></a>
236
237
  &nbsp;&nbsp;
237
- <a href="https://github.com/SWE-bench/SWE-smith"><img src="https://github.com/SWE-agent/mini-swe-agent/raw/main/docs/assets/swesmith_logo_text_below.svg" alt="SWE-smith" height="120px"></a>
238
+ <a href="https://github.com/SWE-bench/SWE-smith"><img src="https://raw.githubusercontent.com/SWE-agent/swe-agent-media/refs/heads/main/media/logos_banners/swesmith_logo_text_below.svg" alt="SWE-smith" height="120px"></a>
238
239
  &nbsp;&nbsp;
239
- <a href="https://github.com/SWE-bench/sb-cli"><img src="https://github.com/SWE-agent/mini-swe-agent/raw/main/docs/assets/sbcli_logo_text_below.svg" alt="sb-cli" height="120px"></a>
240
+ <a href="https://github.com/codeclash-ai/codeclash"><img src="https://raw.githubusercontent.com/SWE-agent/swe-agent-media/refs/heads/main/media/logos_banners/codeclash_logo_text_below.svg" alt="CodeClash" height="120px"></a>
241
+ &nbsp;&nbsp;
242
+ <a href="https://github.com/SWE-bench/sb-cli"><img src="https://raw.githubusercontent.com/SWE-agent/swe-agent-media/refs/heads/main/media/logos_banners/sbcli_logo_text_below.svg" alt="sb-cli" height="120px"></a>
240
243
  </div>
241
-
@@ -65,6 +65,7 @@ dev = [
65
65
  "mkdocs-material",
66
66
  "mkdocs-glightbox",
67
67
  "mkdocs-redirects",
68
+ "portkey-ai",
68
69
  ]
69
70
 
70
71
  [project.urls]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mini-swe-agent
3
- Version: 1.14.4
3
+ Version: 1.16.0
4
4
  Summary: Nano SWE Agent - A simple AI software engineering agent
5
5
  Author-email: Kilian Lieret <kilian.lieret@posteo.de>, "Carlos E. Jimenez" <carlosej@princeton.edu>
6
6
  License: MIT License
@@ -66,6 +66,7 @@ Requires-Dist: mike; extra == "dev"
66
66
  Requires-Dist: mkdocs-material; extra == "dev"
67
67
  Requires-Dist: mkdocs-glightbox; extra == "dev"
68
68
  Requires-Dist: mkdocs-redirects; extra == "dev"
69
+ Requires-Dist: portkey-ai; extra == "dev"
69
70
  Dynamic: license-file
70
71
 
71
72
  <div align="center">
@@ -74,6 +75,7 @@ Dynamic: license-file
74
75
 
75
76
  # The 100 line AI agent that solves GitHub issues & more
76
77
 
78
+ 📣 [Gemini 3 Pro reaches 74% on SWE-bench verified with mini-swe-agent!](https://x.com/KLieret/status/1991164693839270372)<br/>
77
79
  📣 [New blogpost: Randomly switching between GPT-5 and Sonnet 4 boosts performance](https://www.swebench.com/SWE-bench/blog/2025/08/19/mini-roulette/)
78
80
 
79
81
  [![Docs](https://img.shields.io/badge/Docs-green?style=for-the-badge&logo=materialformkdocs&logoColor=white)](https://mini-swe-agent.com/latest/)
@@ -94,7 +96,7 @@ Here's some details:
94
96
 
95
97
  - **Minimal**: Just [100 lines of python](https://github.com/SWE-agent/mini-swe-agent/blob/main/src/minisweagent/agents/default.py) (+100 total for [env](https://github.com/SWE-agent/mini-swe-agent/blob/main/src/minisweagent/environments/local.py),
96
98
  [model](https://github.com/SWE-agent/mini-swe-agent/blob/main/src/minisweagent/models/litellm_model.py), [script](https://github.com/SWE-agent/mini-swe-agent/blob/main/src/minisweagent/run/hello_world.py)) — no fancy dependencies!
97
- - **Powerful:** Resolves >70% of GitHub issues in the [SWE-bench verified benchmark](https://www.swebench.com/) ([leaderboard](https://swe-bench.com/)).
99
+ - **Powerful:** Resolves >74% of GitHub issues in the [SWE-bench verified benchmark](https://www.swebench.com/) ([leaderboard](https://swe-bench.com/)).
98
100
  - **Convenient:** Comes with UIs that turn this into your daily dev swiss army knife!
99
101
  - **Deployable:** In addition to local envs, you can use **docker**, **podman**, **singularity**, **apptainer**, and more
100
102
  - **Tested:** [![Codecov](https://img.shields.io/codecov/c/github/swe-agent/mini-swe-agent?style=flat-square)](https://codecov.io/gh/SWE-agent/mini-swe-agent)
@@ -248,7 +250,7 @@ agent.run("Write a sudoku game")
248
250
 
249
251
  ## Let's get started!
250
252
 
251
- Option 1: Install + run in virtual environment
253
+ **Option 1:** If you just want to try out the CLI (package installed in anonymous virtual environment)
252
254
 
253
255
  ```bash
254
256
  pip install uv && uvx mini-swe-agent [-v]
@@ -256,19 +258,19 @@ pip install uv && uvx mini-swe-agent [-v]
256
258
  pip install pipx && pipx ensurepath && pipx run mini-swe-agent [-v]
257
259
  ```
258
260
 
259
- Option 2: Install in current environment
261
+ **Option 2:** Install CLI & python bindings in current environment
260
262
 
261
263
  ```bash
262
- pip install mini-swe-agent && mini [-v]
264
+ pip install mini-swe-agent
265
+ mini -v # run the CLI
263
266
  ```
264
267
 
265
- Option 3: Install from source
268
+ **Option 3:** Install from source (developer setup)
266
269
 
267
270
  ```bash
268
271
  git clone https://github.com/SWE-agent/mini-swe-agent.git
269
- cd mini-swe-agent
270
- pip install -e .
271
- mini [-v]
272
+ cd mini-swe-agent && pip install -e .
273
+ mini [-v] # run the CLI
272
274
  ```
273
275
 
274
276
  Read more in our [documentation](https://mini-swe-agent.com/latest/):
@@ -298,14 +300,15 @@ If you found this work helpful, please consider citing the [SWE-agent paper](htt
298
300
  Our other projects:
299
301
 
300
302
  <div align="center">
301
- <a href="https://github.com/SWE-agent/SWE-agent"><img src="https://github.com/SWE-agent/mini-swe-agent/raw/main/docs/assets/sweagent_logo_text_below.svg" alt="SWE-agent" height="120px"></a>
303
+ <a href="https://github.com/SWE-agent/SWE-agent"><img src="https://raw.githubusercontent.com/SWE-agent/swe-agent-media/refs/heads/main/media/logos_banners/sweagent_logo_text_below.svg" alt="SWE-agent" height="120px"></a>
302
304
  &nbsp;&nbsp;
303
- <a href="https://github.com/SWE-agent/SWE-ReX"><img src="https://github.com/SWE-agent/mini-swe-agent/raw/main/docs/assets/swerex_logo_text_below.svg" alt="SWE-ReX" height="120px"></a>
305
+ <a href="https://github.com/SWE-agent/SWE-ReX"><img src="https://raw.githubusercontent.com/SWE-agent/swe-agent-media/refs/heads/main/media/logos_banners/swerex_logo_text_below.svg" alt="SWE-ReX" height="120px"></a>
304
306
  &nbsp;&nbsp;
305
- <a href="https://github.com/SWE-bench/SWE-bench"><img src="https://github.com/SWE-agent/mini-swe-agent/raw/main/docs/assets/swebench_logo_text_below.svg" alt="SWE-bench" height="120px"></a>
307
+ <a href="https://github.com/SWE-bench/SWE-bench"><img src="https://raw.githubusercontent.com/SWE-agent/swe-agent-media/refs/heads/main/media/logos_banners/swebench_logo_text_below.svg" alt="SWE-bench" height="120px"></a>
306
308
  &nbsp;&nbsp;
307
- <a href="https://github.com/SWE-bench/SWE-smith"><img src="https://github.com/SWE-agent/mini-swe-agent/raw/main/docs/assets/swesmith_logo_text_below.svg" alt="SWE-smith" height="120px"></a>
309
+ <a href="https://github.com/SWE-bench/SWE-smith"><img src="https://raw.githubusercontent.com/SWE-agent/swe-agent-media/refs/heads/main/media/logos_banners/swesmith_logo_text_below.svg" alt="SWE-smith" height="120px"></a>
308
310
  &nbsp;&nbsp;
309
- <a href="https://github.com/SWE-bench/sb-cli"><img src="https://github.com/SWE-agent/mini-swe-agent/raw/main/docs/assets/sbcli_logo_text_below.svg" alt="sb-cli" height="120px"></a>
311
+ <a href="https://github.com/codeclash-ai/codeclash"><img src="https://raw.githubusercontent.com/SWE-agent/swe-agent-media/refs/heads/main/media/logos_banners/codeclash_logo_text_below.svg" alt="CodeClash" height="120px"></a>
312
+ &nbsp;&nbsp;
313
+ <a href="https://github.com/SWE-bench/sb-cli"><img src="https://raw.githubusercontent.com/SWE-agent/swe-agent-media/refs/heads/main/media/logos_banners/sbcli_logo_text_below.svg" alt="sb-cli" height="120px"></a>
310
314
  </div>
311
-
@@ -24,6 +24,7 @@ src/minisweagent/config/mini_no_temp.yaml
24
24
  src/minisweagent/config/extra/__init__.py
25
25
  src/minisweagent/config/extra/swebench.yaml
26
26
  src/minisweagent/config/extra/swebench_roulette.yaml
27
+ src/minisweagent/config/extra/swebench_xml.yaml
27
28
  src/minisweagent/environments/__init__.py
28
29
  src/minisweagent/environments/docker.py
29
30
  src/minisweagent/environments/local.py
@@ -34,14 +35,18 @@ src/minisweagent/environments/extra/swerex_docker.py
34
35
  src/minisweagent/models/__init__.py
35
36
  src/minisweagent/models/anthropic.py
36
37
  src/minisweagent/models/litellm_model.py
38
+ src/minisweagent/models/litellm_response_api_model.py
37
39
  src/minisweagent/models/openrouter_model.py
38
40
  src/minisweagent/models/portkey_model.py
41
+ src/minisweagent/models/portkey_response_api_model.py
42
+ src/minisweagent/models/requesty_model.py
39
43
  src/minisweagent/models/test_models.py
40
44
  src/minisweagent/models/extra/__init__.py
41
45
  src/minisweagent/models/extra/roulette.py
42
46
  src/minisweagent/models/utils/__init__.py
43
47
  src/minisweagent/models/utils/cache_control.py
44
48
  src/minisweagent/models/utils/key_per_thread.py
49
+ src/minisweagent/models/utils/openai_utils.py
45
50
  src/minisweagent/run/__init__.py
46
51
  src/minisweagent/run/github_issue.py
47
52
  src/minisweagent/run/hello_world.py
@@ -25,6 +25,7 @@ mike
25
25
  mkdocs-material
26
26
  mkdocs-glightbox
27
27
  mkdocs-redirects
28
+ portkey-ai
28
29
 
29
30
  [full]
30
31
  mini-swe-agent[dev]
@@ -8,7 +8,7 @@ This file provides:
8
8
  unless you want the static type checking.
9
9
  """
10
10
 
11
- __version__ = "1.14.4"
11
+ __version__ = "1.16.0"
12
12
 
13
13
  import os
14
14
  from pathlib import Path
@@ -2,7 +2,6 @@
2
2
 
3
3
  import re
4
4
  import subprocess
5
- from collections.abc import Callable
6
5
  from dataclasses import asdict, dataclass
7
6
 
8
7
  from jinja2 import StrictUndefined, Template
@@ -25,6 +24,7 @@ class AgentConfig:
25
24
  )
26
25
  format_error_template: str = "Please always provide EXACTLY ONE action in triple backticks."
27
26
  action_observation_template: str = "Observation: {{output}}"
27
+ action_regex: str = r"```bash\s*\n(.*?)\n```"
28
28
  step_limit: int = 0
29
29
  cost_limit: float = 3.0
30
30
 
@@ -54,7 +54,7 @@ class LimitsExceeded(TerminatingException):
54
54
 
55
55
 
56
56
  class DefaultAgent:
57
- def __init__(self, model: Model, env: Environment, *, config_class: Callable = AgentConfig, **kwargs):
57
+ def __init__(self, model: Model, env: Environment, *, config_class: type = AgentConfig, **kwargs):
58
58
  self.config = config_class(**kwargs)
59
59
  self.messages: list[dict] = []
60
60
  self.model = model
@@ -106,7 +106,7 @@ class DefaultAgent:
106
106
 
107
107
  def parse_action(self, response: dict) -> dict:
108
108
  """Parse the action from the message. Returns the action."""
109
- actions = re.findall(r"```bash\s*\n(.*?)\n```", response["content"], re.DOTALL)
109
+ actions = re.findall(self.config.action_regex, response["content"], re.DOTALL)
110
110
  if len(actions) == 1:
111
111
  return {"action": actions[0].strip(), **response}
112
112
  raise FormatError(self.render_template(self.config.format_error_template, actions=actions))
@@ -0,0 +1,215 @@
1
+ agent:
2
+ system_template: |
3
+ You are a helpful assistant that can interact multiple times with a computer shell to solve programming tasks.
4
+ Your response must contain exactly ONE bash code block with ONE command (or commands connected with && or ||).
5
+
6
+ Include a THOUGHT section before your command where you explain your reasoning process.
7
+ Format your response as shown in <format_example>.
8
+
9
+ <format_example>
10
+ THOUGHT: Your reasoning and analysis here
11
+
12
+ <bash_code>your_command_here</bash_code>
13
+ </format_example>
14
+
15
+ Failure to follow these rules will cause your response to be rejected.
16
+ instance_template: |
17
+ <pr_description>
18
+ Consider the following PR description:
19
+ {{task}}
20
+ </pr_description>
21
+
22
+ <instructions>
23
+ # Task Instructions
24
+
25
+ ## Overview
26
+ You're a software engineer interacting continuously with a computer by submitting commands.
27
+ You'll be helping implement necessary changes to meet requirements in the PR description.
28
+ Your task is specifically to make changes to non-test files in the current directory in order to fix the issue described in the PR description in a way that is general and consistent with the codebase.
29
+
30
+ IMPORTANT: This is an interactive process where you will think and issue ONE command, see its result, then think and issue your next command.
31
+
32
+ For each response:
33
+ 1. Include a THOUGHT section explaining your reasoning and what you're trying to accomplish
34
+ 2. Provide exactly ONE bash command to execute
35
+
36
+ ## Important Boundaries
37
+ - MODIFY: Regular source code files in /testbed (this is the working directory for all your subsequent commands)
38
+ - DO NOT MODIFY: Tests, configuration files (pyproject.toml, setup.cfg, etc.)
39
+
40
+ ## Recommended Workflow
41
+ 1. Analyze the codebase by finding and reading relevant files
42
+ 2. Create a script to reproduce the issue
43
+ 3. Edit the source code to resolve the issue
44
+ 4. Verify your fix works by running your script again
45
+ 5. Test edge cases to ensure your fix is robust
46
+
47
+ ## Command Execution Rules
48
+ You are operating in an environment where
49
+ 1. You write a single command
50
+ 2. The system executes that command in a subshell
51
+ 3. You see the result
52
+ 4. You write your next command
53
+
54
+ Each response should include:
55
+ 1. A **THOUGHT** section where you explain your reasoning and plan
56
+ 2. A single bash code block with your command
57
+
58
+ Format your responses like included within the <format_example> block:
59
+
60
+ <format_example>
61
+ THOUGHT: Here I explain my reasoning process, analysis of the current situation,
62
+ and what I'm trying to accomplish with the command below.
63
+
64
+ <bash_code>your_command_here </bash_code></format_example>
65
+
66
+ **CRITICAL REQUIREMENTS:**
67
+ - Your response SHOULD include a THOUGHT section explaining your reasoning
68
+ - Your response MUST include EXACTLY ONE bash code block
69
+ - This bash block MUST contain EXACTLY ONE command (or a set of commands connected with && or ||)
70
+ - If you include zero or multiple bash blocks, or no command at all, YOUR RESPONSE WILL FAIL
71
+ - Do NOT try to run multiple independent commands in separate blocks in one response
72
+ - Directory or environment variable changes are not persistent. Every action is executed in a new subshell.
73
+ - However, you can prefix any action with `MY_ENV_VAR=MY_VALUE cd /path/to/working/dir && ...` or write/load environment variables from files
74
+
75
+ Example of a CORRECT response:
76
+
77
+ <example_response>
78
+ THOUGHT: I need to understand the structure of the repository first. Let me check what files are in the current directory to get a better understanding of the codebase.
79
+
80
+ <bash_code>ls -la</bash_code>
81
+ </example_response>
82
+
83
+ Example of an INCORRECT response:
84
+
85
+ <example_response>
86
+ THOUGHT: I need to examine the codebase and then look at a specific file. I'll run multiple commands to do this.
87
+
88
+ <bash_code>ls -la</bash_code>
89
+
90
+ Now I'll read the file:
91
+
92
+ <bash_code>cat file.txt</bash_code>
93
+ </example_response>
94
+
95
+ If you need to run multiple commands, either:
96
+
97
+ 1. Combine them in one block using && or ||
98
+
99
+ <bash_code>command1 && command2 || echo "Error occurred"</bash_code>
100
+
101
+ 2. Wait for the first command to complete, see its output, then issue the next command in your following response.
102
+
103
+ ## Environment Details
104
+
105
+ - You have a full Linux shell environment
106
+ - Always use non-interactive flags (-y, -f) for commands
107
+ - Avoid interactive tools like vi, nano, or any that require user input
108
+ - If a command isn't available, you can install it
109
+
110
+ ## Useful Command Examples
111
+
112
+ ### Create a new file:
113
+
114
+ <bash_code>cat <<'EOF' > newfile.py
115
+ import numpy as np
116
+ hello = "world"
117
+ print(hello)
118
+ EOF</bash_code>
119
+
120
+ ### Edit files with sed:
121
+
122
+ Replace all occurrences
123
+
124
+ <bash_code>sed -i 's/old_string/new_string/g' filename.py</bash_code>
125
+
126
+ Replace only first occurrence
127
+
128
+ <bash_code>sed -i 's/old_string/new_string/' filename.py</bash_code>
129
+
130
+ Replace first occurrence on line 1
131
+
132
+ <bash_code>sed -i '1s/old_string/new_string/' filename.py</bash_code>
133
+
134
+ Replace all occurrences in lines 1-10
135
+
136
+ <bash_code>sed -i '1,10s/old_string/new_string/g' filename.py</bash_code>
137
+
138
+ ### View file content:
139
+
140
+ View specific lines with numbers
141
+
142
+ <bash_code> nl -ba filename.py | sed -n '10,20p'</bash_code>
143
+
144
+ Any other command you want to run
145
+
146
+ <bash_code>anything</bash_code>
147
+
148
+ ## Submission
149
+
150
+ When you've completed your work (reading, editing, testing), and cannot make further progress
151
+ issue exactly the following command:
152
+
153
+ <bash_code>echo COMPLETE_TASK_AND_SUBMIT_FINAL_OUTPUT && git add -A && git diff --cached</bash_code>
154
+
155
+ This command will submit your work.
156
+ You cannot continue working (reading, editing, testing) in any way on this task after submitting.
157
+ </instructions>
158
+ action_observation_template: |
159
+ <returncode>{{output.returncode}}</returncode>
160
+ {% if output.output | length < 10000 -%}
161
+ <output>
162
+ {{ output.output -}}
163
+ </output>
164
+ {%- else -%}
165
+ <warning>
166
+ The output of your last command was too long.
167
+ Please try a different command that produces less output.
168
+ If you're looking at a file you can try use head, tail or sed to view a smaller number of lines selectively.
169
+ If you're using grep or find and it produced too much output, you can use a more selective search pattern.
170
+ If you really need to see something from the full command's output, you can redirect output to a file and then search in that file.
171
+ </warning>
172
+ {%- set elided_chars = output.output | length - 10000 -%}
173
+ <output_head>
174
+ {{ output.output[:5000] }}
175
+ </output_head>
176
+ <elided_chars>
177
+ {{ elided_chars }} characters elided
178
+ </elided_chars>
179
+ <output_tail>
180
+ {{ output.output[-5000:] }}
181
+ </output_tail>
182
+ {%- endif -%}
183
+ format_error_template: |
184
+ Please always provide EXACTLY ONE action in the `<bash_code>` block, found {{actions|length}} actions.
185
+
186
+ Please format your action in a `<bash_code>` block as shown in <response_example>.
187
+
188
+ <response_example>
189
+ Here are some thoughts about why you want to perform the action.
190
+
191
+ <bash_code>ls -la</bash_code>
192
+ </response_example>
193
+
194
+ If you have completed your assignment, please consult the first message about how to
195
+ submit your solution (you will not be able to continue working on this task after that).
196
+ step_limit: 250
197
+ cost_limit: 3.
198
+ action_regex: <bash_code>(.*?)</bash_code>
199
+
200
+ environment:
201
+ cwd: "/testbed"
202
+ timeout: 60
203
+ env:
204
+ PAGER: cat
205
+ MANPAGER: cat
206
+ LESS: -R
207
+ PIP_PROGRESS_BAR: 'off'
208
+ TQDM_DISABLE: '1'
209
+ environment_class: docker
210
+
211
+ model:
212
+ model_name: "minimax/minimax-m2"
213
+ model_class: openrouter
214
+ model_kwargs:
215
+ temperature: 0.0
@@ -34,7 +34,13 @@ class DockerEnvironmentConfig:
34
34
 
35
35
 
36
36
  class DockerEnvironment:
37
- def __init__(self, *, config_class: type = DockerEnvironmentConfig, logger: logging.Logger | None = None, **kwargs):
37
+ def __init__(
38
+ self,
39
+ *,
40
+ config_class: type = DockerEnvironmentConfig,
41
+ logger: logging.Logger | None = None,
42
+ **kwargs,
43
+ ):
38
44
  """This class executes bash commands in a Docker container using direct docker commands.
39
45
  See `DockerEnvironmentConfig` for keyword arguments.
40
46
  """
@@ -81,8 +81,11 @@ def get_model_name(input_model_name: str | None = None, config: dict | None = No
81
81
  _MODEL_CLASS_MAPPING = {
82
82
  "anthropic": "minisweagent.models.anthropic.AnthropicModel",
83
83
  "litellm": "minisweagent.models.litellm_model.LitellmModel",
84
+ "litellm_response": "minisweagent.models.litellm_response_api_model.LitellmResponseAPIModel",
84
85
  "openrouter": "minisweagent.models.openrouter_model.OpenRouterModel",
85
86
  "portkey": "minisweagent.models.portkey_model.PortkeyModel",
87
+ "portkey_response": "minisweagent.models.portkey_response_api_model.PortkeyResponseAPIModel",
88
+ "requesty": "minisweagent.models.requesty_model.RequestyModel",
86
89
  "deterministic": "minisweagent.models.test_models.DeterministicModel",
87
90
  }
88
91
 
@@ -1,5 +1,4 @@
1
1
  import random
2
- from collections.abc import Callable
3
2
  from dataclasses import asdict, dataclass
4
3
 
5
4
  from minisweagent import Model
@@ -14,7 +13,7 @@ class RouletteModelConfig:
14
13
 
15
14
 
16
15
  class RouletteModel:
17
- def __init__(self, *, config_class: Callable = RouletteModelConfig, **kwargs):
16
+ def __init__(self, *, config_class: type = RouletteModelConfig, **kwargs):
18
17
  """This "meta"-model randomly selects one of the models at every call"""
19
18
  self.config = config_class(**kwargs)
20
19
  self.models = [get_model(config=config) for config in self.config.model_kwargs]
@@ -50,7 +49,7 @@ class InterleavingModelConfig:
50
49
 
51
50
 
52
51
  class InterleavingModel(RouletteModel):
53
- def __init__(self, *, config_class: Callable = InterleavingModelConfig, **kwargs):
52
+ def __init__(self, *, config_class: type = InterleavingModelConfig, **kwargs):
54
53
  """This "meta"-model alternates between the models in the sequence for every call"""
55
54
  super().__init__(config_class=config_class, **kwargs)
56
55