Docs
mini-SWE-agent
mini has no base-URL environment variable and nothing to click. The endpoint is four lines of YAML that mini hands straight to litellm — plus a price registry, because mini's per-run budget cannot count tokens it has no rates for.
mini-SWE-agent has no base-URL environment variable — the endpoint goes under model.model_kwargs.api_base in a YAML config, which mini hands straight to litellm.completion.
# mini has no base-URL environment variable and no settings UI. The endpoint
# goes in an agent config file, under model.model_kwargs — which mini's docs
# describe as "directly passed to litellm.completion".
model:
model_name: "openai/claude-sonnet-5"
model_kwargs:
custom_llm_provider: "openai"
api_base: "https://api.kunavo.com/v1" # keep the /v1
litellm_model_registry: "kunavo-registry.json" # see "Cost tracking" below
# The key does not live in this file. With custom_llm_provider: "openai",
# litellm reads OPENAI_API_KEY, and mini documents two ways to set it:
#
# export OPENAI_API_KEY=sk-kn-... # environment, wins over .env
# mini-extra config set OPENAI_API_KEY sk-kn-... # mini's own .env
#
# Then run it: mini -c kunavo.yaml
# Or make it the default: mini-extra config set MSWEA_MINI_CONFIG_PATH kunavo.yaml/v1 — and know that mini does not state this in a sentence, so here is what does settle it. mini never reads the value: its docs say model_kwargs is “directly passed to litellm.completion”, showing the call as litellm.completion(model=model_name, messages=messages, **model_kwargs). So the rule is litellm's, and the one concrete api_base mini ever prints carries the suffix — http://localhost:8000/v1, in its vLLM example — while litellm's own OpenAI-compatible page tells you to “make sure your api_base has the /v1postfix” when a request comes back Not Found. Kilo Code and Aider take the same form; the Anthropic-style clients and goose take the bare origin instead.openai/ prefix on the model name and custom_llm_provider do the same job, and mini's own example uses only the second — either is fine, both together is fine, but whichever you use has to match litellm_provider in the price registry. The prefix names a wire protocol, not a vendor: a Claude id under openai/ is the intended combination, because the id is resolved at the endpoint rather than inside litellm.openai/ path negotiates native tool calling — mini's v2 default — against Kunavo's /v1/chat/completions, and whether that surface acts on the cache_control markers mini attaches on its own to Claude-named ids. The curl below is the part you can settle in ten seconds; the rest is between you and a short first run.Step by step
- Create a key at
/app/keysand copy it — it is shown once. - Install and run once so the paths exist:
pip install mini-swe-agent, thenmini. The first run prints where its.envand agent config live, and offersmini-extra config setup. - Put the key where litellm will look for it:
export OPENAI_API_KEY=sk-kn-..., or persist it withmini-extra config set OPENAI_API_KEY sk-kn-.... mini notes that “Environment variables take precedence over variables set in the.envfile”, which is the usual reason a key you just changed appears not to have changed. - Save the YAML above as
kunavo.yamlbeside your other agent configs, and add the price registry from the section below — without it the run stops on a cost-calculation error rather than on a bad answer. - Start it with
mini -c kunavo.yaml, ormini -c kunavo.yaml -m openai/claude-haiku-4-5to override the id for one run. mini opens inconfirmmode, where you approve each command — a good default for a first run against a new endpoint. - Give it a task that actually runs a command, not a greeting. mini's v2 default is native tool calling and its shipped prompt insists that “Every response needs to use the 'bash' tool at least once to execute commands” — so one real tool round-trip is what tells you the pairing works. If tool calls come back empty or malformed, mini still ships the older text-parsing path:
mini -c mini_textbased.yaml, ormodel_class: litellm_textbasedin your own file.
Checked against mini-SWE-agent's local models guide on September 21, 2026. Third-party settings move; if a field name here no longer matches what you see, that page is the authority, not this one.
Verify before you debug the client
One request settles whether a failure is the endpoint, the key, or the configuration file. If this returns JSON, the same base URL and key work in mini-SWE-agent.
# Settles whether a failure is the endpoint, the key, or the client.
curl -sS https://api.kunavo.com/v1/models \
-H "Authorization: Bearer sk-kn-..."Which model id to put in the field
Every text model is reachable as a model id — the live list is GET /v1/models, and the catalog with prices is on the models page. Rates are USD per 1M tokens, input / output.
| Model id | Kunavo in / out | Where it fits in mini-SWE-agent |
|---|---|---|
claude-sonnet-5 | $2.00 / $10.00 | the default id for a working session — mini re-sends context on every step, so this is where the bill lands |
claude-opus-5 | $2.00 / $10.00 | a run where a wrong plan is expensive; pair it with a lower cost_limit, not a higher one |
claude-haiku-4-5 | $0.40 / $2.00 | batch runs over many tasks, and any loop you leave in yolo mode |
gpt-5-6-sol | $2.00 / $12.00 | a second family behind the same api_base — change model_name, add one registry entry |
Cost tracking, which is not optional here
mini's shipped mini.yaml carries cost_limit: 3. — a per-run ceiling in dollars — and that ceiling is enforced by litellm's cost calculator, which prices a run by looking the model id up in its registry. Kunavo's ids are not in that registry, so the first thing most people see is not a bad answer but an error: mini's own troubleshooting page shows it as Exception: This model isn't mapped yet. model=…, custom_llm_provider=….
There are two ways out and they are not equivalent. The global switch MSWEA_COST_TRACKING="ignore_errors" (or cost_tracking: "ignore_errors" in the file) removes the guard rather than repairing it, and mini labels it “CAREFUL: This can lead to unmanaged spending!” The other way is to tell litellm the rates, which is what litellm_model_registry in the setup block points at. The rates below are this site's live catalog rates, converted to litellm's per-token format:
{
"claude-sonnet-5": {
"input_cost_per_token": 0.000002,
"output_cost_per_token": 0.00001,
"litellm_provider": "openai",
"mode": "chat"
},
"claude-opus-5": {
"input_cost_per_token": 0.000002,
"output_cost_per_token": 0.00001,
"litellm_provider": "openai",
"mode": "chat"
},
"claude-haiku-4-5": {
"input_cost_per_token": 0.0000004,
"output_cost_per_token": 0.000002,
"litellm_provider": "openai",
"mode": "chat"
}
}- Model names are matched exactly and case-sensitively, and mini's example keys the entry on the name without its provider prefix — so
claude-sonnet-5here, even though the config saysopenai/claude-sonnet-5. litellm_providerhas to agree with the prefix and withcustom_llm_provider. mini's warning is explicit: “If you use thecustom_llm_provideror have a provider prefixed to the model name (e.g.,openai/…), then this must also matchlitellm_providerin the config!”- The path can also come from
LITELLM_MODEL_REGISTRY_PATHinstead of the config key — useful for the batch runners, e.g.LITELLM_MODEL_REGISTRY_PATH=kunavo-registry.json mini-extra swebench … - These rates are a budget input, not a bill. What you are actually charged is what your Kunavo balance records; re-copy them if the catalog moves, or read them off
GET /v1/models.
FAQ
How do I point mini-SWE-agent at a custom API endpoint?
Through a config file, not an environment variable — mini has no base-URL variable at all. In an agent config file, set model.model_name to your id (optionally prefixed openai/), then under model.model_kwargs set custom_llm_provider: "openai" and api_base to the endpoint's base URL. mini's documentation explains why that works: model_kwargs "is directly passed to litellm.completion". Select the file with `mini -c kunavo.yaml`, or make it the default with MSWEA_MINI_CONFIG_PATH. For Kunavo the base URL is https://api.kunavo.com/v1.
Where does mini-SWE-agent read the API key from?
From whichever litellm key variable matches the provider you selected. With custom_llm_provider: "openai" that is OPENAI_API_KEY, which you can export in the shell or persist with `mini-extra config set OPENAI_API_KEY <key>` — that writes mini's .env, and mini notes that environment variables take precedence over what is in the file. The key is not a field in the agent config. If you are following an older tutorial, note that the v2 migration guide lists MSWEA_MODEL_API_KEY as "No longer used to override API keys".
Does the mini-SWE-agent api_base need /v1 at the end?
Yes for an OpenAI-compatible endpoint — for example https://api.kunavo.com/v1 — though mini states it by example rather than by rule. mini passes model_kwargs straight through to litellm.completion, so the convention is litellm's, and the only concrete api_base mini's docs print is http://localhost:8000/v1 in its vLLM example. litellm's own OpenAI-compatible page is the sentence that settles it: if a request comes back Not Found, make sure api_base has the /v1 postfix. A missing /v1 therefore shows up as a 404 rather than an authentication error.
Why does mini-SWE-agent fail with "This model isn't mapped yet"?
Because litellm cannot price the model id, and mini's per-run cost_limit — 3. dollars in the shipped mini.yaml — is enforced through litellm's cost calculator. The fix mini recommends is a model registry: a JSON file in litellm's model-price format, keyed on the model name without its provider prefix, with litellm_provider matching whatever you set as custom_llm_provider or as the name prefix. Point litellm_model_registry in the config, or LITELLM_MODEL_REGISTRY_PATH in the environment, at that file. Setting MSWEA_COST_TRACKING="ignore_errors" also silences it, but removes the spend guard instead of repairing it.
Can mini-SWE-agent use Claude models through an OpenAI-compatible endpoint?
Yes. The openai/ prefix and custom_llm_provider name a wire protocol, not a vendor: litellm sends an OpenAI-shaped chat completion to the api_base you configured and passes the model id through, so a Claude id resolves at that endpoint rather than in litellm's provider table. One mini-specific side effect is worth knowing: mini adds cache control settings by itself when the resolved model name contains "anthropic", "claude", "sonnet" or "opus", which a prefixed openai/claude-… id does.
Has Kunavo tested mini-SWE-agent against its endpoint?
No. What was checked, on September 21 2026, is mini's own documentation — the keys, their order and the api_base form are quoted from it. Kunavo has not run a mini session against its endpoint and makes no claim about streaming, tool round-trips or cost reporting in this client. Two things are specifically open: whether litellm's openai/ path negotiates native tool calling — mini's default since v2.0 — against a chat-completions endpoint, and whether that endpoint acts on the cache_control markers mini attaches to Claude-named ids. The curl on this page settles the endpoint and the key; a short first run in confirm mode settles the rest.