Công cụ & IDE

Cấu hình OpenCode

Thiết lập OpenCode với provider OpenAI-compatible của cheapkeyai.shop qua opencode.json.

OpenCode có thể khai báo provider tương thích OpenAI. Sau khi thêm cheapkeyai.shop vào `opencode.json`, bạn chọn model trong UI hoặc bằng command tùy workflow.

Endpoint

Base URL
https://cheapkeyai.shop/v1

Cài đặt

npm hoặc brew
npm install -g opencode
brew install opencode-ai/tap/opencode
opencode --version

Cấu hình opencode.json

opencode.json
{
  "$schema": "https://opencode.ai/config.json",
  "provider": {
    "cheapkeyai": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "cheapkeyai.shop",
      "options": {
        "baseURL": "https://cheapkeyai.shop/v1"
      },
      "models": {
        "gpt-5.2": { "name": "GPT-5.2" },
        "gpt-5.3-codex": { "name": "GPT-5.3 Codex" },
        "claude-sonnet-4-5": { "name": "Claude Sonnet 4.5" },
        "claude-opus-4-5": { "name": "Claude Opus 4.5" }
      }
    }
  }
}

Đăng nhập và chọn model

Lệnh
opencode auth login
opencode
# Trong OpenCode, chọn provider cheapkeyai và model cần dùng.

Lưu ý

  • Nếu muốn không lưu key trong file config, ưu tiên biến môi trường hoặc secret store.
  • Tên model phải đúng với model mà key/group được phép dùng.
  • Sau khi sửa config, restart OpenCode để chắc chắn cấu hình mới được đọc.