Coding Agents
Use deeprelay as the model provider for Cline, Kilo Code, Roo Code, OpenCode, Aider, Continue, Zed and Cursor: base URL, key, model ID, and the gotchas per agent.
deeprelay speaks the OpenAI Chat Completions API, so any coding agent that lets you set a custom OpenAI-compatible base URL can use it as its model provider. This page gives the setup for Cline, Kilo Code, Roo Code, OpenCode, Aider, Continue, Zed and Cursor. Claude Code has its own guide: Claude Code.
Every agent needs the same three things:
| Base URL | https://api.deeprelay.ai/v1 |
| API key | a deeprelay_live_… key (deeprelay login, or mint one in the dashboard) |
| Model ID | a chat model from GET /v1/models, e.g. deeprelay/deepseek-v4-pro |
The examples below read the key from the DEEPRELAY_API_KEY environment
variable. Don't paste a real key into a config file you might commit.
export DEEPRELAY_API_KEY=deeprelay_live_...
Claude Code: deeprelay serves the Anthropic Messages API. Run deeprelay setup claude-code; the full guide is in claude-code.md. Codex CLI speaks the OpenAI Responses API, which deeprelay does not serve yet.
Picking a model
Coding agents read files, run commands and edit code through tool calls. Use a model that supports them. Some agents (Roo Code, Zed's agent, Continue's Agent mode) won't work at all without tool calling. Others fall back to worse prompt-based editing.
| Model | Context | Why pick it |
|---|---|---|
deeprelay/deepseek-v4-pro | 1M | Recommended default. A strong coding model with a long context window, at a moderate price. |
deeprelay/deepseek-v4-flash | 1M | Cheaper and faster. Good for high-volume agent loops and quick edits. |
deeprelay/glm-5.2 | 200K | Supports every tool_choice mode (see Troubleshooting). |
Only deeprelay/deepseek-v4-pro is covered by the flat subscription tier.
As of 2026-09-29 the other two bill pay-as-you-go at list rates:
deeprelay/deepseek-v4-flash (the 0731 checkpoint) and deeprelay/glm-5.2
came off the plan, superseded by deeprelay/deepseek-v4.1-flash and
deeprelay/glm-5.3 — both of which ARE covered, and are the cheaper pick if
you want your agent loop drawing on the plan rather than on credit.
Never take this table's word for it: coverage is live, so a model carries
"plan_covered": true in GET /v1/models only while it is actually on the
plan. Plan coverage explains what that
means and how to check a model before you call it.
Tool support is per model, and the catalog is live, so list the models that
support tools right now before you commit to one:
curl -s https://api.deeprelay.ai/v1/models \
-H "Authorization: Bearer $DEEPRELAY_API_KEY" \
| jq -r '.data[] | select(.supported_parameters | index("tools")) | "\(.id)\t\(.context_length)"'
The catalog publishes each model's context window (context_length) but no
separate output-token cap. The configs below use 32768 as the output limit.
It's a conservative value the recommended models accept, and you can raise it.
Use the full deeprelay/… ID in configs. Some bare aliases (e.g.
deepseek-v4-pro) also resolve, but the full ID is the one GET /v1/models
lists.
Two limits apply to every agent below. The OpenAI compatibility table has the full list.
- No image input. No model in the catalog accepts images, and a request with an
image_urlcontent part is rejected with400 unsupported_content_part. Turn off any "supports images" option and don't attach screenshots. - No
response_format. JSON mode is rejected with400 unsupported_parameter. None of the agents here send it in normal chat or agent use.
Cline
In the Cline panel, open Settings and set:
| Field | Value |
|---|---|
| API Provider | OpenAI Compatible |
| Base URL | https://api.deeprelay.ai/v1 |
| API Key | your deeprelay_live_… key |
| Model ID | deeprelay/deepseek-v4-pro |
Under Model Configuration:
- Set Context Window Size to the model's
context_lengthfromGET /v1/models(1048576for the DeepSeek V4 models). Cline uses it to decide when to condense the conversation. - Leave Supports Images unchecked.
- Input / Output Price are optional and only feed Cline's local cost display. deeprelay bills from its own meter either way.
Cline stores the key in VS Code's secret storage. It has no setting that reads an environment variable.
Kilo Code
From the UI: open Settings (gear icon), then the Providers tab, and click Custom provider at the bottom:
| Field | Value |
|---|---|
| Provider ID | deeprelay |
| Display name | deeprelay |
| Provider API | OpenAI Compatible |
| Base URL | https://api.deeprelay.ai/v1 |
| API key | your deeprelay_live_… key |
| Models | pick from the auto-fetched list. Kilo reads GET /v1/models. |
From the config file: put this in your global config under
~/.config/kilo/ (kilo.jsonc):
{
"$schema": "https://app.kilo.ai/config.json",
"model": "deeprelay/deeprelay/deepseek-v4-pro",
"provider": {
"deeprelay": {
"options": {
"apiKey": "{env:DEEPRELAY_API_KEY}",
"baseURL": "https://api.deeprelay.ai/v1"
},
"models": {
"deeprelay/deepseek-v4-pro": {
"name": "DeepSeek V4 Pro (deeprelay)",
"tool_call": true,
"limit": { "context": 1048576, "output": 32768 }
}
}
}
}
}
Gotchas:
- The model selector is
. deeprelay model IDs already contain a slash, so the selector reads/ deeprelay/deeprelay/deepseek-v4-pro. That is expected. - Kilo resolves
{env:…}only in trusted config (the global~/.config/kiloconfig,KILO_CONFIG/KILO_CONFIG_CONTENT, or managed config). A project-level config can't read your environment. Keep the provider block global. - Set
"tool_call": true, or Kilo won't offer tools to the model.
Roo Code
In the Roo Code panel, open Settings → Providers and set:
| Field | Value |
|---|---|
| API Provider | OpenAI Compatible |
| Base URL | https://api.deeprelay.ai/v1 |
| API Key | your deeprelay_live_… key |
| Model | deeprelay/deepseek-v4-pro |
In the model configuration, set Context Window from GET /v1/models and
leave Image Support off.
Roo Code uses native tool calling only, with no XML fallback. A model
without tools in its supported_parameters can't drive Roo Code at all.
Pick one from the table above.
OpenCode
Add a custom provider to opencode.json in your project root, or to
~/.config/opencode/opencode.json for every project:
{
"$schema": "https://opencode.ai/config.json",
"provider": {
"deeprelay": {
"npm": "@ai-sdk/openai-compatible",
"name": "deeprelay",
"options": {
"baseURL": "https://api.deeprelay.ai/v1",
"apiKey": "{env:DEEPRELAY_API_KEY}"
},
"models": {
"deeprelay/deepseek-v4-pro": {
"name": "DeepSeek V4 Pro",
"limit": { "context": 1048576, "output": 32768 }
},
"deeprelay/deepseek-v4-flash": {
"name": "DeepSeek V4 Flash",
"limit": { "context": 1048576, "output": 32768 }
}
}
}
}
}
Start opencode and run /models to pick one. The keys of the models map
must be exact deeprelay model IDs, because OpenCode sends them unchanged.
If you'd rather not keep the key in an environment variable, run /connect,
choose Other, enter the provider ID deeprelay, and paste the key. Then
leave apiKey out of the config.
Aider
Aider reaches OpenAI-compatible APIs through two environment variables and an
openai/ prefix on the model name:
export OPENAI_API_BASE=https://api.deeprelay.ai/v1
export OPENAI_API_KEY=$DEEPRELAY_API_KEY
aider --model openai/deeprelay/deepseek-v4-pro
The openai/ prefix tells Aider which client to use and is stripped before
the request. deeprelay receives deeprelay/deepseek-v4-pro. Leave the prefix
out and Aider won't route to your base URL.
For a one-shot, non-interactive edit:
aider --model openai/deeprelay/deepseek-v4-flash \
--message "Fix the bug in add() in calc.py" calc.py
Gotchas:
- Aider warns about an unknown context window and cost for deeprelay models. The warning is harmless because Aider doesn't enforce the limit. Silence it with
--no-show-model-warnings, or describe the model in.aider.model.metadata.json(home directory or repo root). The limits come fromGET /v1/models, and the costs are per token, so cents per 1M ÷ 100,000,000:
{
"openai/deeprelay/deepseek-v4-pro": {
"max_input_tokens": 1048576,
"max_output_tokens": 32768,
"input_cost_per_token": 0.00000057,
"output_cost_per_token": 0.00000196,
"litellm_provider": "openai",
"mode": "chat"
}
}
Check pricing in GET /v1/models for current prices. The numbers above
are an example and only change Aider's local cost display.
OPENAI_API_KEY/OPENAI_API_BASEapply to everyopenai/model Aider runs in that shell. Scope them to the shell where you run Aider, or putopenai-api-base/openai-api-keyin a project.aider.conf.ymlthat you don't commit.- DeepSeek V4 models stream their reasoning before the answer. Aider shows it in a separate block. That is expected.
Continue
Add a model to ~/.continue/config.yaml (Windows:
%USERPROFILE%\.continue\config.yaml) with the openai provider and an
apiBase override:
name: My Config
version: 0.0.1
schema: v1
models:
- name: DeepSeek V4 Pro (deeprelay)
provider: openai
model: deeprelay/deepseek-v4-pro
apiBase: https://api.deeprelay.ai/v1
apiKey: ${{ secrets.DEEPRELAY_API_KEY }}
roles:
- chat
- edit
- apply
capabilities:
- tool_use
Then put the key in ~/.continue/.env:
DEEPRELAY_API_KEY=deeprelay_live_...
Gotchas:
- The IDE extension can't see your shell's environment.
export DEEPRELAY_API_KEY=…in a terminal does nothing for Continue inside VS Code or JetBrains. Continue resolves${{ secrets.… }}from a workspace.env,, then/.continue/.env ~/.continue/.env, and only then the process environment. Use~/.continue/.envand keep it out of version control. - Declare
tool_use. Continue doesn't know deeprelay's model IDs, so it won't assume tool support. Withoutcapabilities: [tool_use]the model can't be used in Agent mode. - Don't add
image_input, and don't give a deeprelay chat model theautocompleterole. Autocomplete wants a small, fast fill-in-the-middle model, and a chat model makes a poor one.
Zed
Open the Agent Settings (agent: open settings), click Add Provider under
LLM Providers, and fill in the provider name, API URL, model ID and
context window. Or add it to your settings.json directly:
{
"language_models": {
"openai_compatible": {
"deeprelay": {
"api_url": "https://api.deeprelay.ai/v1",
"available_models": [
{
"name": "deeprelay/deepseek-v4-pro",
"display_name": "DeepSeek V4 Pro (deeprelay)",
"max_tokens": 1048576,
"max_output_tokens": 32768,
"capabilities": {
"tools": true,
"images": false,
"parallel_tool_calls": false,
"chat_completions": true
}
}
]
}
}
}
}
The key comes from an environment variable named after the provider ID,
in upper snake case plus _API_KEY. With the provider ID deeprelay as
above, that is DEEPRELAY_API_KEY, the same variable the rest of this page
uses. You can also paste the key into the provider settings UI. Don't put it
in settings.json.
Gotchas:
- Keep
"chat_completions": true. Set tofalse, Zed calls the Responses API, which deeprelay doesn't serve yet. - Keep
"images": false(see Picking a model). max_tokenshere is the context window, not the output limit. Use the model'scontext_length.
Cursor
Open Cursor Settings → Models, then under API Keys:
- Paste your
deeprelay_live_…key into the OpenAI API Key field. - Turn on Override OpenAI Base URL and enter
https://api.deeprelay.ai/v1. Don't add/chat/completions, because Cursor appends it. - Add a custom model named
deeprelay/deepseek-v4-proand pick it in the chat or agent model picker.
Gotchas:
- Chat and agent only, not Tab. A custom key and base URL apply to chat models. Tab completion keeps using Cursor's built-in models.
- Requests go through Cursor's servers. Cursor builds the final prompt on its backend, so the request to your base URL comes from Cursor's servers, not your machine. The URL has to be publicly reachable.
localhostor a VPN-only host won't work.https://api.deeprelay.ai/v1is public, so this only matters if you front deeprelay with your own proxy. - The override applies to every OpenAI model, not only your custom one. While it's on, Cursor's own OpenAI models also go to deeprelay and fail. Switch it off to use them again.
- Some Cursor features send OpenAI Responses API payloads, which deeprelay doesn't serve yet. If a mode fails while plain chat works, that is the likely cause.
- If you get connection errors that
curldoesn't reproduce, try Cursor Settings → Network → HTTP Compatibility Mode → HTTP/1.1. - Cursor's bring-your-own-key rules depend on your Cursor plan (Teams and Enterprise add a per-token Cursor fee). See Cursor's page linked above.
deeprelay also runs an MCP server that Cursor can connect to. That is a different integration: it gives Cursor's agent deeprelay tools (models, usage, keys), not a model provider.
Troubleshooting
401 / "API key is invalid"
{"error":{"message":"API key is invalid, revoked, or expired","type":"authentication_error","code":"unauthorized"}}
That is the message for a key that is well-formed but unknown, revoked or
expired. A malformed key, or one with the wrong prefix, gets the shorter
"API key is invalid".
- Check that the key starts with
deeprelay_live_and has no stray whitespace or quotes. A trailing newline from copy-paste is the usual cause. - Check that the agent reads the key from where you put it: Continue reads
~/.continue/.env, not your shell; Zed reads; Aider reads_API_KEY OPENAI_API_KEY. - Check the base URL is
https://api.deeprelay.ai/v1. Keys are per environment, and a production key gets a401on any other host. - Test the key directly. A
200means the key is fine and the agent's config is the problem:
curl -s -o /dev/null -w '%{http_code}\n' https://api.deeprelay.ai/v1/models \
-H "Authorization: Bearer $DEEPRELAY_API_KEY"
A trial key also returns 401 after its expiry date, and any key returns
402 insufficient_balance when credit runs out. See Trial
keys.
model_not_found
{"error":{"message":"Model \"deeprelay/…\" is not available. Try another model — see GET /v1/models for the current list.","type":"invalid_request_error","param":"model","code":"model_not_found"}}
- List what is actually served:
curl -s https://api.deeprelay.ai/v1/models \
-H "Authorization: Bearer $DEEPRELAY_API_KEY" | jq -r '.data[].id'
- Copy the ID exactly, including the
deeprelay/prefix. For Aider, addopenai/in front (openai/deeprelay/deepseek-v4-pro). For Kilo Code's selector, add the provider ID (deeprelay/deeprelay/deepseek-v4-pro). The ID in the provider'smodelsblock stays the plaindeeprelay/…ID, with no extra prefix. - The catalog is live, so a model can drop out between refreshes. If an ID that worked yesterday is gone, pick another from the list.
The agent says tools or tool calls are unsupported
- Check the model supports tools. Its
supported_parametersinGET /v1/modelsmust includetools. Use thejqfilter under Picking a model. Sending tools to a model that doesn't list them gives whatever that upstream does. Sometimes that's an error, sometimes the tools are silently ignored. - Check the agent knows the model supports tools. Agents can't detect it on their own for a custom endpoint: set
capabilities: [tool_use]in Continue,"tool_call": truein Kilo Code, and"tools": truein Zed. deeprelay/glm-5.3accepts onlytool_choice: "auto". An agent that forces a tool ("required"or a named function) gets a400namingtool_choice. Switch todeeprelay/glm-5.2or a DeepSeek V4 model, which accept every mode.parallel_tool_callsis accepted and ignored, so it can't cause this error. A model may still return several calls in one turn.
Still stuck? Email support@deeprelay.ai with the agent name and version,
the model ID, and the exact error body.