Aider & OpenCode
OpenCodeMode: OpenAI-compatible & Anthropic

Aider & OpenCode

Two popular terminal coding agents. Both can be pointed at Nexotao via env vars or a config file.


Aider

Aider routes models through LiteLLM, so you can use the OpenAI-compat path (recommended) or the Anthropic path.

export OPENAI_API_BASE=https://api.nexotao.com/v1
export OPENAI_API_KEY=sk-nexo-...
 
aider --model openai/gpt-5-mini
  • The openai/ prefix is required — it tells Aider to use the OpenAI-compatible endpoint.
  • OPENAI_API_BASE must include /v1.
  • Other models: openai/grok-4.3, openai/DeepSeek-V4-Pro.

Aider may show an “unknown model” warning for sk-nexo IDs — harmless, ignore it.


OpenCode

OpenCode

OpenCode is configured via opencode.json (in the project root or ~/.config/opencode/opencode.json).

{
  "$schema": "https://opencode.ai/config.json",
  "provider": {
    "nexotao": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "Nexotao",
      "options": {
        "baseURL": "https://api.nexotao.com/v1",
        "apiKey": "{env:OPENAI_API_KEY}"
      },
      "models": {
        "gpt-5-mini": {
          "name": "GPT-5 Mini (Nexotao)",
          "limit": { "context": 128000, "output": 65536 }
        }
      }
    }
  }
}

Then:

export OPENAI_API_KEY=sk-nexo-...
opencode          # pick a model via /models
  • Use npm: "@ai-sdk/openai-compatible" for the /chat/completions endpoint.
  • baseURL must include /v1.
  • apiKey supports {env:VAR} syntax; keep the key in an env var, not the file.
⚠️

Custom providers must declare models with limit.context / limit.output. Without them, OpenCode’s context tracking breaks.

Usage is billed from your Rupiah balance per token. See Billing & Pricing.