Other model providers
Use OpenRouter, Fireworks AI, DeepSeek, Cline, or your own OpenAI- or Anthropic-compatible service.
This page covers what works today in each engine and version-specific differences with OpenCode 2.x.
What works today
| Provider | OpenCode | Chat engine | Claude Code | Codex |
|---|---|---|---|---|
| OpenRouter | Yes | Yes | Custom endpoint, or Claude Code's own settings | Not yet |
| Fireworks AI | Yes | Yes | Custom endpoint, or Claude Code's own settings | Not yet |
| DeepSeek | Yes | Yes | Custom endpoint, or Claude Code's own settings | Not yet |
| Cline | Yes | Yes | No | No |
| Your own OpenAI-compatible address | Yes, in OpenCode's config file | Yes | No | Direct API endpoint, if it supports Responses |
| Your own Anthropic-compatible address | Not tested | No | Custom endpoint, or Claude Code's own settings | No |
"Chat engine" is Maven's built-in engine for OpenAI-compatible services. In a bot's model picker it is called OpenAI-compatible (OpenRouter / Groq) and, for now, sits in the Local group.
The Cline row lists its hosted model service. To run Cline's own coding agent, use the Cline engine.
Other engines (Antigravity, Cursor, Gemini, Qwen, Grok, Droid, Kimi, Hermes, Pi and custom agents) use their own sign-in.
Keys you export in your shell (~/.zshrc, ~/.bashrc) don't reach the
desktop app when you open it from the Dock, Finder or an app menu: it copies
only PATH from your shell. Use the steps below instead.
OpenCode
OpenCode already supports OpenRouter, Fireworks AI, DeepSeek and ClinePass. It just needs your key.
- In a terminal, run
opencode auth login. - Pick OpenRouter, Fireworks AI, DeepSeek or ClinePass and paste your key.
- In Maven, open a bot's model picker, choose OpenCode and press the refresh button (Refresh models). The provider's models appear in the list. Maven reads the model list from an ACP session on both OpenCode 1.x and 2.x, and each model's effort levels the same way: a model that has them, such as GitHub Copilot's GPT and Claude models, shows them under Reasoning in the picker.
Maven uses your normal OpenCode sign-ins and settings, so there is nothing to set up inside the app. Sign in with the same OpenCode version that your bots use (see OpenCode 2.x).
Your own OpenAI-compatible address (this includes Cline credits, at
https://api.cline.bot/api/v1):
-
Run
opencode auth login, pick Other, type a short ID such asmyrouter, and paste your key. -
Add the provider to
~/.config/opencode/opencode.json(%USERPROFILE%\.config\opencode\opencode.jsonon Windows):{ "$schema": "https://opencode.ai/config.json", "provider": { "myrouter": { "npm": "@ai-sdk/openai-compatible", "name": "My router", "options": { "baseURL": "https://router.example.com/v1" }, "models": { "model-id": { "name": "Model name" } } } } }Keep this file plain JSON, with no comments or trailing commas. Maven edits it when an OpenCode bot uses a model running on this computer.
-
Refresh OpenCode's models in Maven.
OpenCode's provider guide has more examples. OpenCode can also use Anthropic-compatible addresses, but we haven't tested that with Maven.
On a self-hosted server that you start from a terminal, OpenCode also reads
provider keys exported in that terminal, such as OPENROUTER_API_KEY,
FIREWORKS_API_KEY or TOGETHER_API_KEY. Keys exported
this way reach every engine on that server, and any bot that can run commands
can read them. On OpenCode 2.x this also has a side effect; see below.
CLINE_API_KEY is scoped to the Cline and OpenCode engines. For ClinePass in
OpenCode, opencode auth login also keeps its sign-in in OpenCode's own settings.
Chat engine
The chat engine uses one provider at a time.
-
Open Settings → Connections → Model providers.
-
Paste your key into OpenAI-compatible API key and set OpenAI-compatible base URL:
Provider Base URL OpenRouter https://openrouter.ai/api/v1(the default)Fireworks AI https://api.fireworks.ai/inference/v1DeepSeek https://api.deepseek.comCline https://api.cline.bot/api/v1Anything else The OpenAI-compatible address your provider gives you, usually ending in /v1 -
Press Test. Then pick OpenAI-compatible (OpenRouter / Groq) in a bot's model picker and choose a model.
On a server you can set OPENAI_COMPAT_API_KEY and OPENAI_COMPAT_URL
instead.
To use more than one provider at once, add extra openai-compat engines to
config.json (see Bring your own engine).
Give each one its own key. An engine without a key uses the key from
Connections and sends it to that engine's address.
Free OpenRouter models
A new OpenRouter account with no credit can only use free models. Paid models stop with "This model needs OpenRouter credit".
- Picking one: the model picker marks free models (free). When the key belongs to a free account, free models that can use tools come first and one of them is the default. Pressing Test on the key says so. A model you chose yourself is never changed.
- Privacy setting: if OpenRouter's privacy settings block free models, turns stop with "OpenRouter's privacy settings block this free model". Allow free model endpoints at openrouter.ai/settings/privacy, or pick another model.
- Daily limit: OpenRouter limits how many requests free models take each day, and every step of a bot's turn counts as one. When the limit is used up, wait for it to reset or add credit at openrouter.ai/credits to raise it.
Cline engine
- Install the standalone CLI with
npm install -g cline. - Run
cline authin a terminal to choose its provider, model and account. - In Maven's bot model picker, select Cline and Cline default (configured).
Maven uses Cline's selected provider and saved credentials. Change the
provider or model through cline auth; the configured model is pinned before
each prompt. An unconfigured account remains unavailable. Set CLI can
select a wrapper with --config or --data-dir for a separate Cline home.
Cline receives the bot's scoped MCP tools and uses Maven's approval broker, including Full Access. Native Cline tool selection is not supported.
Claude Code
The Anthropic API key in Connections is for Anthropic only.
To run Claude bots on DeepSeek, GLM or another host that speaks Claude Code's API, add a custom endpoint in Settings → Engines, in the Claude card:
- Add endpoint takes a name, the host's base URL, its API key and,
optionally, a model. Leave Model empty and Maven reads the host's
model list at
/v1/models; type the model id (such asdeepseek-chat) when the host doesn't list its models. - Each endpoint is its own engine with its own directory, so a bot chooses
it like any other AI. It never reads or writes this computer's
~/.claude, and the Claude Code on this computer keeps its own sign-in. - Each bot can choose a different model from the endpoint's catalog.
- Another gateway must support streaming Messages (
POST /v1/messages) with tool use. Enter its root URL without/v1/messages, such ashttps://gateway.example.com. - The token is saved in Maven's own
config.jsonand sent only to the base URL you enter. Removing an endpoint removes only that entry.
You can also point Claude Code itself at OpenRouter, Fireworks AI or DeepSeek, and your Claude bots follow it:
- Put
ANTHROPIC_BASE_URLand your key in theenvblock of~/.claude/settings.json. Fireworks' FireConnect does this for you. OpenRouter's and DeepSeek's guides use shell exports, which the desktop app doesn't see, so copy those lines into theenvblock. - If you also set
ANTHROPIC_MODELthere, that model appears under Use a local model in the Claude model picker; pick it. So doANTHROPIC_CUSTOM_MODEL_OPTIONand eachANTHROPIC_DEFAULT_*_MODELthat isn't a Claude model. Otherwise bots ask for Claude models, which OpenRouter bills as Claude and DeepSeek replaces with its own model. FireConnect's model list doesn't show up in Maven, so addANTHROPIC_MODELyourself. A bot runs only the model you pick:ANTHROPIC_DEFAULT_*_MODELandCLAUDE_CODE_SUBAGENT_MODELaren't carried over. - It applies only while no Anthropic API key is saved in Connections.
- It changes Claude Code everywhere on this computer, not just in Maven.
- On a server, use the
envblock too, not exports in the terminal that starts the server. Otherwise an Anthropic key saved in Connections can be sent to that provider.
Codex
Codex bots can also run on an API key instead of a ChatGPT sign-in:
- Open Settings → Engines and expand the Codex/ChatGPT card.
- Under Codex direct API, choose Add endpoint.
- Leave the base URL empty for OpenAI, or enter another gateway's URL, such
as
https://gateway.example.com/v1. - Enter a name and API key. Model is optional; then save.
- Choose the new engine and a model in a bot's settings.
- Usage is billed by the provider behind the URL. Saving an endpoint doesn't start a sign-in or replace an existing account.
- Each endpoint has its own Codex home in Maven's data directory. The
key is saved in
config.jsonand is never shown in the app or passed in command arguments. Changing the URL asks for the key again. - A gateway must support streaming Responses (
POST /v1/responses) with tool calls. A gateway that only offers Chat Completions works with the chat engine instead. - Each bot chooses its model. OpenAI uses the standard catalog; another
gateway's list is read from
/modelsunder its base URL, unless you typed a model. - Remove an endpoint after moving its bots and the default model off it.
When an endpoint won't save
Saving a custom gateway without a model reads its model list and says whether the network, the API key, the HTTP response or an empty model list failed. Saving with a typed model, or with the official Anthropic or OpenAI URL, doesn't check the key; a wrong key shows up on the bot's first turn. Refresh models reads a gateway's list again. The key is sent to read the list only over HTTPS or to this computer. Check that:
- The URL is reachable from the computer or container running Maven,
not just from the one showing the app. Inside a container,
localhostmeans the container itself. - Codex endpoints use HTTPS. Plain HTTP is accepted only on
localhostor127.0.0.1. - The gateway serves the right protocol for the agent and lists models for your key.
Ollama's context window
Below 23 GB of graphics memory, Ollama gives a model a 4,096-token context window unless told otherwise, and it drops whatever doesn't fit without an error. That is less than a bot's instructions and tools, so Maven sets a larger window the first time a bot uses a model.
You'll see the result in ollama list as a second name, such as
qwen3.5:4b-maven-64k. It uses the same weights, so it takes no extra disk space.
Removing it is safe: Maven makes it again when it needs it. To free the disk
space a model uses, remove both names.
The window is 16K, 32K or 64K tokens, depending on your memory and the model's size.
To choose your own, set num_ctx in a Modelfile or start Ollama with
OLLAMA_CONTEXT_LENGTH. A num_ctx in a Modelfile is always left alone. With
OLLAMA_CONTEXT_LENGTH, keep the model loaded before the first turn, because
Maven can only see that setting on a running model.
Current limits
There is no shared provider list that configures every engine. Use each engine's setup above, and do not assume a key saved for one engine changes another engine's sign-in or model list.
OpenCode 2.x
Maven installs and tests OpenCode 2.x (the @opencode/cli npm package).
The older 1.x line shipped as opencode-ai; both packages install a command
called opencode.
- If you installed OpenCode from Maven's Settings, bots use that copy.
Otherwise they use the first
opencodeon your PATH, which is 2.x if you installed@opencode/cli. Settings → Engines shows the version in use. - Differences from 1.x:
- Some 2.x releases have reported missing configured providers in new ACP sessions (upstream report #50236). If a provider is missing, check the installed version and upstream updates before changing your credentials.
- When a provider key is set in the environment (for example
OPENROUTER_API_KEYon a server), 2.x hides OpenCode's free models and makes a paid model the default. - 2.x keeps its sign-ins apart from 1.x, so a sign-in made with one may not
be seen by the other. Run
opencode auth loginwith the version your bots use.