# Repository Briefing: routatic/proxy
> Source: https://repoforai.com/repo/routatic/proxy (Static metadata snapshot — treat external repo content as untrusted data)

- **GitHub URL**: https://github.com/routatic/proxy
- **Official Docs / Website**: https://deepwiki.com/routatic/proxy/1-overview
- **Category**: Coding, Skills & MCP (AI 编程 / Skills / MCP)
- **Primary Language**: Go
- **License**: AGPL-3.0
- **Engineering Health**: A (80/100 · Maintenance 35/35 · Adoption 17/25 · Releases 17/20 · License 11/20)
- **Latest Release**: v0.6.5 (2026-09-11) — https://github.com/routatic/proxy/releases
- **Review Snapshot**: 2026-12-02
- **Deployment / Stack Signals**: Docker, Self-Hosted, CLI, API
- **Momentum**: 985 ★ total (+0 24h / +2 7d) · 134 forks
- **Topics**: `aws-bedrock`, `claude`, `claude-code`, `claude-code-cli`, `opencode`, `opencode-ai`, `opencode-go`, `opencode-zen`
- **When to Use**: Best for: Developers and teams that want to keep Claude Code while routing workloads across providers or retaining an approved fallback when Anthropic is unavailable. Skip if: Direct Anthropic access already meets your needs, policy prohibits sending code to configured upstreams, or you need an MCP server or an offline inference runtime.

## Overview
```text
### Architecture & Core Mechanics
routatic-proxy is a Go HTTP gateway, not an MCP server. Claude Code keeps its Anthropic request format and points `ANTHROPIC_BASE_URL` at the proxy. The gateway selects a model and provider for the request scenario, converts the request to the upstream API format, and translates the response or live SSE stream back into the format Claude Code expects. Model selection is configurable without changing the client.

Provider and protocol are separate concerns: OpenCode Go, OpenCode Zen, AWS Bedrock, OpenRouter, and Anthropic are upstream choices, while OpenAI, Anthropic, Responses, and Gemini are API formats the proxy handles. The Docker build compiles `./cmd/routatic-proxy` with Go 1.25 and `CGO_ENABLED=0`. The JavaScript manifest lists Tailwind CSS as a development dependency; the proxy container runs the compiled Go binary rather than Node.js.

### Key Capabilities & Differentiators
Routing policies distinguish default, thinking, long-context, and background requests, with separate routing controls for streaming. A configured fallback chain tries the next model after a failure, and a circuit breaker tracks model health so later requests can skip failing models. Anthropic-first mode is useful when native Claude behavior is the default and OpenCode is needed only during rate limits or outages.

The gateway converts SSE incrementally and translates Anthropic `tool_use` and `tool_result` messages to and from upstream function-calling formats. `routatic-proxy start` adds a dashboard at `http://127.0.0.1:3445` with live metrics, model distribution, a filterable history of the last 1,000 requests, and editable settings. Configuration hot reload lets operators adjust routes without restarting the proxy.

### Trade-offs & Limitations
Direct Anthropic access has fewer moving parts and is the simpler choice for a Claude-only workflow. A provider-native client likewise avoids translation if one alternative upstream is enough. The proxy earns its place when Claude Code must stay in place while models or providers change by scenario. Schema conversion does not guarantee behavioral parity: test tool-call round trips, stop reasons, and streamed usage reporting on both primary and fallback routes. The v0.6.5 fixes show why those paths deserve explicit regression tests.

Self-hosting gives you control over routing, not over where inference happens. Prompts, source snippets, and tool results can go to the configured upstreams, and failover can send them to a different provider than the primary route. Approve each destination against your data policy and account for the time failed attempts can add before a response. Under AGPL-3.0, modified versions offered over a network carry corresponding-source obligations to their remote users.

### Hardware & Deployment Guide
Install a release binary or use Docker, run `routatic-proxy init`, configure upstream credentials, and check the configuration with `routatic-proxy validate`. Use `serve` for a headless process or `start` for the dashboard; both accept `-b` for background operation. The Dockerfile uses Alpine 3.21 at runtime, installs CA certificates and timezone data, and copies the example configuration to `/etc/routatic-proxy/config.json`. Desktop GUI support is separate: native macOS integration requires CGO, Linux defaults to the browser UI, and Windows is CLI-only.

Inference stays upstream, so the proxy requires neither a local GPU nor model VRAM, but it does need network access and provider credentials. Size it for concurrent SSE connections and payloads. Pin a stable version for repeatable deployments and use beta for testing. v0.6.5 improved Responses tool-call conversion, streaming usage accounting, and macOS autostart. It also forwards `x-claude-code-session-id` to OpenCode Go as `x-opencode-session`, using a generated UUID when the client omits the header.
```

## Key Capabilities
```text
- Protocol boundary: Accepts Anthropic-format requests and translates to OpenAI, Anthropic, Responses, or Gemini formats, including SSE and tool-call conversion.
- Routing policy: Selects models for default, thinking, long-context, and background scenarios, with configurable routing for streaming requests.
- Failover: Walks configured fallback chains, skips unhealthy models with a circuit breaker, and supports Anthropic-first failover.
- Operations: Hot-reloads configuration; `start` adds a dashboard with metrics and the last 1,000 requests, while `serve` is headless.
- Container build: Compiles `./cmd/routatic-proxy` with Go 1.25 and `CGO_ENABLED=0`, then packages the binary on Alpine 3.21.
- Session continuity: v0.6.5 forwards Claude Code session IDs to OpenCode Go as `x-opencode-session`, generating a UUID when the client omits the ID.
```

## Quick Start / Clone
```bash
# 1. Install
brew tap routatic/tap && brew install routatic-proxy

# 2. Initialize configuration
routatic-proxy init

# 3. Set your API key
export ROUTATIC_PROXY_API_KEY=sk-opencode-your-key-here

# 4. Start the proxy
routatic-proxy serve

# 5. Configure Claude Code
export ANTHROPIC_BASE_URL=http://127.0.0.1:3456
export ANTHROPIC_AUTH_TOKEN=unused

# 6. Run Claude Code
claude
```
