mini-swe-agent 1.17.0__tar.gz → 1.17.2__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.
- {mini_swe_agent-1.17.0/src/mini_swe_agent.egg-info → mini_swe_agent-1.17.2}/PKG-INFO +8 -8
- {mini_swe_agent-1.17.0 → mini_swe_agent-1.17.2}/README.md +7 -7
- {mini_swe_agent-1.17.0 → mini_swe_agent-1.17.2/src/mini_swe_agent.egg-info}/PKG-INFO +8 -8
- {mini_swe_agent-1.17.0 → mini_swe_agent-1.17.2}/src/mini_swe_agent.egg-info/SOURCES.txt +0 -1
- {mini_swe_agent-1.17.0 → mini_swe_agent-1.17.2}/src/minisweagent/__init__.py +1 -1
- {mini_swe_agent-1.17.0 → mini_swe_agent-1.17.2}/src/minisweagent/config/README.md +0 -1
- {mini_swe_agent-1.17.0 → mini_swe_agent-1.17.2}/src/minisweagent/config/default.yaml +0 -1
- {mini_swe_agent-1.17.0 → mini_swe_agent-1.17.2}/src/minisweagent/config/extra/swebench_roulette.yaml +1 -1
- {mini_swe_agent-1.17.0 → mini_swe_agent-1.17.2}/src/minisweagent/config/github_issue.yaml +0 -1
- {mini_swe_agent-1.17.0 → mini_swe_agent-1.17.2}/src/minisweagent/config/mini.yaml +0 -1
- {mini_swe_agent-1.17.0 → mini_swe_agent-1.17.2}/src/minisweagent/models/litellm_model.py +2 -2
- {mini_swe_agent-1.17.0 → mini_swe_agent-1.17.2}/src/minisweagent/models/litellm_response_api_model.py +1 -1
- {mini_swe_agent-1.17.0 → mini_swe_agent-1.17.2}/src/minisweagent/models/openrouter_model.py +1 -1
- {mini_swe_agent-1.17.0 → mini_swe_agent-1.17.2}/src/minisweagent/models/portkey_model.py +1 -1
- {mini_swe_agent-1.17.0 → mini_swe_agent-1.17.2}/src/minisweagent/models/portkey_response_api_model.py +1 -1
- {mini_swe_agent-1.17.0 → mini_swe_agent-1.17.2}/src/minisweagent/models/requesty_model.py +1 -1
- {mini_swe_agent-1.17.0 → mini_swe_agent-1.17.2}/src/minisweagent/run/extra/utils/batch_progress.py +2 -2
- {mini_swe_agent-1.17.0 → mini_swe_agent-1.17.2}/src/minisweagent/run/inspector.py +1 -3
- mini_swe_agent-1.17.0/src/minisweagent/config/mini_no_temp.yaml +0 -158
- {mini_swe_agent-1.17.0 → mini_swe_agent-1.17.2}/LICENSE.md +0 -0
- {mini_swe_agent-1.17.0 → mini_swe_agent-1.17.2}/pyproject.toml +0 -0
- {mini_swe_agent-1.17.0 → mini_swe_agent-1.17.2}/setup.cfg +0 -0
- {mini_swe_agent-1.17.0 → mini_swe_agent-1.17.2}/src/mini_swe_agent.egg-info/dependency_links.txt +0 -0
- {mini_swe_agent-1.17.0 → mini_swe_agent-1.17.2}/src/mini_swe_agent.egg-info/entry_points.txt +0 -0
- {mini_swe_agent-1.17.0 → mini_swe_agent-1.17.2}/src/mini_swe_agent.egg-info/requires.txt +0 -0
- {mini_swe_agent-1.17.0 → mini_swe_agent-1.17.2}/src/mini_swe_agent.egg-info/top_level.txt +0 -0
- {mini_swe_agent-1.17.0 → mini_swe_agent-1.17.2}/src/minisweagent/__main__.py +0 -0
- {mini_swe_agent-1.17.0 → mini_swe_agent-1.17.2}/src/minisweagent/agents/__init__.py +0 -0
- {mini_swe_agent-1.17.0 → mini_swe_agent-1.17.2}/src/minisweagent/agents/default.py +0 -0
- {mini_swe_agent-1.17.0 → mini_swe_agent-1.17.2}/src/minisweagent/agents/interactive.py +0 -0
- {mini_swe_agent-1.17.0 → mini_swe_agent-1.17.2}/src/minisweagent/agents/interactive_textual.py +0 -0
- {mini_swe_agent-1.17.0 → mini_swe_agent-1.17.2}/src/minisweagent/config/__init__.py +0 -0
- {mini_swe_agent-1.17.0 → mini_swe_agent-1.17.2}/src/minisweagent/config/extra/__init__.py +0 -0
- {mini_swe_agent-1.17.0 → mini_swe_agent-1.17.2}/src/minisweagent/config/extra/swebench.yaml +0 -0
- {mini_swe_agent-1.17.0 → mini_swe_agent-1.17.2}/src/minisweagent/config/extra/swebench_xml.yaml +0 -0
- {mini_swe_agent-1.17.0 → mini_swe_agent-1.17.2}/src/minisweagent/config/mini.tcss +0 -0
- {mini_swe_agent-1.17.0 → mini_swe_agent-1.17.2}/src/minisweagent/environments/__init__.py +0 -0
- {mini_swe_agent-1.17.0 → mini_swe_agent-1.17.2}/src/minisweagent/environments/docker.py +0 -0
- {mini_swe_agent-1.17.0 → mini_swe_agent-1.17.2}/src/minisweagent/environments/extra/__init__.py +0 -0
- {mini_swe_agent-1.17.0 → mini_swe_agent-1.17.2}/src/minisweagent/environments/extra/bubblewrap.py +0 -0
- {mini_swe_agent-1.17.0 → mini_swe_agent-1.17.2}/src/minisweagent/environments/extra/swerex_docker.py +0 -0
- {mini_swe_agent-1.17.0 → mini_swe_agent-1.17.2}/src/minisweagent/environments/local.py +0 -0
- {mini_swe_agent-1.17.0 → mini_swe_agent-1.17.2}/src/minisweagent/environments/singularity.py +0 -0
- {mini_swe_agent-1.17.0 → mini_swe_agent-1.17.2}/src/minisweagent/models/__init__.py +0 -0
- {mini_swe_agent-1.17.0 → mini_swe_agent-1.17.2}/src/minisweagent/models/anthropic.py +0 -0
- {mini_swe_agent-1.17.0 → mini_swe_agent-1.17.2}/src/minisweagent/models/extra/__init__.py +0 -0
- {mini_swe_agent-1.17.0 → mini_swe_agent-1.17.2}/src/minisweagent/models/extra/roulette.py +0 -0
- {mini_swe_agent-1.17.0 → mini_swe_agent-1.17.2}/src/minisweagent/models/test_models.py +0 -0
- {mini_swe_agent-1.17.0 → mini_swe_agent-1.17.2}/src/minisweagent/models/utils/__init__.py +0 -0
- {mini_swe_agent-1.17.0 → mini_swe_agent-1.17.2}/src/minisweagent/models/utils/cache_control.py +0 -0
- {mini_swe_agent-1.17.0 → mini_swe_agent-1.17.2}/src/minisweagent/models/utils/key_per_thread.py +0 -0
- {mini_swe_agent-1.17.0 → mini_swe_agent-1.17.2}/src/minisweagent/models/utils/openai_utils.py +0 -0
- {mini_swe_agent-1.17.0 → mini_swe_agent-1.17.2}/src/minisweagent/py.typed +0 -0
- {mini_swe_agent-1.17.0 → mini_swe_agent-1.17.2}/src/minisweagent/run/__init__.py +0 -0
- {mini_swe_agent-1.17.0 → mini_swe_agent-1.17.2}/src/minisweagent/run/extra/__init__.py +0 -0
- {mini_swe_agent-1.17.0 → mini_swe_agent-1.17.2}/src/minisweagent/run/extra/config.py +0 -0
- {mini_swe_agent-1.17.0 → mini_swe_agent-1.17.2}/src/minisweagent/run/extra/swebench.py +0 -0
- {mini_swe_agent-1.17.0 → mini_swe_agent-1.17.2}/src/minisweagent/run/extra/swebench_single.py +0 -0
- {mini_swe_agent-1.17.0 → mini_swe_agent-1.17.2}/src/minisweagent/run/extra/utils/__init__.py +0 -0
- {mini_swe_agent-1.17.0 → mini_swe_agent-1.17.2}/src/minisweagent/run/github_issue.py +0 -0
- {mini_swe_agent-1.17.0 → mini_swe_agent-1.17.2}/src/minisweagent/run/hello_world.py +0 -0
- {mini_swe_agent-1.17.0 → mini_swe_agent-1.17.2}/src/minisweagent/run/mini.py +0 -0
- {mini_swe_agent-1.17.0 → mini_swe_agent-1.17.2}/src/minisweagent/run/mini_extra.py +0 -0
- {mini_swe_agent-1.17.0 → mini_swe_agent-1.17.2}/src/minisweagent/run/utils/__init__.py +0 -0
- {mini_swe_agent-1.17.0 → mini_swe_agent-1.17.2}/src/minisweagent/run/utils/save.py +0 -0
- {mini_swe_agent-1.17.0 → mini_swe_agent-1.17.2}/src/minisweagent/utils/__init__.py +0 -0
- {mini_swe_agent-1.17.0 → mini_swe_agent-1.17.2}/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.17.
|
|
3
|
+
Version: 1.17.2
|
|
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
|
|
@@ -86,21 +86,21 @@ In 2024, [SWE-bench](https://github.com/swe-bench/SWE-bench) & [SWE-agent](https
|
|
|
86
86
|
|
|
87
87
|
We now ask: **What if SWE-agent was 100x smaller, and still worked nearly as well?**
|
|
88
88
|
|
|
89
|
-
`mini` is for
|
|
89
|
+
The `mini` agent is for
|
|
90
90
|
|
|
91
91
|
- **Researchers** who want to **[benchmark](https://swe-bench.com), [fine-tune](https://swesmith.com/) or RL** without assumptions, bloat, or surprises
|
|
92
|
-
- **Developers** who like
|
|
92
|
+
- **Developers** who like to **own, understand, and modify** their tools
|
|
93
93
|
- **Engineers** who want something **trivial to sandbox & to deploy anywhere**
|
|
94
94
|
|
|
95
95
|
Here's some details:
|
|
96
96
|
|
|
97
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),
|
|
98
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!
|
|
99
|
-
- **
|
|
100
|
-
- **Convenient:** Comes with UIs that turn this into your daily dev swiss army knife!
|
|
99
|
+
- **Performant:** Scores >74% on the [SWE-bench verified benchmark](https://www.swebench.com/) benchmark; starts faster than Claude Code
|
|
101
100
|
- **Deployable:** In addition to local envs, you can use **docker**, **podman**, **singularity**, **apptainer**, and more
|
|
102
|
-
- **Tested:** [](https://codecov.io/gh/SWE-agent/mini-swe-agent)
|
|
103
101
|
- **Cutting edge:** Built by the Princeton & Stanford team behind [SWE-bench](https://swebench.com) and [SWE-agent](https://swe-agent.com).
|
|
102
|
+
- **Widely adopted:** In use by Meta, NVIDIA, Essential AI, Anyscale, and others
|
|
103
|
+
- **Tested:** [](https://codecov.io/gh/SWE-agent/mini-swe-agent)
|
|
104
104
|
|
|
105
105
|
<details>
|
|
106
106
|
|
|
@@ -108,7 +108,7 @@ Here's some details:
|
|
|
108
108
|
|
|
109
109
|
[SWE-agent](https://swe-agent.com/latest/) jump-started the development of AI agents in 2024. Back then, we placed a lot of emphasis on tools and special interfaces for the agent.
|
|
110
110
|
However, one year later, as LMs have become more capable, a lot of this is not needed at all to build a useful agent!
|
|
111
|
-
In fact, mini
|
|
111
|
+
In fact, the `mini` agent
|
|
112
112
|
|
|
113
113
|
- **Does not have any tools other than bash** — it doesn't even use the tool-calling interface of the LMs.
|
|
114
114
|
This means that you can run it with literally any model. When running in sandboxed environments you also don't need to take care
|
|
@@ -131,7 +131,7 @@ You can see the result on the [SWE-bench (bash only)](https://www.swebench.com/)
|
|
|
131
131
|
|
|
132
132
|
Some agents are overfitted research artifacts. Others are UI-heavy frontend monsters.
|
|
133
133
|
|
|
134
|
-
`mini` wants to be a hackable tool, not a black box.
|
|
134
|
+
The `mini` agent wants to be a hackable tool, not a black box.
|
|
135
135
|
|
|
136
136
|
- **Simple** enough to understand at a glance
|
|
137
137
|
- **Convenient** enough to use in daily workflows
|
|
@@ -15,21 +15,21 @@ In 2024, [SWE-bench](https://github.com/swe-bench/SWE-bench) & [SWE-agent](https
|
|
|
15
15
|
|
|
16
16
|
We now ask: **What if SWE-agent was 100x smaller, and still worked nearly as well?**
|
|
17
17
|
|
|
18
|
-
`mini` is for
|
|
18
|
+
The `mini` agent is for
|
|
19
19
|
|
|
20
20
|
- **Researchers** who want to **[benchmark](https://swe-bench.com), [fine-tune](https://swesmith.com/) or RL** without assumptions, bloat, or surprises
|
|
21
|
-
- **Developers** who like
|
|
21
|
+
- **Developers** who like to **own, understand, and modify** their tools
|
|
22
22
|
- **Engineers** who want something **trivial to sandbox & to deploy anywhere**
|
|
23
23
|
|
|
24
24
|
Here's some details:
|
|
25
25
|
|
|
26
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),
|
|
27
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!
|
|
28
|
-
- **
|
|
29
|
-
- **Convenient:** Comes with UIs that turn this into your daily dev swiss army knife!
|
|
28
|
+
- **Performant:** Scores >74% on the [SWE-bench verified benchmark](https://www.swebench.com/) benchmark; starts faster than Claude Code
|
|
30
29
|
- **Deployable:** In addition to local envs, you can use **docker**, **podman**, **singularity**, **apptainer**, and more
|
|
31
|
-
- **Tested:** [](https://codecov.io/gh/SWE-agent/mini-swe-agent)
|
|
32
30
|
- **Cutting edge:** Built by the Princeton & Stanford team behind [SWE-bench](https://swebench.com) and [SWE-agent](https://swe-agent.com).
|
|
31
|
+
- **Widely adopted:** In use by Meta, NVIDIA, Essential AI, Anyscale, and others
|
|
32
|
+
- **Tested:** [](https://codecov.io/gh/SWE-agent/mini-swe-agent)
|
|
33
33
|
|
|
34
34
|
<details>
|
|
35
35
|
|
|
@@ -37,7 +37,7 @@ Here's some details:
|
|
|
37
37
|
|
|
38
38
|
[SWE-agent](https://swe-agent.com/latest/) jump-started the development of AI agents in 2024. Back then, we placed a lot of emphasis on tools and special interfaces for the agent.
|
|
39
39
|
However, one year later, as LMs have become more capable, a lot of this is not needed at all to build a useful agent!
|
|
40
|
-
In fact, mini
|
|
40
|
+
In fact, the `mini` agent
|
|
41
41
|
|
|
42
42
|
- **Does not have any tools other than bash** — it doesn't even use the tool-calling interface of the LMs.
|
|
43
43
|
This means that you can run it with literally any model. When running in sandboxed environments you also don't need to take care
|
|
@@ -60,7 +60,7 @@ You can see the result on the [SWE-bench (bash only)](https://www.swebench.com/)
|
|
|
60
60
|
|
|
61
61
|
Some agents are overfitted research artifacts. Others are UI-heavy frontend monsters.
|
|
62
62
|
|
|
63
|
-
`mini` wants to be a hackable tool, not a black box.
|
|
63
|
+
The `mini` agent wants to be a hackable tool, not a black box.
|
|
64
64
|
|
|
65
65
|
- **Simple** enough to understand at a glance
|
|
66
66
|
- **Convenient** enough to use in daily workflows
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: mini-swe-agent
|
|
3
|
-
Version: 1.17.
|
|
3
|
+
Version: 1.17.2
|
|
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
|
|
@@ -86,21 +86,21 @@ In 2024, [SWE-bench](https://github.com/swe-bench/SWE-bench) & [SWE-agent](https
|
|
|
86
86
|
|
|
87
87
|
We now ask: **What if SWE-agent was 100x smaller, and still worked nearly as well?**
|
|
88
88
|
|
|
89
|
-
`mini` is for
|
|
89
|
+
The `mini` agent is for
|
|
90
90
|
|
|
91
91
|
- **Researchers** who want to **[benchmark](https://swe-bench.com), [fine-tune](https://swesmith.com/) or RL** without assumptions, bloat, or surprises
|
|
92
|
-
- **Developers** who like
|
|
92
|
+
- **Developers** who like to **own, understand, and modify** their tools
|
|
93
93
|
- **Engineers** who want something **trivial to sandbox & to deploy anywhere**
|
|
94
94
|
|
|
95
95
|
Here's some details:
|
|
96
96
|
|
|
97
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),
|
|
98
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!
|
|
99
|
-
- **
|
|
100
|
-
- **Convenient:** Comes with UIs that turn this into your daily dev swiss army knife!
|
|
99
|
+
- **Performant:** Scores >74% on the [SWE-bench verified benchmark](https://www.swebench.com/) benchmark; starts faster than Claude Code
|
|
101
100
|
- **Deployable:** In addition to local envs, you can use **docker**, **podman**, **singularity**, **apptainer**, and more
|
|
102
|
-
- **Tested:** [](https://codecov.io/gh/SWE-agent/mini-swe-agent)
|
|
103
101
|
- **Cutting edge:** Built by the Princeton & Stanford team behind [SWE-bench](https://swebench.com) and [SWE-agent](https://swe-agent.com).
|
|
102
|
+
- **Widely adopted:** In use by Meta, NVIDIA, Essential AI, Anyscale, and others
|
|
103
|
+
- **Tested:** [](https://codecov.io/gh/SWE-agent/mini-swe-agent)
|
|
104
104
|
|
|
105
105
|
<details>
|
|
106
106
|
|
|
@@ -108,7 +108,7 @@ Here's some details:
|
|
|
108
108
|
|
|
109
109
|
[SWE-agent](https://swe-agent.com/latest/) jump-started the development of AI agents in 2024. Back then, we placed a lot of emphasis on tools and special interfaces for the agent.
|
|
110
110
|
However, one year later, as LMs have become more capable, a lot of this is not needed at all to build a useful agent!
|
|
111
|
-
In fact, mini
|
|
111
|
+
In fact, the `mini` agent
|
|
112
112
|
|
|
113
113
|
- **Does not have any tools other than bash** — it doesn't even use the tool-calling interface of the LMs.
|
|
114
114
|
This means that you can run it with literally any model. When running in sandboxed environments you also don't need to take care
|
|
@@ -131,7 +131,7 @@ You can see the result on the [SWE-bench (bash only)](https://www.swebench.com/)
|
|
|
131
131
|
|
|
132
132
|
Some agents are overfitted research artifacts. Others are UI-heavy frontend monsters.
|
|
133
133
|
|
|
134
|
-
`mini` wants to be a hackable tool, not a black box.
|
|
134
|
+
The `mini` agent wants to be a hackable tool, not a black box.
|
|
135
135
|
|
|
136
136
|
- **Simple** enough to understand at a glance
|
|
137
137
|
- **Convenient** enough to use in daily workflows
|
|
@@ -20,7 +20,6 @@ src/minisweagent/config/default.yaml
|
|
|
20
20
|
src/minisweagent/config/github_issue.yaml
|
|
21
21
|
src/minisweagent/config/mini.tcss
|
|
22
22
|
src/minisweagent/config/mini.yaml
|
|
23
|
-
src/minisweagent/config/mini_no_temp.yaml
|
|
24
23
|
src/minisweagent/config/extra/__init__.py
|
|
25
24
|
src/minisweagent/config/extra/swebench.yaml
|
|
26
25
|
src/minisweagent/config/extra/swebench_roulette.yaml
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
# Configs
|
|
2
2
|
|
|
3
3
|
* `mini.yaml` - Default config for `mini`/`agents/interactive.py` or `mini -v`/`agents/interactive_textual.py` agent.
|
|
4
|
-
* `mini_no_temp.yaml` - Same as `mini.yaml` but without the temperature setting
|
|
5
4
|
* `default.yaml` - Default config for the `default.py` agent.
|
|
6
5
|
* `github_issue.yaml` - Config for the `run/github_issue.py` entry point.
|
|
7
6
|
|
{mini_swe_agent-1.17.0 → mini_swe_agent-1.17.2}/src/minisweagent/config/extra/swebench_roulette.yaml
RENAMED
|
@@ -36,7 +36,7 @@ agent:
|
|
|
36
36
|
2. Provide exactly ONE bash command to execute
|
|
37
37
|
|
|
38
38
|
## Important Boundaries
|
|
39
|
-
- MODIFY: Regular source code files in
|
|
39
|
+
- MODIFY: Regular source code files in /testbed (this is the working directory for all your subsequent commands)
|
|
40
40
|
- DO NOT MODIFY: Tests, configuration files (pyproject.toml, setup.cfg, etc.)
|
|
41
41
|
|
|
42
42
|
## Recommended Workflow
|
|
@@ -68,9 +68,9 @@ class LitellmModel:
|
|
|
68
68
|
def query(self, messages: list[dict[str, str]], **kwargs) -> dict:
|
|
69
69
|
if self.config.set_cache_control:
|
|
70
70
|
messages = set_cache_control(messages, mode=self.config.set_cache_control)
|
|
71
|
-
response = self._query(messages, **kwargs)
|
|
71
|
+
response = self._query([{"role": msg["role"], "content": msg["content"]} for msg in messages], **kwargs)
|
|
72
72
|
try:
|
|
73
|
-
cost = litellm.cost_calculator.completion_cost(response)
|
|
73
|
+
cost = litellm.cost_calculator.completion_cost(response, model=self.config.model_name)
|
|
74
74
|
if cost <= 0.0:
|
|
75
75
|
raise ValueError(f"Cost must be > 0.0, got {cost}")
|
|
76
76
|
except Exception as e:
|
|
@@ -62,7 +62,7 @@ class LitellmResponseAPIModel(LitellmModel):
|
|
|
62
62
|
print(response)
|
|
63
63
|
text = coerce_responses_text(response)
|
|
64
64
|
try:
|
|
65
|
-
cost = litellm.cost_calculator.completion_cost(response)
|
|
65
|
+
cost = litellm.cost_calculator.completion_cost(response, model=self.config.model_name)
|
|
66
66
|
except Exception as e:
|
|
67
67
|
logger.critical(
|
|
68
68
|
f"Error calculating cost for model {self.config.model_name}: {e}. "
|
|
@@ -97,7 +97,7 @@ class OpenRouterModel:
|
|
|
97
97
|
def query(self, messages: list[dict[str, str]], **kwargs) -> dict:
|
|
98
98
|
if self.config.set_cache_control:
|
|
99
99
|
messages = set_cache_control(messages, mode=self.config.set_cache_control)
|
|
100
|
-
response = self._query(messages, **kwargs)
|
|
100
|
+
response = self._query([{"role": msg["role"], "content": msg["content"]} for msg in messages], **kwargs)
|
|
101
101
|
|
|
102
102
|
usage = response.get("usage", {})
|
|
103
103
|
cost = usage.get("cost", 0.0)
|
|
@@ -90,7 +90,7 @@ class PortkeyModel:
|
|
|
90
90
|
def query(self, messages: list[dict[str, str]], **kwargs) -> dict:
|
|
91
91
|
if self.config.set_cache_control:
|
|
92
92
|
messages = set_cache_control(messages, mode=self.config.set_cache_control)
|
|
93
|
-
response = self._query(messages, **kwargs)
|
|
93
|
+
response = self._query([{"role": msg["role"], "content": msg["content"]} for msg in messages], **kwargs)
|
|
94
94
|
cost = self._calculate_cost(response)
|
|
95
95
|
self.n_calls += 1
|
|
96
96
|
self.cost += cost
|
|
@@ -52,7 +52,7 @@ class PortkeyResponseAPIModel(PortkeyModel):
|
|
|
52
52
|
response = self._query(messages, **kwargs)
|
|
53
53
|
text = coerce_responses_text(response)
|
|
54
54
|
try:
|
|
55
|
-
cost = litellm.cost_calculator.completion_cost(response)
|
|
55
|
+
cost = litellm.cost_calculator.completion_cost(response, model=self.config.model_name)
|
|
56
56
|
assert cost > 0.0, f"Cost is not positive: {cost}"
|
|
57
57
|
except Exception as e:
|
|
58
58
|
if self.config.cost_tracking != "ignore_errors":
|
|
@@ -91,7 +91,7 @@ class RequestyModel:
|
|
|
91
91
|
raise RequestyAPIError(f"Request failed: {e}") from e
|
|
92
92
|
|
|
93
93
|
def query(self, messages: list[dict[str, str]], **kwargs) -> dict:
|
|
94
|
-
response = self._query(messages, **kwargs)
|
|
94
|
+
response = self._query([{"role": msg["role"], "content": msg["content"]} for msg in messages], **kwargs)
|
|
95
95
|
|
|
96
96
|
# Extract cost from usage information
|
|
97
97
|
usage = response.get("usage", {})
|
{mini_swe_agent-1.17.0 → mini_swe_agent-1.17.2}/src/minisweagent/run/extra/utils/batch_progress.py
RENAMED
|
@@ -79,7 +79,7 @@ class RunBatchProgressManager:
|
|
|
79
79
|
"[cyan]Overall Progress", total=num_instances, total_cost="0.00", eta=""
|
|
80
80
|
)
|
|
81
81
|
|
|
82
|
-
self.render_group = Group(Table(), self._task_progress_bar
|
|
82
|
+
self.render_group = Group(self._main_progress_bar, Table(), self._task_progress_bar)
|
|
83
83
|
self._yaml_report_path = yaml_report_path
|
|
84
84
|
|
|
85
85
|
@property
|
|
@@ -112,7 +112,7 @@ class RunBatchProgressManager:
|
|
|
112
112
|
instances_str = _shorten_str(", ".join(reversed(instances)), 55)
|
|
113
113
|
t.add_row(status, str(len(instances)), instances_str)
|
|
114
114
|
assert self.render_group is not None
|
|
115
|
-
self.render_group.renderables[
|
|
115
|
+
self.render_group.renderables[1] = t
|
|
116
116
|
|
|
117
117
|
def _update_total_costs(self) -> None:
|
|
118
118
|
with self._lock:
|
|
@@ -2,9 +2,7 @@
|
|
|
2
2
|
"""
|
|
3
3
|
Simple trajectory inspector for browsing agent conversation trajectories.
|
|
4
4
|
|
|
5
|
-
[
|
|
6
|
-
More information about the usage: [bold green]https://mini-swe-agent.com/latest/usage/inspector/[/bold green]
|
|
7
|
-
[/not dim]
|
|
5
|
+
More information about the usage: [bold green] https://mini-swe-agent.com/latest/usage/inspector/ [/bold green].
|
|
8
6
|
"""
|
|
9
7
|
|
|
10
8
|
import json
|
|
@@ -1,158 +0,0 @@
|
|
|
1
|
-
# Identical config file to mini.yaml, but without temperature=0.0
|
|
2
|
-
agent:
|
|
3
|
-
system_template: |
|
|
4
|
-
You are a helpful assistant that can interact with a computer.
|
|
5
|
-
|
|
6
|
-
Your response must contain exactly ONE bash code block with ONE command (or commands connected with && or ||).
|
|
7
|
-
Include a THOUGHT section before your command where you explain your reasoning process.
|
|
8
|
-
Format your response as shown in <format_example>.
|
|
9
|
-
|
|
10
|
-
<format_example>
|
|
11
|
-
Your reasoning and analysis here. Explain why you want to perform the action.
|
|
12
|
-
|
|
13
|
-
```bash
|
|
14
|
-
your_command_here
|
|
15
|
-
```
|
|
16
|
-
</format_example>
|
|
17
|
-
|
|
18
|
-
Failure to follow these rules will cause your response to be rejected.
|
|
19
|
-
instance_template: |
|
|
20
|
-
Please solve this issue: {{task}}
|
|
21
|
-
|
|
22
|
-
You can execute bash commands and edit files to implement the necessary changes.
|
|
23
|
-
|
|
24
|
-
## Recommended Workflow
|
|
25
|
-
|
|
26
|
-
This workflows should be done step-by-step so that you can iterate on your changes and any possible problems.
|
|
27
|
-
|
|
28
|
-
1. Analyze the codebase by finding and reading relevant files
|
|
29
|
-
2. Create a script to reproduce the issue
|
|
30
|
-
3. Edit the source code to resolve the issue
|
|
31
|
-
4. Verify your fix works by running your script again
|
|
32
|
-
5. Test edge cases to ensure your fix is robust
|
|
33
|
-
6. Submit your changes and finish your work by issuing the following command: `echo COMPLETE_TASK_AND_SUBMIT_FINAL_OUTPUT`.
|
|
34
|
-
Do not combine it with any other command. <important>After this command, you cannot continue working on this task.</important>
|
|
35
|
-
|
|
36
|
-
## Important Rules
|
|
37
|
-
|
|
38
|
-
1. Every response must contain exactly one action
|
|
39
|
-
2. The action must be enclosed in triple backticks
|
|
40
|
-
3. Directory or environment variable changes are not persistent. Every action is executed in a new subshell.
|
|
41
|
-
However, you can prefix any action with `MY_ENV_VAR=MY_VALUE cd /path/to/working/dir && ...` or write/load environment variables from files
|
|
42
|
-
|
|
43
|
-
<system_information>
|
|
44
|
-
{{system}} {{release}} {{version}} {{machine}}
|
|
45
|
-
</system_information>
|
|
46
|
-
|
|
47
|
-
## Formatting your response
|
|
48
|
-
|
|
49
|
-
Here is an example of a correct response:
|
|
50
|
-
|
|
51
|
-
<example_response>
|
|
52
|
-
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.
|
|
53
|
-
|
|
54
|
-
```bash
|
|
55
|
-
ls -la
|
|
56
|
-
```
|
|
57
|
-
</example_response>
|
|
58
|
-
|
|
59
|
-
## Useful command examples
|
|
60
|
-
|
|
61
|
-
### Create a new file:
|
|
62
|
-
|
|
63
|
-
```bash
|
|
64
|
-
cat <<'EOF' > newfile.py
|
|
65
|
-
import numpy as np
|
|
66
|
-
hello = "world"
|
|
67
|
-
print(hello)
|
|
68
|
-
EOF
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
### Edit files with sed:
|
|
72
|
-
|
|
73
|
-
{%- if system == "Darwin" -%}
|
|
74
|
-
<important>
|
|
75
|
-
You are on MacOS. For all the below examples, you need to use `sed -i ''` instead of `sed -i`.
|
|
76
|
-
</important>
|
|
77
|
-
{%- endif -%}
|
|
78
|
-
|
|
79
|
-
```bash
|
|
80
|
-
# Replace all occurrences
|
|
81
|
-
sed -i 's/old_string/new_string/g' filename.py
|
|
82
|
-
|
|
83
|
-
# Replace only first occurrence
|
|
84
|
-
sed -i 's/old_string/new_string/' filename.py
|
|
85
|
-
|
|
86
|
-
# Replace first occurrence on line 1
|
|
87
|
-
sed -i '1s/old_string/new_string/' filename.py
|
|
88
|
-
|
|
89
|
-
# Replace all occurrences in lines 1-10
|
|
90
|
-
sed -i '1,10s/old_string/new_string/g' filename.py
|
|
91
|
-
```
|
|
92
|
-
|
|
93
|
-
### View file content:
|
|
94
|
-
|
|
95
|
-
```bash
|
|
96
|
-
# View specific lines with numbers
|
|
97
|
-
nl -ba filename.py | sed -n '10,20p'
|
|
98
|
-
```
|
|
99
|
-
|
|
100
|
-
### Any other command you want to run
|
|
101
|
-
|
|
102
|
-
```bash
|
|
103
|
-
anything
|
|
104
|
-
```
|
|
105
|
-
action_observation_template: |
|
|
106
|
-
<returncode>{{output.returncode}}</returncode>
|
|
107
|
-
{% if output.output | length < 10000 -%}
|
|
108
|
-
<output>
|
|
109
|
-
{{ output.output -}}
|
|
110
|
-
</output>
|
|
111
|
-
{%- else -%}
|
|
112
|
-
<warning>
|
|
113
|
-
The output of your last command was too long.
|
|
114
|
-
Please try a different command that produces less output.
|
|
115
|
-
If you're looking at a file you can try use head, tail or sed to view a smaller number of lines selectively.
|
|
116
|
-
If you're using grep or find and it produced too much output, you can use a more selective search pattern.
|
|
117
|
-
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.
|
|
118
|
-
</warning>
|
|
119
|
-
{%- set elided_chars = output.output | length - 10000 -%}
|
|
120
|
-
<output_head>
|
|
121
|
-
{{ output.output[:5000] }}
|
|
122
|
-
</output_head>
|
|
123
|
-
<elided_chars>
|
|
124
|
-
{{ elided_chars }} characters elided
|
|
125
|
-
</elided_chars>
|
|
126
|
-
<output_tail>
|
|
127
|
-
{{ output.output[-5000:] }}
|
|
128
|
-
</output_tail>
|
|
129
|
-
{%- endif -%}
|
|
130
|
-
format_error_template: |
|
|
131
|
-
Please always provide EXACTLY ONE action in triple backticks, found {{actions|length}} actions.
|
|
132
|
-
If you want to end the task, please issue the following command: `echo COMPLETE_TASK_AND_SUBMIT_FINAL_OUTPUT`
|
|
133
|
-
without any other command.
|
|
134
|
-
Else, please format your response exactly as follows:
|
|
135
|
-
|
|
136
|
-
<response_example>
|
|
137
|
-
Here are some thoughts about why you want to perform the action.
|
|
138
|
-
|
|
139
|
-
```bash
|
|
140
|
-
<action>
|
|
141
|
-
```
|
|
142
|
-
</response_example>
|
|
143
|
-
|
|
144
|
-
Note: In rare cases, if you need to reference a similar format in your command, you might have
|
|
145
|
-
to proceed in two steps, first writing TRIPLEBACKTICKSBASH, then replacing them with ```bash.
|
|
146
|
-
step_limit: 0.
|
|
147
|
-
cost_limit: 3.
|
|
148
|
-
mode: confirm
|
|
149
|
-
environment:
|
|
150
|
-
env:
|
|
151
|
-
PAGER: cat
|
|
152
|
-
MANPAGER: cat
|
|
153
|
-
LESS: -R
|
|
154
|
-
PIP_PROGRESS_BAR: 'off'
|
|
155
|
-
TQDM_DISABLE: '1'
|
|
156
|
-
model:
|
|
157
|
-
model_kwargs:
|
|
158
|
-
drop_params: true
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mini_swe_agent-1.17.0 → mini_swe_agent-1.17.2}/src/mini_swe_agent.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
{mini_swe_agent-1.17.0 → mini_swe_agent-1.17.2}/src/mini_swe_agent.egg-info/entry_points.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mini_swe_agent-1.17.0 → mini_swe_agent-1.17.2}/src/minisweagent/agents/interactive_textual.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mini_swe_agent-1.17.0 → mini_swe_agent-1.17.2}/src/minisweagent/config/extra/swebench_xml.yaml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mini_swe_agent-1.17.0 → mini_swe_agent-1.17.2}/src/minisweagent/environments/extra/__init__.py
RENAMED
|
File without changes
|
{mini_swe_agent-1.17.0 → mini_swe_agent-1.17.2}/src/minisweagent/environments/extra/bubblewrap.py
RENAMED
|
File without changes
|
{mini_swe_agent-1.17.0 → mini_swe_agent-1.17.2}/src/minisweagent/environments/extra/swerex_docker.py
RENAMED
|
File without changes
|
|
File without changes
|
{mini_swe_agent-1.17.0 → mini_swe_agent-1.17.2}/src/minisweagent/environments/singularity.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mini_swe_agent-1.17.0 → mini_swe_agent-1.17.2}/src/minisweagent/models/utils/cache_control.py
RENAMED
|
File without changes
|
{mini_swe_agent-1.17.0 → mini_swe_agent-1.17.2}/src/minisweagent/models/utils/key_per_thread.py
RENAMED
|
File without changes
|
{mini_swe_agent-1.17.0 → mini_swe_agent-1.17.2}/src/minisweagent/models/utils/openai_utils.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mini_swe_agent-1.17.0 → mini_swe_agent-1.17.2}/src/minisweagent/run/extra/swebench_single.py
RENAMED
|
File without changes
|
{mini_swe_agent-1.17.0 → mini_swe_agent-1.17.2}/src/minisweagent/run/extra/utils/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|