Ada AI

Coding agents

Point coding agents like Pi and OpenCode at Ada AI so every request flows through your proxy key, your upstreams, and your routing rules.

Ada AI is OpenAI-compatible, so coding agents that already speak the Chat Completions API work unchanged — point the agent at https://api.ada.ai/v1, use a proxy key (sk-rc-…) as the API key, and pick a model you've enabled on at least one upstream.

You need a proxy key first

If you haven't already, mint one in the dashboard under Keys → New key and add an upstream whose model list is synced. See the Quickstart if you're starting from scratch.

The two pieces you always set

SettingValue
Base URLhttps://api.ada.ai/v1
API keyYour proxy key, sk-rc-… — not a provider key. The proxy already holds your provider keys.

The model you select must be present on at least one of your enabled upstreams. Run GET /v1/models to see the union across them (see Models & routing).

Configure your agent

Pi reads providers from ~/.pi/agent/models.json. Add an ada provider with api: "openai-completions" and list the model IDs you want available:

~/.pi/agent/models.json
{
  "providers": {
    "ada": {
      "baseUrl": "https://api.ada.ai/v1",
      "api": "openai-completions",
      "apiKey": "$ADA_API_KEY",
      "models": [
        { "id": "Qwen/Qwen3.6-35B-A3B-FP8", "name": "Qwen 3.6 35B A3B" },
        { "id": "moonshotai/Kimi-K2.7-Code", "name": "Kimi K2.7 Code" },
        { "id": "glm-4.7", "name": "GLM 4.7" },
        { "id": "swiss-ai/Apertus-70B-Instruct-2509", "name": "Apertus 70B" }
      ]
    }
  }
}

The file reloads every time you open /model — edit it mid-session, no restart needed.

Keep the key out of the file

apiKey supports three value forms. Prefer an environment variable so the secret never lands on disk:

FormExampleResolves to
Env var"$ADA_API_KEY"the value of ADA_API_KEY
Env var (braced)"${KEY_PREFIX}_${KEY_SUFFIX}"interpolates inside a larger literal
Shell command"!pass show ada/ada.ai"stdout of the command, at request time
Literal"sk-rc-..."used verbatim

$$ emits a literal $; $! emits a literal !. Export the key in your shell profile:

~/.bashrc
export ADA_API_KEY="sk-rc-..."

Select a model

In the TUI, open /model and pick ada/Qwen/Qwen3.6-35B-A3B-FP8. From the command line, use the provider/id form:

pi --provider ada --model "Qwen/Qwen3.6-35B-A3B-FP8" \
   --no-tools --print "List three Go channel gotchas."

Set a default by adding a models.json entry per session, or start Pi with --models "ada/*" to cycle Ada AI models with Ctrl+P.

Reasoning models

Qwen/Qwen3.6-35B-A3B-FP8 is a reasoning model. Pi's openai-completions API drives it with the reasoning_effort field and the developer role by default, which Ada AI's Qwen upstream accepts.

If a particular upstream ever rejects the developer role or reasoning_effort, add compat flags (provider- or model-level) so Pi falls back to a system message and omits the field:

~/.pi/agent/models.json
{
  "providers": {
    "ada": {
      "baseUrl": "https://api.ada.ai/v1",
      "api": "openai-completions",
      "apiKey": "$ADA_API_KEY",
      "compat": {
        "supportsDeveloperRole": false,
        "supportsReasoningEffort": false
      },
      "models": [
        { "id": "Qwen/Qwen3.6-35B-A3B-FP8", "reasoning": true }
      ]
    }
  }
}

Ada AI exposes many models across upstreams; these are well-suited to agentic coding tasks and accept the standard chat-completions shape:

ModelStrengths
Qwen/Qwen3.6-35B-A3B-A3B-FP8Reasoning-heavy refactors; default. Use a thinking level (high, max) when the task needs planning.
moonshotai/Kimi-K2.7-CodeStrong tool-calling and long-context code comprehension.
swiss-ai/Apertus-70B-Instruct-2509Large instruction-following model for broad tasks.
glm-4.7Fast, general-purpose.

The exact set depends on which upstreams you've enabled and synced. Run curl https://api.ada.ai/v1/models -H "Authorization: Bearer sk-rc-…" to see exactly what your key can address right now.

Verify it works

A one-shot check that the agent reaches Ada AI and routes correctly — the model echoed back in the response confirms the proxy selected your upstream:

pi --provider ada --model "glm-4.7" \
   --no-tools --no-session --print "Reply with exactly: ok"

Troubleshooting

model not found / 400 from the proxy

The model ID isn't on any of your enabled upstreams. Either the upstream needs Sync models run (in the dashboard, or POST /me/upstreams/{id}/sync-models), or the ID doesn't match what that upstream exposes. Model IDs are exact and case-sensitive — Qwen/Qwen3.6-35B-A3B-FP8 is not qwen3.6-35b. See Models & routing.

401 / invalid_api_key

You're using a provider key instead of an Ada AI proxy key, or the proxy key was revoked. Proxy keys start with sk-rc-. Mint a new one under Keys → New key (see API keys).

Reasoning leaks into the response, or developer role errors

Some OpenAI-compatible upstreams don't understand the developer role or the reasoning_effort field that coding agents send by default. In Pi, add compat.supportsDeveloperRole: false and compat.supportsReasoningEffort: false (shown above) so the agent uses a system message and omits the field. The proxy passes these through unchanged.

Requests hit the wrong upstream

Routing follows upstream priority, descending — the highest number is tried first, and the proxy only fails over to the next on a 5xx. If two upstreams expose the same model, raise the priority on the one you want first. There is no per-model priority. See Models & routing.

Next steps

On this page