メインコンテンツへスキップ
オープンソースのセルフホスト型パーソナル AI アシスタントです。サイト: https://openclaw.ai (ドキュメント: https://docs.openclaw.ai、リポジトリ: https://github.com/openclaw/openclaw)。
プロトコル: OpenAI 互換
  • Base URL: https://api.orcarouter.ai/v1 (/v1含める必要があります)

インストール

Node 22 以上が必要です。openclaw コマンドをインストールします:
npm install -g openclaw
または macOS/Linux では:
curl -fsSL https://openclaw.ai/install.sh | bash

設定

~/.openclaw/openclaw.json を編集します:
{
  "models": {
    "mode": "merge",
    "providers": {
      "orcarouter": {
        "baseUrl": "https://api.orcarouter.ai/v1",
        "apiKey": "sk-orca-...",
        "api": "openai-completions",
        "models": [ { "id": "orcarouter/auto", "name": "OrcaRouter Auto" } ]
      }
    }
  },
  "agents": { "defaults": { "model": { "primary": "orcarouter/orcarouter/auto" } } },
  "gateway": { "mode": "local" }
}

実行

openclaw agent --local --agent main --session-id s1 -m "Reply with exactly: OK"
OK という返答が返ってくるはずです。

注意事項

  • baseUrl は各モデルエントリの中ではなく models.providers.<name> の下に置く必要があります。モデルに置くと Unrecognized key: "baseUrl" になります。
  • base URL は末尾の /v1 を保持します。モデル参照は provider/model を使うため、自動ルーターは orcarouter/orcarouter/auto です。
  • デフォルトのエージェント名は main です (default ではありません)。非インタラクティブな実行には --local--session-id を使います。
  • モデル名は vendor/model 形式を使います。orcarouter/autoanthropic/claude-opus-4.8google/gemini-2.5-flash のような特定のモデルに置き換えられます (それに応じて primary の参照も更新してください)。

thinking / reasoning

OpenClaw は標準の OpenAI 互換 API (api: "openai-completions") で OrcaRouter と 通信するため、reasoning はモデル自身の動作に従います — reasoning 対応モデル (例: anthropic/claude-* の reasoning モデル) を選べば、上流で設定された とおりに思考します。