mini-swe-agent 1.2.0__tar.gz → 1.3.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 (51) hide show
  1. {mini_swe_agent-1.2.0/src/mini_swe_agent.egg-info → mini_swe_agent-1.3.0}/PKG-INFO +1 -1
  2. {mini_swe_agent-1.2.0 → mini_swe_agent-1.3.0/src/mini_swe_agent.egg-info}/PKG-INFO +1 -1
  3. {mini_swe_agent-1.2.0 → mini_swe_agent-1.3.0}/src/minisweagent/__init__.py +1 -1
  4. {mini_swe_agent-1.2.0 → mini_swe_agent-1.3.0}/src/minisweagent/config/mini.yaml +12 -7
  5. {mini_swe_agent-1.2.0 → mini_swe_agent-1.3.0}/src/minisweagent/models/litellm_model.py +5 -0
  6. {mini_swe_agent-1.2.0 → mini_swe_agent-1.3.0}/src/minisweagent/run/extra/swebench.py +10 -8
  7. {mini_swe_agent-1.2.0 → mini_swe_agent-1.3.0}/src/minisweagent/run/mini.py +14 -12
  8. {mini_swe_agent-1.2.0 → mini_swe_agent-1.3.0}/LICENSE.md +0 -0
  9. {mini_swe_agent-1.2.0 → mini_swe_agent-1.3.0}/README.md +0 -0
  10. {mini_swe_agent-1.2.0 → mini_swe_agent-1.3.0}/pyproject.toml +0 -0
  11. {mini_swe_agent-1.2.0 → mini_swe_agent-1.3.0}/setup.cfg +0 -0
  12. {mini_swe_agent-1.2.0 → mini_swe_agent-1.3.0}/src/mini_swe_agent.egg-info/SOURCES.txt +0 -0
  13. {mini_swe_agent-1.2.0 → mini_swe_agent-1.3.0}/src/mini_swe_agent.egg-info/dependency_links.txt +0 -0
  14. {mini_swe_agent-1.2.0 → mini_swe_agent-1.3.0}/src/mini_swe_agent.egg-info/entry_points.txt +0 -0
  15. {mini_swe_agent-1.2.0 → mini_swe_agent-1.3.0}/src/mini_swe_agent.egg-info/requires.txt +0 -0
  16. {mini_swe_agent-1.2.0 → mini_swe_agent-1.3.0}/src/mini_swe_agent.egg-info/top_level.txt +0 -0
  17. {mini_swe_agent-1.2.0 → mini_swe_agent-1.3.0}/src/minisweagent/__main__.py +0 -0
  18. {mini_swe_agent-1.2.0 → mini_swe_agent-1.3.0}/src/minisweagent/agents/__init__.py +0 -0
  19. {mini_swe_agent-1.2.0 → mini_swe_agent-1.3.0}/src/minisweagent/agents/default.py +0 -0
  20. {mini_swe_agent-1.2.0 → mini_swe_agent-1.3.0}/src/minisweagent/agents/interactive.py +0 -0
  21. {mini_swe_agent-1.2.0 → mini_swe_agent-1.3.0}/src/minisweagent/agents/interactive_textual.py +0 -0
  22. {mini_swe_agent-1.2.0 → mini_swe_agent-1.3.0}/src/minisweagent/config/README.md +0 -0
  23. {mini_swe_agent-1.2.0 → mini_swe_agent-1.3.0}/src/minisweagent/config/__init__.py +0 -0
  24. {mini_swe_agent-1.2.0 → mini_swe_agent-1.3.0}/src/minisweagent/config/default.yaml +0 -0
  25. {mini_swe_agent-1.2.0 → mini_swe_agent-1.3.0}/src/minisweagent/config/extra/__init__.py +0 -0
  26. {mini_swe_agent-1.2.0 → mini_swe_agent-1.3.0}/src/minisweagent/config/extra/swebench.yaml +0 -0
  27. {mini_swe_agent-1.2.0 → mini_swe_agent-1.3.0}/src/minisweagent/config/github_issue.yaml +0 -0
  28. {mini_swe_agent-1.2.0 → mini_swe_agent-1.3.0}/src/minisweagent/config/mini.tcss +0 -0
  29. {mini_swe_agent-1.2.0 → mini_swe_agent-1.3.0}/src/minisweagent/environments/__init__.py +0 -0
  30. {mini_swe_agent-1.2.0 → mini_swe_agent-1.3.0}/src/minisweagent/environments/docker.py +0 -0
  31. {mini_swe_agent-1.2.0 → mini_swe_agent-1.3.0}/src/minisweagent/environments/extra/__init__.py +0 -0
  32. {mini_swe_agent-1.2.0 → mini_swe_agent-1.3.0}/src/minisweagent/environments/extra/swerex_docker.py +0 -0
  33. {mini_swe_agent-1.2.0 → mini_swe_agent-1.3.0}/src/minisweagent/environments/local.py +0 -0
  34. {mini_swe_agent-1.2.0 → mini_swe_agent-1.3.0}/src/minisweagent/environments/singularity.py +0 -0
  35. {mini_swe_agent-1.2.0 → mini_swe_agent-1.3.0}/src/minisweagent/models/__init__.py +0 -0
  36. {mini_swe_agent-1.2.0 → mini_swe_agent-1.3.0}/src/minisweagent/models/anthropic.py +0 -0
  37. {mini_swe_agent-1.2.0 → mini_swe_agent-1.3.0}/src/minisweagent/models/test_models.py +0 -0
  38. {mini_swe_agent-1.2.0 → mini_swe_agent-1.3.0}/src/minisweagent/models/utils/cache_control.py +0 -0
  39. {mini_swe_agent-1.2.0 → mini_swe_agent-1.3.0}/src/minisweagent/models/utils/key_per_thread.py +0 -0
  40. {mini_swe_agent-1.2.0 → mini_swe_agent-1.3.0}/src/minisweagent/py.typed +0 -0
  41. {mini_swe_agent-1.2.0 → mini_swe_agent-1.3.0}/src/minisweagent/run/__init__.py +0 -0
  42. {mini_swe_agent-1.2.0 → mini_swe_agent-1.3.0}/src/minisweagent/run/extra/__init__.py +0 -0
  43. {mini_swe_agent-1.2.0 → mini_swe_agent-1.3.0}/src/minisweagent/run/extra/config.py +0 -0
  44. {mini_swe_agent-1.2.0 → mini_swe_agent-1.3.0}/src/minisweagent/run/extra/swebench_single.py +0 -0
  45. {mini_swe_agent-1.2.0 → mini_swe_agent-1.3.0}/src/minisweagent/run/extra/utils/batch_progress.py +0 -0
  46. {mini_swe_agent-1.2.0 → mini_swe_agent-1.3.0}/src/minisweagent/run/github_issue.py +0 -0
  47. {mini_swe_agent-1.2.0 → mini_swe_agent-1.3.0}/src/minisweagent/run/hello_world.py +0 -0
  48. {mini_swe_agent-1.2.0 → mini_swe_agent-1.3.0}/src/minisweagent/run/inspector.py +0 -0
  49. {mini_swe_agent-1.2.0 → mini_swe_agent-1.3.0}/src/minisweagent/run/mini_extra.py +0 -0
  50. {mini_swe_agent-1.2.0 → mini_swe_agent-1.3.0}/src/minisweagent/run/utils/__init__.py +0 -0
  51. {mini_swe_agent-1.2.0 → mini_swe_agent-1.3.0}/src/minisweagent/run/utils/save.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mini-swe-agent
3
- Version: 1.2.0
3
+ Version: 1.3.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
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mini-swe-agent
3
- Version: 1.2.0
3
+ Version: 1.3.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
@@ -8,7 +8,7 @@ This file provides:
8
8
  unless you want the static type checking.
9
9
  """
10
10
 
11
- __version__ = "1.2.0"
11
+ __version__ = "1.3.0"
12
12
 
13
13
  import os
14
14
  from pathlib import Path
@@ -23,13 +23,15 @@ agent:
23
23
  You can execute bash commands and edit files to implement the necessary changes.
24
24
 
25
25
  ## Recommended Workflow
26
- 1. Analyze the codebase by finding and reading relevant files.
27
- If present, you might want to take a look at the following files that set additional guidelines
28
- for your work: CLAUDE.md, .cursor/rules/<relevant rules>
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
26
+
27
+ 1. If present, you might want to take a look at the following files that set additional guidelines
28
+ for your work: CLAUDE.md, .github/copilot-instructions.md. Use a find command to locate all of them at once.
29
+ If files corresponding to multiple AI systems are present, it's enough to read the ones for one of them.
30
+ 2. Analyze the codebase by finding and reading relevant files.
31
+ 3. Create a script to reproduce the issue
32
+ 4. Edit the source code to resolve the issue
33
+ 5. Verify your fix works by running your script again
34
+ 6. Test edge cases to ensure your fix is robust
33
35
 
34
36
  ## Important Rules
35
37
 
@@ -140,6 +142,9 @@ agent:
140
142
  <action>
141
143
  ```
142
144
  </response_example>
145
+
146
+ Note: In rare cases, if you need to reference a similar format in your command, you might have
147
+ to proceed in two steps, first writing TRIPLEBACKTICKSBASH, then replacing them with ```bash.
143
148
  step_limit: 0.
144
149
  cost_limit: 3.
145
150
  mode: confirm
@@ -1,5 +1,7 @@
1
+ import json
1
2
  import logging
2
3
  from dataclasses import dataclass, field
4
+ from pathlib import Path
3
5
  from typing import Any
4
6
 
5
7
  import litellm
@@ -20,6 +22,7 @@ logger = logging.getLogger("litellm_model")
20
22
  class LitellmModelConfig:
21
23
  model_name: str
22
24
  model_kwargs: dict[str, Any] = field(default_factory=dict)
25
+ litellm_model_registry: Path | None = None
23
26
 
24
27
 
25
28
  class LitellmModel:
@@ -27,6 +30,8 @@ class LitellmModel:
27
30
  self.config = LitellmModelConfig(**kwargs)
28
31
  self.cost = 0.0
29
32
  self.n_calls = 0
33
+ if self.config.litellm_model_registry is not None:
34
+ litellm.utils.register_model(json.loads(self.config.litellm_model_registry.read_text()))
30
35
 
31
36
  @retry(
32
37
  stop=stop_after_attempt(10),
@@ -1,11 +1,7 @@
1
1
  #!/usr/bin/env python3
2
2
 
3
- """Run mini-SWE-agent on SWEBench instances.
4
-
5
- [not dim]
6
- More information about the usage: [bold green]https://mini-swe-agent.com/latest/usage/swebench/[/bold green]
7
- [/not dim]
8
- """
3
+ """Run mini-SWE-agent on SWE-bench instances in batch mode."""
4
+ # Read this first: https://mini-swe-agent.com/latest/usage/swebench/ (usage docs)
9
5
 
10
6
  import concurrent.futures
11
7
  import json
@@ -28,6 +24,13 @@ from minisweagent.models import get_model
28
24
  from minisweagent.run.extra.utils.batch_progress import RunBatchProgressManager
29
25
  from minisweagent.run.utils.save import save_traj
30
26
 
27
+ _HELP_TEXT = """Run mini-SWE-agent on SWEBench instances.
28
+
29
+ [not dim]
30
+ More information about the usage: [bold green]https://mini-swe-agent.com/latest/usage/swebench/[/bold green]
31
+ [/not dim]
32
+ """
33
+
31
34
  app = typer.Typer(rich_markup_mode="rich", add_completion=False)
32
35
 
33
36
  DATASET_MAPPING = {
@@ -168,7 +171,7 @@ def filter_instances(
168
171
  return instances
169
172
 
170
173
 
171
- @app.command()
174
+ @app.command(help=_HELP_TEXT)
172
175
  def main(
173
176
  subset: str = typer.Option("lite", "--subset", help="SWEBench subset to use or path to a dataset"),
174
177
  split: str = typer.Option("dev", "--split", help="Dataset split"),
@@ -183,7 +186,6 @@ def main(
183
186
  builtin_config_dir / "extra" / "swebench.yaml", "-c", "--config", help="Path to a config file"
184
187
  ),
185
188
  ) -> None:
186
- """Run mini-SWE-agent on SWEBench instances"""
187
189
  dataset_path = DATASET_MAPPING.get(subset, subset)
188
190
  print(f"Loading dataset {dataset_path}, split {split}...")
189
191
  instances = list(load_dataset(dataset_path, split=split))
@@ -1,16 +1,7 @@
1
1
  #!/usr/bin/env python3
2
2
 
3
- """Run mini-SWE-agent in your local environment.
4
-
5
- [not dim]
6
- There are two different user interfaces:
7
-
8
- [bold green]mini[/bold green] Simple REPL-style interface
9
- [bold green]mini -v[/bold green] Pager-style interface (Textual)
10
-
11
- More information about the usage: [bold green]https://mini-swe-agent.com/latest/usage/mini/[/bold green]
12
- [/not dim]
13
- """
3
+ """Run mini-SWE-agent in your local environment. This is the default executable `mini`."""
4
+ # Read this first: https://mini-swe-agent.com/latest/usage/mini/ (usage)
14
5
 
15
6
  import os
16
7
  from pathlib import Path
@@ -36,6 +27,17 @@ DEFAULT_CONFIG = Path(os.getenv("MSWEA_MINI_CONFIG_PATH", builtin_config_dir / "
36
27
  console = Console(highlight=False)
37
28
  app = typer.Typer(rich_markup_mode="rich")
38
29
  prompt_session = PromptSession(history=FileHistory(global_config_dir / "mini_task_history.txt"))
30
+ _HELP_TEXT = """Run mini-SWE-agent in your local environment.
31
+
32
+ [not dim]
33
+ There are two different user interfaces:
34
+
35
+ [bold green]mini[/bold green] Simple REPL-style interface
36
+ [bold green]mini -v[/bold green] Pager-style interface (Textual)
37
+
38
+ More information about the usage: [bold green]https://mini-swe-agent.com/latest/usage/mini/[/bold green]
39
+ [/not dim]
40
+ """
39
41
 
40
42
 
41
43
  def run_interactive(model: Model, env: Environment, agent_config: dict, task: str, output: Path | None = None) -> Any:
@@ -68,7 +70,7 @@ def run_textual(model: Model, env: Environment, agent_config: dict, task: str, o
68
70
  save_traj(agent_app.agent, output, exit_status=agent_app.exit_status, result=agent_app.result)
69
71
 
70
72
 
71
- @app.command(help=__doc__)
73
+ @app.command(help=_HELP_TEXT)
72
74
  def main(
73
75
  visual: bool = typer.Option(False, "-v", "--visual", help="Use visual (pager-style) UI (Textual)"),
74
76
  model_name: str | None = typer.Option(
File without changes
File without changes