Docs
twinny
twinny does not ask for a base URL. It asks for a protocol, a hostname, a port and an API path, and for chat that path is the API base — so https and api.kunavo.com and /v1, with the port left blank.
twinny has no base-URL field — Add provider → OpenAI-compatible server, then Protocol https, Hostname api.kunavo.com, Port blank and API path /v1, and its chat panel is on your key.
Label Kunavo
Type Chat
Provider OpenAI-compatible server
Hostname api.kunavo.com
Port (leave blank — "Blank means the protocol's default")
Protocol https
API path /v1
Model name claude-sonnet-5
FIM template (Autocomplete only — not part of a Chat provider)
API key sk-kn-.../v1, not /v1/chat/completions. twinny's provider table settles it in one sentence — "For chat the path is the API base; twinny appends /chat/completions" — so a path that already carries the route produces /v1/chat/completions/chat/completions and a 404. There is no single base-URL field to get wrong here, but the same table offers a shortcut: paste https://api.kunavo.com/v1 into Hostname and it is "split into protocol, host, port and path".Step by step
- Create a key at
/app/keysand copy it — it is shown once. - Open the Providers tab from the robot icon at the top of the sidebar, or run Manage twinny providers from the command palette.
- Add provider → under On your machine choose
OpenAI-compatible server, the catch-all preset. It arrives pointing atlocalhost:8080. - Set Protocol to
https, Hostname toapi.kunavo.com, clear Port, and set API path to/v1. Leave Type onChat. - Paste the key into API key — twinny sends it as
Authorization: Bearer. Then set Model name, either typed or through Choose from the server's models, since Kunavo answersGET /v1/models. - Press Test provider, then Use this provider to make it the active chat provider. Use Copy to clone the row for a second model rather than retyping the four endpoint fields.
Checked against twinny's Other local servers page 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 twinny.
# 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 twinny |
|---|---|---|
claude-sonnet-5 | $2.00 / $10.00 | the chat panel, inline edit and code review — the working default |
claude-haiku-4-5 | $0.40 / $2.00 | commit messages, terminal helpers and code actions, where volume dominates |
gemini-3-8-flash | $0.525 / $2.625 | long files pasted into chat, on the same key |
gpt-5-6-terra | $0.70 / $4.20 | a second opinion from another family when a review reads thin |
Chat fits. Autocomplete and the index do not.
twinny splits work across three provider types, and each one is configured separately — so "twinny works with Kunavo" is only true of one of them. The other two are not a configuration you have yet to find; the routes they need are not routes Kunavo answers.
| Provider type | What twinny sends | Against api.kunavo.com |
|---|---|---|
| Chat | OpenAI-format POST to <API path>/chat/completions | Fits — this is the page above. |
| Autocomplete (FIM) | a raw fill-in-the-middle prompt to /v1/completions | No. Kunavo has no /v1/completions route, and no base or code model to drive it. |
| Embeddings | a request to /v1/embeddings | No. Kunavo serves no embedding model, so the workspace index cannot be built here. |
Neither gap blocks the setup, because twinny keeps one active provider per type and they are independent of each other. Its own hosted-API page calls the split "a common setup": a small local base model for completion alongside a hosted model for chat, review and edits. The workspace index is the same shape — the embedding step is not served here, and twinny's documentation points it at a local model such as nomic-embed-text on Ollama instead. Vectors from different models do not mix, so changing that model means a rebuild of the index rather than an update.
FAQ
How do I point twinny at a custom API endpoint?
Open the Providers tab from the robot icon in the twinny sidebar, choose Add provider, and under "On your machine" pick the catch-all preset named "OpenAI-compatible server". twinny's documentation states that the provider form takes any hostname, port, protocol and path, so you set Protocol to https, Hostname to your endpoint's host, leave Port blank for the protocol's default, and set API path to the API base. Paste your key into the API key field, which twinny sends as an Authorization: Bearer header, then press Test provider — it sends a small request for that provider's job and reports either success or the error the server returned, together with the URL it called.
Does twinny's API path need /v1 or /v1/chat/completions?
For a chat provider it is /v1. twinny's provider table says "For chat the path is the API base; twinny appends /chat/completions", so the extension builds the full route itself and a path that already contains it resolves to /v1/chat/completions/chat/completions, which comes back as a 404 rather than an authentication error. Autocomplete and embeddings are the opposite convention on the same form: there the API path is the full route, /v1/completions and /v1/embeddings in the generic preset's defaults.
Where does the twinny API key go, and is there a base URL field?
The key goes in the provider's API key field and is sent as Authorization: Bearer; twinny's documentation says keys are stored with the provider in VS Code's storage and are redacted from twinny's logs. There is no single base URL field — the endpoint is split across Protocol, Hostname, Port and API path. The shortcut is that pasting a whole URL into Hostname works: the docs say a pasted URL such as https://my-box:8080/v1 is split into protocol, host, port and path, so pasting https://api.kunavo.com/v1 fills three fields at once.
Can twinny's autocomplete run through a hosted gateway like Kunavo?
No, and the reason is a missing route rather than a setting. twinny's generic OpenAI-compatible preset posts a raw fill-in-the-middle prompt to a /v1/completions-style route, and api.kunavo.com does not serve /v1/completions; the catalog also carries no base or code model trained for fill-in-the-middle. Keep autocomplete on a local server — twinny's FAQ suggests qwen2.5-coder:1.5b-base on Ollama — and use the hosted provider for chat. twinny calls that mix a common setup, and because the active provider is chosen per type, it needs no switching.
Can Kunavo power twinny's workspace index?
No. The workspace index embeds your files with an Embeddings provider, and Kunavo serves no embedding model — no model in its catalog carries that endpoint, so the request is rejected rather than answered. twinny's own documentation recommends nomic-embed-text on Ollama for this job, which runs on your machine and is independent of whichever provider serves chat. This is a split configuration, not a blocked one; note that rebuilding is required if you later change the embedding model, since vectors from different models do not mix.
Why not use twinny's OpenAI or Anthropic preset with a Kunavo key?
Because those presets do not send the request where you think. twinny's hosted APIs page says chat with a hosted API goes through the vendor's SDK to its fixed endpoint, so the hostname, port and path fields are hidden for it — the key you paste would travel to that vendor's own endpoint, not to your gateway. The generic "OpenAI-compatible server" preset is the one that keeps the endpoint fields editable, which is why it is the preset named above. Model ids are passed through to whatever endpoint you configured, so a Claude id on an OpenAI-compatible provider is the intended combination, not a mismatch.
Has Kunavo tested twinny?
No. Kunavo has run no runtime test of this client; the configuration above is read off twinny's own documentation, checked on September 21, 2026, and off Kunavo's route table. A published setup page is not a test. The check that costs you nothing is twinny's Test provider button, which reports the URL it called along with whatever the server answered, and one curl against /v1/models settles whether a failure belongs to the endpoint, the key or the form.