mini-swe-agent 1.17.2__py3-none-any.whl → 1.17.3__py3-none-any.whl
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.2.dist-info → mini_swe_agent-1.17.3.dist-info}/METADATA +1 -1
- {mini_swe_agent-1.17.2.dist-info → mini_swe_agent-1.17.3.dist-info}/RECORD +14 -14
- minisweagent/__init__.py +1 -1
- minisweagent/agents/default.py +9 -1
- minisweagent/models/litellm_model.py +1 -0
- minisweagent/models/litellm_response_api_model.py +4 -2
- minisweagent/models/openrouter_model.py +1 -0
- minisweagent/models/portkey_model.py +1 -0
- minisweagent/models/portkey_response_api_model.py +1 -0
- minisweagent/models/requesty_model.py +1 -0
- {mini_swe_agent-1.17.2.dist-info → mini_swe_agent-1.17.3.dist-info}/WHEEL +0 -0
- {mini_swe_agent-1.17.2.dist-info → mini_swe_agent-1.17.3.dist-info}/entry_points.txt +0 -0
- {mini_swe_agent-1.17.2.dist-info → mini_swe_agent-1.17.3.dist-info}/licenses/LICENSE.md +0 -0
- {mini_swe_agent-1.17.2.dist-info → mini_swe_agent-1.17.3.dist-info}/top_level.txt +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.3
|
|
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
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
mini_swe_agent-1.17.
|
|
2
|
-
minisweagent/__init__.py,sha256=
|
|
1
|
+
mini_swe_agent-1.17.3.dist-info/licenses/LICENSE.md,sha256=D3luWPkdHAe7LBsdD4vzqDAXw6Xewb3G-uczss0uh1s,1094
|
|
2
|
+
minisweagent/__init__.py,sha256=eWlfblsvb5AJPNFfCN2buiqwmeZ0h_Ssk7tzniLhn_8,2016
|
|
3
3
|
minisweagent/__main__.py,sha256=FIyAOiw--c3FQ2g240FOM1FdL0lk_PxSpixu0pQ7WFo,194
|
|
4
4
|
minisweagent/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
5
5
|
minisweagent/agents/__init__.py,sha256=cpjJLzg1IGxLM-tZpoMJV9S33ye13XtdBO0x7DU_Lrk,48
|
|
6
|
-
minisweagent/agents/default.py,sha256=
|
|
6
|
+
minisweagent/agents/default.py,sha256=NLHCTR8CrM0-1aNXT0zZZ044RBYQWACfNzKwAg69IWM,6054
|
|
7
7
|
minisweagent/agents/interactive.py,sha256=NBeNamRuqww9ZRhOg1q8xPO9ziUw2gpAVV6hCPbpBxU,7470
|
|
8
8
|
minisweagent/agents/interactive_textual.py,sha256=yUDMkuvhhnZAP8LtiBWmt5J5WzfWBeR0zNlJbdbEGa0,18153
|
|
9
9
|
minisweagent/config/README.md,sha256=ZGH5KbFHpkwYOwoZgwP1dHOikuvU11dIG_TqyI73dik,355
|
|
@@ -25,12 +25,12 @@ minisweagent/environments/extra/bubblewrap.py,sha256=G12Dm63N30qByfLb1SKNsI4G4gL
|
|
|
25
25
|
minisweagent/environments/extra/swerex_docker.py,sha256=WPYbohT_vqTHkde9cxpbV6chLXCpLl0PDAcgMbZsV0M,1707
|
|
26
26
|
minisweagent/models/__init__.py,sha256=RGJgMPeF8W2Ix8_xwvHjjDCD9I6ygirz4v8Ps1KG6dI,4435
|
|
27
27
|
minisweagent/models/anthropic.py,sha256=4p-LxQ_RYQUX1rBsffAj3T1bBb2uMRhA4IyKfDcMpgo,1517
|
|
28
|
-
minisweagent/models/litellm_model.py,sha256=
|
|
29
|
-
minisweagent/models/litellm_response_api_model.py,sha256=
|
|
30
|
-
minisweagent/models/openrouter_model.py,sha256=
|
|
31
|
-
minisweagent/models/portkey_model.py,sha256=
|
|
32
|
-
minisweagent/models/portkey_response_api_model.py,sha256=
|
|
33
|
-
minisweagent/models/requesty_model.py,sha256=
|
|
28
|
+
minisweagent/models/litellm_model.py,sha256=0HBnb53GdeqSAwNcJuu8hXrd3XqqIm4BHS1WkwK3ZGE,4394
|
|
29
|
+
minisweagent/models/litellm_response_api_model.py,sha256=Niq4HepQm_dlCkGdXsg9_7zNNRxJlnwWK-JJE0lP9Qg,3150
|
|
30
|
+
minisweagent/models/openrouter_model.py,sha256=YgML8_p9gHMjoBcxszmgyrIr5DLRX2vZiBwHC47N5mg,4796
|
|
31
|
+
minisweagent/models/portkey_model.py,sha256=_eK8maRm2kwombWYbYtH7MXj8rhd18ZE7tGer2YXvws,7307
|
|
32
|
+
minisweagent/models/portkey_response_api_model.py,sha256=JcODu40mYsqWnwWntTSjRUMTzifLUZZpFL5sF3FUk3s,2960
|
|
33
|
+
minisweagent/models/requesty_model.py,sha256=t4iQD7mH61UlldQmydcGYmoj-dAG8K_2347DBjl-4vo,3865
|
|
34
34
|
minisweagent/models/test_models.py,sha256=ItCA6ddntzkYA7dzSuUEaLMV-AE8TBuXBFP8CzpiO3U,1351
|
|
35
35
|
minisweagent/models/extra/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
36
36
|
minisweagent/models/extra/roulette.py,sha256=idteU0pGvmmipNr0s-42GAbVkmKE20hY2LTFxbkAgoI,2048
|
|
@@ -54,8 +54,8 @@ minisweagent/run/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3
|
|
|
54
54
|
minisweagent/run/utils/save.py,sha256=bokvblZ1SaIvCXimkRQqgvERKmVM0jn8SF7UoHBeerQ,2546
|
|
55
55
|
minisweagent/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
56
56
|
minisweagent/utils/log.py,sha256=ruDMNKMrVC9NPvCeHwO3QYz5jsVNUGQB2dRAEAPAWp8,996
|
|
57
|
-
mini_swe_agent-1.17.
|
|
58
|
-
mini_swe_agent-1.17.
|
|
59
|
-
mini_swe_agent-1.17.
|
|
60
|
-
mini_swe_agent-1.17.
|
|
61
|
-
mini_swe_agent-1.17.
|
|
57
|
+
mini_swe_agent-1.17.3.dist-info/METADATA,sha256=zowefUb3iP7jiHwasuE_WQc40kshknJQpzlli4ix0mk,14836
|
|
58
|
+
mini_swe_agent-1.17.3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
59
|
+
mini_swe_agent-1.17.3.dist-info/entry_points.txt,sha256=d1_yRbTaGjs1UXHa6JQK0sKDGBIVGm8oeW0k2kfbJgQ,182
|
|
60
|
+
mini_swe_agent-1.17.3.dist-info/top_level.txt,sha256=zKF4t8bFpV87fdVABZt2Da-vnb4Vkh_CxkwQx5YT4Ew,13
|
|
61
|
+
mini_swe_agent-1.17.3.dist-info/RECORD,,
|
minisweagent/__init__.py
CHANGED
minisweagent/agents/default.py
CHANGED
|
@@ -20,7 +20,15 @@ class AgentConfig:
|
|
|
20
20
|
)
|
|
21
21
|
timeout_template: str = (
|
|
22
22
|
"The last command <command>{{action['action']}}</command> timed out and has been killed.\n"
|
|
23
|
-
"The output of the command was:\n
|
|
23
|
+
"The output of the command was:\n"
|
|
24
|
+
"{% if output | length < 10000 -%}\n"
|
|
25
|
+
"<output>\n{{output}}\n</output>\n"
|
|
26
|
+
"{%- else -%}\n"
|
|
27
|
+
"<warning>Output was too long and has been truncated.</warning>\n"
|
|
28
|
+
"<output_head>\n{{ output[:5000] }}\n</output_head>\n"
|
|
29
|
+
"<elided_chars>{{ output | length - 10000 }} characters elided</elided_chars>\n"
|
|
30
|
+
"<output_tail>\n{{ output[-5000:] }}\n</output_tail>\n"
|
|
31
|
+
"{%- endif %}\n"
|
|
24
32
|
"Please try another command and make sure to avoid those requiring interactive input."
|
|
25
33
|
)
|
|
26
34
|
format_error_template: str = "Please always provide EXACTLY ONE action in triple backticks."
|
|
@@ -41,6 +41,7 @@ class LitellmModel:
|
|
|
41
41
|
litellm.utils.register_model(json.loads(Path(self.config.litellm_model_registry).read_text()))
|
|
42
42
|
|
|
43
43
|
@retry(
|
|
44
|
+
reraise=True,
|
|
44
45
|
stop=stop_after_attempt(int(os.getenv("MSWEA_MODEL_RETRY_STOP_AFTER_ATTEMPT", "10"))),
|
|
45
46
|
wait=wait_exponential(multiplier=1, min=4, max=60),
|
|
46
47
|
before_sleep=before_sleep_log(logger, logging.WARNING),
|
|
@@ -28,6 +28,7 @@ class LitellmResponseAPIModel(LitellmModel):
|
|
|
28
28
|
self._previous_response_id: str | None = None
|
|
29
29
|
|
|
30
30
|
@retry(
|
|
31
|
+
reraise=True,
|
|
31
32
|
stop=stop_after_attempt(10),
|
|
32
33
|
wait=wait_exponential(multiplier=1, min=4, max=60),
|
|
33
34
|
before_sleep=before_sleep_log(logger, logging.WARNING),
|
|
@@ -45,9 +46,11 @@ class LitellmResponseAPIModel(LitellmModel):
|
|
|
45
46
|
)
|
|
46
47
|
def _query(self, messages: list[dict[str, str]], **kwargs):
|
|
47
48
|
try:
|
|
49
|
+
# Remove 'timestamp' field added by agent - not supported by OpenAI responses API
|
|
50
|
+
clean_messages = [{"role": msg["role"], "content": msg["content"]} for msg in messages]
|
|
48
51
|
resp = litellm.responses(
|
|
49
52
|
model=self.config.model_name,
|
|
50
|
-
input=
|
|
53
|
+
input=clean_messages if self._previous_response_id is None else clean_messages[-1:],
|
|
51
54
|
previous_response_id=self._previous_response_id,
|
|
52
55
|
**(self.config.model_kwargs | kwargs),
|
|
53
56
|
)
|
|
@@ -59,7 +62,6 @@ class LitellmResponseAPIModel(LitellmModel):
|
|
|
59
62
|
|
|
60
63
|
def query(self, messages: list[dict[str, str]], **kwargs) -> dict:
|
|
61
64
|
response = self._query(messages, **kwargs)
|
|
62
|
-
print(response)
|
|
63
65
|
text = coerce_responses_text(response)
|
|
64
66
|
try:
|
|
65
67
|
cost = litellm.cost_calculator.completion_cost(response, model=self.config.model_name)
|
|
@@ -56,6 +56,7 @@ class OpenRouterModel:
|
|
|
56
56
|
self._api_key = os.getenv("OPENROUTER_API_KEY", "")
|
|
57
57
|
|
|
58
58
|
@retry(
|
|
59
|
+
reraise=True,
|
|
59
60
|
stop=stop_after_attempt(int(os.getenv("MSWEA_MODEL_RETRY_STOP_AFTER_ATTEMPT", "10"))),
|
|
60
61
|
wait=wait_exponential(multiplier=1, min=4, max=60),
|
|
61
62
|
before_sleep=before_sleep_log(logger, logging.WARNING),
|
|
@@ -74,6 +74,7 @@ class PortkeyModel:
|
|
|
74
74
|
self.client = Portkey(**client_kwargs)
|
|
75
75
|
|
|
76
76
|
@retry(
|
|
77
|
+
reraise=True,
|
|
77
78
|
stop=stop_after_attempt(int(os.getenv("MSWEA_MODEL_RETRY_STOP_AFTER_ATTEMPT", "10"))),
|
|
78
79
|
wait=wait_exponential(multiplier=1, min=4, max=60),
|
|
79
80
|
before_sleep=before_sleep_log(logger, logging.WARNING),
|
|
@@ -30,6 +30,7 @@ class PortkeyResponseAPIModel(PortkeyModel):
|
|
|
30
30
|
self._previous_response_id: str | None = None
|
|
31
31
|
|
|
32
32
|
@retry(
|
|
33
|
+
reraise=True,
|
|
33
34
|
stop=stop_after_attempt(int(os.getenv("MSWEA_MODEL_RETRY_STOP_AFTER_ATTEMPT", "10"))),
|
|
34
35
|
wait=wait_exponential(multiplier=1, min=4, max=60),
|
|
35
36
|
before_sleep=before_sleep_log(logger, logging.WARNING),
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|