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.

kunavo.yaml · mini -c kunavo.yaml
# 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
Keep the /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.
The 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.
This configuration was read off mini's own documentation on the date below. Kunavo has not run mini-SWE-agent against its endpoint — no session, no streamed turn, no tool round-trip, and the same is true of every other client in this family. A published setup page is not a compatibility test. Two things are specifically unsettled: whether litellm's 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.
Kunavo serves no embedding, text-to-speech or speech-to-text model, so this endpoint answers chat completions and nothing else. mini only ever asks for one — it has a single tool, bash — but if the surrounding scripts index a repository or transcribe anything, those calls keep whatever provider key they already have.

Step by step

  1. Create a key at /app/keys and copy it — it is shown once.
  2. Install and run once so the paths exist: pip install mini-swe-agent, then mini. The first run prints where its .env and agent config live, and offers mini-extra config setup.
  3. Put the key where litellm will look for it: export OPENAI_API_KEY=sk-kn-..., or persist it with mini-extra config set OPENAI_API_KEY sk-kn-.... mini notes that “Environment variables take precedence over variables set in the .env file”, which is the usual reason a key you just changed appears not to have changed.
  4. Save the YAML above as kunavo.yaml beside 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.
  5. Start it with mini -c kunavo.yaml, or mini -c kunavo.yaml -m openai/claude-haiku-4-5 to override the id for one run. mini opens in confirm mode, where you approve each command — a good default for a first run against a new endpoint.
  6. 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, or model_class: litellm_textbased in 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.

This is the short version. The full walkthrough — model choice, what a real session costs, and the failure modes — is in mini-SWE-agent vs Claude Code.

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 idKunavo in / outWhere it fits in mini-SWE-agent
claude-sonnet-5$2.00 / $10.00the 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.00a 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.00batch runs over many tasks, and any loop you leave in yolo mode
gpt-5-6-sol$2.00 / $12.00a second family behind the same api_base — change model_name, add one registry entry
Billing is per token from a prepaid balance with no monthly fee — see billing. On repeated context — which is most of what an editor or a chat client sends — prompt caching moves the bill more than the model choice does.

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:

kunavo-registry.json
{
  "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"
  }
}
  1. 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-5 here, even though the config says openai/claude-sonnet-5.
  2. litellm_provider has to agree with the prefix and with custom_llm_provider. mini's warning is explicit: “If you use the custom_llm_provider or have a provider prefixed to the model name (e.g., openai/…), then this must also match litellm_provider in the config!”
  3. The path can also come from LITELLM_MODEL_REGISTRY_PATH instead of the config key — useful for the batch runners, e.g. LITELLM_MODEL_REGISTRY_PATH=kunavo-registry.json mini-extra swebench …
  4. 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.