Use mini-swe-agent with Shannon
Give mini-swe-agent the openai/ model name and Shannon's api_base in a small YAML file, and it fixes code with bash on Shannon models.
- Tested Nov 7, 2026
- OpenAI Chat Completions
- About 3 min
About mini-swe-agent
mini-swe-agent is a deliberately small coding agent from the team behind SWE-bench and SWE-agent. It has one tool, bash, keeps a plain message history and is used both from the terminal and in benchmark runs. It calls models through LiteLLM, so an OpenAI-compatible base URL runs it on Shannon models.
What you need
- A Shannon API key
- Keys & usage
- Base URL
-
https://api.shannon-ai.com/v1Endpoint:/v1/chat/completions - Every snippet below follows your choice.
Set it up
-
Install mini-swe-agent
Shellpip install mini-swe-agent -
Describe the Shannon model
Save this as
shannon.yaml. Theopenai/prefix selects LiteLLM's OpenAI-compatible route;cost_tracking: ignore_errorsstops the run failing because LiteLLM has no prices for Shannon ids.shannon.yamlmodel: model_name: "openai/Kimi-K3-uncensored-NVFP4" model_kwargs: api_base: "https://api.shannon-ai.com/v1" cost_tracking: "ignore_errors" agent: step_limit: 30 -
Run a task
-c mini.yamlkeeps the default agent config (passing any-creplaces it);-yruns commands without asking.Shellexport OPENAI_API_KEY=YOUR_API_KEY mini -c mini.yaml -c shannon.yaml -y -t "Run the tests, fix what fails, then run them again."
A real run on mini-swe-agent 2.4.6: nine bash steps, all tests passing, then the submit command.
Check that it works
Send: mini -c mini.yaml -c shannon.yaml -t "List the files here."
You should see: A bash step with ls and its output.
Models that fit mini-swe-agent
Every id below meets what mini-swe-agent needs. The first one is the default in the snippets.
| Model id | Context window | Max output | Image input |
|---|---|---|---|
Kimi-K3-uncensored-NVFP4 | 1,022,976 | 262,144 | Yes |
shannon-coder-1 | 131,072 | 65,536 | No |
Kimi-K3.1-Pro-uncensored-NVFP4 | 1,022,976 | 262,144 | Yes |
Kimi-K3-uncensored-3BIT-REAP | 225,280 | 225,280 | Yes |
shannon-3 | 196,608 | 65,536 | Yes |
Good to know
- On the first start mini asks setup questions. Answer them once, or set
MSWEA_CONFIGURED=truefor scripted runs. - The key is read by LiteLLM from
OPENAI_API_KEY; you can also putapi_keyundermodel_kwargs. - Cost shows
$0.00because LiteLLM has no prices for Shannon ids;-l 0turns the cost limit off. - In our test LiteLLM needed the
mcppackage and kept retrying withNo module named 'mcp'until it was installed (pip install mcp).
Tips
--exit-immediatelyends the run when the agent submits instead of asking for a new task.step_limitcaps how many requests one task can use; our two-bug task took nine.- Trajectories are saved to
~/.config/mini-swe-agent/last_mini_run.traj.jsonfor later review.
Troubleshooting
| Symptom | Cause | Fix |
|---|---|---|
LLM Provider NOT provided | The model name lacks openai/. | Write openai/<id>. |
| The run stops on a cost error | Cost tracking could not price the model. | Set cost_tracking: "ignore_errors" or MSWEA_COST_TRACKING=ignore_errors. |
| "Retrying … No module named 'mcp'" | A LiteLLM dependency is missing. | pip install mcp in the same environment. |
401 Unauthorized | The key is missing, mistyped or rotated. | Copy the key again from Keys & usage; it starts with sk-. |
context_length_exceeded / "prompt is too long" | The conversation is longer than the model's window. | Start a new chat, let the tool compact it, or pick a model with a larger window. |
insufficient_quota | Your balance cannot pay for the request. | Top up or change plan; the request is not retried by itself. |
Questions
Does mini-swe-agent work with Shannon?
Yes, through LiteLLM's OpenAI-compatible route: openai/<id> with api_base: https://api.shannon-ai.com/v1.
Can I use it for SWE-bench runs?
Yes, the same model block works with mini-extra swebench; every request is billed in tokens from your API credit, so mind the budget on long runs.