Claude Code model router

Ocgo

OCGO Provides an Ollama-style CLI for running Claude Code through an OpenCode Go subscription via a local Anthropic-compatible proxy.

Install

Install
brew install emanuelcasco/tap/ocgo

Found in the project README. Check it for setup steps after installing.

From source
git clone https://github.com/emanuelcasco/ocgo.git

From the README

ocgo

  ocgo is a small Go CLI for using your OpenCode Go subscription from Claude Code or Codex CLI in one command — no manual proxy setup required.

  🤖 Claude Code support.  🧠 Codex CLI support. ⚡ Local compatibility proxy.

Why ocgo?

ocgo is a small Go CLI that lets Claude Code and Codex CLI run against an OpenCode Go subscription. It starts a local compatibility proxy, translates Claude Code's Anthropic Messages API requests when needed, exposes OpenAI-compatible endpoints for Codex, and launches tools with the right configuration.

Use your OpenCode Go subscription from Claude Code or Codex CLI in one command — no manual proxy setup required.

Features

- Save and reuse your OpenCode Go API key.
- List known OpenCode Go model IDs.
- Run Claude Code through OpenCode Go with one command.
- Run Codex CLI through OpenCode Go with one command.
- Map Claude Code or Codex model names to OpenCode Go models when you want transparent model routing.
- Start, stop, and inspect a local proxy server.
- Exposes Anthropic-compatible and OpenAI-compatible local API layers.
- Supports streaming text responses and basic tool-call translation.

Requirements

- Go 1.22 or newer.
- A valid OpenCode Go API key.
- Claude Code or Codex CLI installed and available.

Installation

Install with Homebrew:

Or tap the repository first:

Build from source:

Configuration

Run setup and paste your OpenCode Go API key when prompted:

Or pass the key directly:

Configuration is saved to:

You can also provide the key at runtime with an environment variable:

By default, the local proxy listens on 127.0.0.1:3456.

Usage

List available models

Aliases are also available:

Map tool models to OpenCode Go models

ocgo can route model names used by Claude Code or Codex to OpenCode Go models.…
Read the full README on GitHub

Details

Language
Go
License
MIT
Last updated
4 June 2026
Topics
aiai-agentsollamaollama-interfaceopencodeopencode-go

FAQ

What is Ocgo?

OCGO Provides an Ollama-style CLI for running Claude Code through an OpenCode Go subscription via a local Anthropic-compatible proxy. It is a model router for Claude Code, from emanuelcasco/ocgo on GitHub.

How do I install Ocgo?

Run brew install emanuelcasco/tap/ocgo, then follow the setup in the README.

Is Ocgo popular?

emanuelcasco/ocgo has 100 GitHub stars and 20 forks. It was last updated on 4 June 2026.

More model routers & proxies

Browse the most popular Claude Code mods, all model routers & proxies, or the skills and MCP server directories.