Discover and explore top open-source AI tools and projects—updated daily.
samueltuyizereLLM API proxy enabling Claude Code to use OpenCode Go models
Top 61.3% on SourcePulse
This project provides a Go CLI proxy (oc-go-cc) that enables users of Anthropic's Claude Code to leverage affordable open-source coding models available through an OpenCode Go subscription. It acts as an intermediary, transparently translating API requests between the Anthropic and OpenAI formats, allowing Claude Code to interact with cost-effective models without any modifications to the client application.
How It Works
The oc-go-cc proxy intercepts Anthropic API requests originating from Claude Code. It then transforms these requests into the OpenAI Chat Completions format, which is compatible with OpenCode Go's endpoints. After receiving a response from OpenCode Go, the proxy converts it back into the Anthropic format before returning it to Claude Code. This process is designed to be seamless, with features like intelligent model routing based on request context, fallback chains for model failures, and a circuit breaker mechanism to maintain reliability.
Quick Start & Requirements
brew tap samueltuyizere/tap && brew install oc-go-ccgit clone the repository, then make build.oc-go-cc initexport OC_GO_CC_API_KEY=sk-opencode-your-key-hereoc-go-cc serveexport ANTHROPIC_BASE_URL=http://127.0.0.1:3456 and export ANTHROPIC_AUTH_TOKEN=unused.Highlighted Details
tool_use and OpenAI's function calling.tiktoken for precise token counting and context threshold detection.launchd support).Licensing & Compatibility
Limitations & Caveats
The project requires an OpenCode Go subscription and API key to function. While the proxy handles various request types and model fallbacks, its effectiveness is dependent on the availability and performance of the underlying OpenCode Go models. The README indicates version v0.1.0 in an example, suggesting it may be in early development.
2 days ago
Inactive