Coding agent setup

Connect your coding agent.

Pick the tool your team already uses. If you do not have a preference, start with OpenCode: it has the simplest custom OpenAI-compatible provider setup today.

1. Get your endpoint and key

Use the hosted Model Oracle AI API endpoint, or replace it with your team's private deployment URL.

https://api.modeloracle.com/api/v1

Use your Model Oracle AI key in the coding agent. Provider API keys stay inside Model Oracle AI and are not configured in Claude Code, Codex, or OpenCode.

2. Pick your coding agent

Default path

OpenCode

Add a provider entry like this to your OpenCode config, then adjust the baseURL and model list to match your configured Model Oracle AI models.

{
  "$schema": "https://opencode.ai/config.json",
  "provider": {
    "model-oracle-ai": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "Model Oracle AI",
      "options": {
        "baseURL": "https://api.modeloracle.com/api/v1"
      },
      "models": {
        "gpt-5": { "name": "GPT-5" },
        "gpt-5.5": { "name": "GPT-5.5" },
        "gpt-5.4-mini": { "name": "GPT-5.4 Mini" },
        "gpt-4.1-mini": { "name": "GPT-4.1 Mini" },
        "anthropic/claude-opus-4-8": { "name": "Claude Opus 4.8" },
        "siliconflow/Pro/deepseek-ai/DeepSeek-V4": { "name": "DeepSeek V4 Pro" },
        "siliconflow/Qwen/Qwen3-Coder-480B-A35B-Instruct": { "name": "Qwen3-Coder" },
        "siliconflow/moonshotai/Kimi-K2-Instruct": { "name": "Kimi K2" },
        "siliconflow/Pro/zai-org/GLM-4.7": { "name": "GLM-4.7" }
      }
    }
  }
}

In OpenCode, select the Model Oracle AI provider and one of the configured models. Once intent aliases are enabled, those choices can become labels like auto, review, debug, cheap, or fast.

OpenCode stores API keys in ~/.local/share/opencode/auth.json. The auth entry key must match the provider ID in the config.

Codex

Codex supports user-level custom model providers in ~/.codex/config.toml. Add a provider that points at Model Oracle AI and set the model to one of the models exposed by your control plane.

model = "gpt-5"
model_provider = "model-oracle-ai"

[model_providers.model-oracle-ai]
name = "Model Oracle AI"
base_url = "https://api.modeloracle.com/api/v1"
env_key = "MODEL_ORACLE_API_KEY"

Set MODEL_ORACLE_API_KEY only if your Model Oracle AI instance requires a local control-plane key. Keep provider keys in Model Oracle AI, not in Codex. This uses the OpenAI-compatible endpoint exposed by the current backend.

Claude Code

Claude Code normally talks to an Anthropic-compatible Messages API. The current Model Oracle AI backend exposes an OpenAI-compatible chat completions endpoint, so OpenCode is the default working setup today.

ANTHROPIC_BASE_URL=https://api.modeloracle.com
ANTHROPIC_AUTH_TOKEN=$MODEL_ORACLE_API_KEY

This is the intended shape after Anthropic-compatible ingress is added: Claude Code traffic goes to Model Oracle AI first, then Model Oracle AI chooses the configured Anthropic, OpenAI, SiliconFlow, StreamLake, or Bedrock model behind the scenes.

3. Send a test prompt

Ask the agent to inspect a repository or make a small change. After the first request goes through the proxy, the dashboard will show request count, token usage, estimated spend, latency, errors, prompt details, completion details, provider, and model.