Coding agent setup

Connect your coding agent.

Pick the tool your team already uses. OpenCode can read your Model Oracle AI key from an environment variable referenced by its config. Cursor can use Model Oracle AI when your Cursor build exposes an OpenAI-compatible base URL override.

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. You can use managed access or add encrypted provider keys in the dashboard. Provider keys stay inside Model Oracle AI and are not configured in Cursor, Claude Code, Codex, or OpenCode.

2. Pick your coding agent

Default path

OpenCode

The easiest setup is to run /connect in OpenCode. Search for and select Model Oracle AI, then paste your Model Oracle AI API key. OpenCode stores the credential in ~/.local/share/opencode/auth.json. Use auto for most work so Model Oracle AI can choose the best available model for the request.

Manual fallback: if you cannot use /connect, set MODEL_ORACLE_API_KEY in your shell and add the provider config below. You do not need to run /connect when using this fallback. Put the provider entry in ~/.config/opencode/opencode.json to make it available to every project, or in opencode.json at a project root for that project only. OpenCode merges both files, with the project file taking precedence. Adjust the baseURL and keep only the logical models your team wants developers to select.

export MODEL_ORACLE_API_KEY="your-model-oracle-api-key"
{
  "$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",
        "apiKey": "{env:MODEL_ORACLE_API_KEY}"
      },
      "models": {
        "auto": { "name": "Auto (Decision Engine)" },
        "claude-fable-5": { "name": "Claude Fable 5" },
        "claude-haiku-4.5": { "name": "Claude Haiku 4.5" },
        "claude-opus-4.8": { "name": "Claude Opus 4.8" },
        "claude-opus-5": { "name": "Claude Opus 5" },
        "claude-sonnet-5": { "name": "Claude Sonnet 5" },
        "deepseek-v4-pro": { "name": "DeepSeek V4 Pro" },
        "glm-5.2": { "name": "GLM 5.2" },
        "gpt-4.1": { "name": "GPT-4.1" },
        "gpt-4.1-mini": { "name": "GPT-4.1 Mini" },
        "gpt-5": { "name": "GPT-5" },
        "gpt-5.4": { "name": "GPT-5.4" },
        "gpt-5.4-mini": { "name": "GPT-5.4 Mini" },
        "gpt-5.4-nano": { "name": "GPT-5.4 Nano" },
        "gpt-5.5": { "name": "GPT-5.5" },
        "gpt-5.6-luna": { "name": "GPT-5.6 Luna" },
        "gpt-5.6-sol": { "name": "GPT-5.6 Sol" },
        "gpt-5.6-terra": { "name": "GPT-5.6 Terra" },
        "kimi-k3": { "name": "Kimi K3" },
        "kimi-k2.7-code": { "name": "Kimi K2.7 Code" },
        "o4-mini": { "name": "OpenAI o4-mini" }
      }
    }
  }
}

Stable logical model names such as kimi-k3 or deepseek-v4-pro are available when a workload needs a fixed model family.

Logical model IDs are case-sensitive. Do not copy provider namespaces or upstream model IDs into OpenCode. Model Oracle AI links each logical model to its provider-specific models and manages provider fallback behind the scenes.

Choose either the recommended /connect flow or the manual config fallback—you do not need to configure the API key both ways.

3. Send a test prompt

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

Control your auto session

Keep your client model set to auto, then send an @oracle command as the complete message when you want to inspect or temporarily control Model Oracle AI's model selection. Commands work with both the OpenAI-compatible and Anthropic-compatible setup paths, do not reach an end model, and use zero inference tokens.

@oracle status
@oracle use economy
@oracle use balanced
@oracle use premium
@oracle use kimi-k3
@oracle use auto
@oracle help

Economy, balanced, and premium select exactly that tier. A logical model ID is case-sensitive and pins that model while Model Oracle AI continues to manage provider fallback. Send @oracle use auto to return to normal Model Intelligence.

Session overrides expire after 24 hours of inactivity. If a client has not supplied enough session context yet, Model Oracle AI holds the override for five minutes and attaches it to the next auto request made with that API key.

Reasoning controls

Model Oracle AI accepts the top-level reasoning_effort field for reasoning-capable logical models and forwards or translates it for the selected upstream provider.

GPT-5.6 Luna, Sol, and Terra

Supported effort values: nonelowmediumhighxhighmax

Kimi K3

Kimi K3 always reasons. Supported effort values: lowhighmax

curl https://api.modeloracle.com/api/v1/chat/completions \
  -H "Authorization: Bearer $MODEL_ORACLE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-5.6-sol",
    "messages": [{"role": "user", "content": "Plan a safe refactor."}],
    "reasoning_effort": "high"
  }'