Adapt any model for Claude Code
Unlock the full potential of Claude Code using Claude Adapter. It seamlessly connects Anthropic's powerful CLI to DeepSeek, GPT-Codex, Grok, and any OpenAI-compatible provider.
$npm install -g claude-adapter
Core Capabilities
Protocol Translation
Seamless bi-directional conversion engine between Anthropic Messages API and OpenAI Chat Completions format.
Real-time Streaming
Full support for Server-Sent Events (SSE) ensures the interactive feel of Claude Code is preserved.
Tool Calling
Native function calls + XML mode for models without native support. Enables complex agentic workflows.
Drop-in Proxy
Works transparently. No need to modify your existing Claude Code implementation.
Any Model
Use DeepSeek, OpenAI, Grok, or any OpenAI-compatible provider with Claude Code.
Local & Secure
Operates as a local proxy. Your API keys stay on your machine, acting as a secure bridge.
Transparent Proxying
The adapter operates non-intrusively as a local service. It intercepts requests from Claude Code, transforms them on-the-fly, and routes them to your preferred provider.
Initialize Service
Run `claude-adapter` to start the interactive wizard.
Setup Provider
Use any OpenAI compatible endpoint like DeepSeek, OpenAI, Grok, or your custom api.
Configure Models
Set your preferred alternative model for Opus, Sonnet, Haiku.
Run Claude Code
The adapter automatically configures Claude Code to use the proxy.
$ claude-adapter
Initialized Claude Adapter
OpenAI-compatible base URL: https://api.openai.com/v1
API Key: ************
Alternative model for Opus: gpt-5.2-codex
Alternative model for Sonnet: gpt-5.2-codex
Alternative model for Haiku: gpt-5.2-mini
Do your models support tool/function calling? Yes
Select tool/function type:
> XML (Recommended)
Native (Openai Format)
Claude Adapter running at http://localhost:3080
✓ Claude Adapter is ready!
Open a new terminal tab and run Claude Code.
Ready to break the ecosystem lock-in?
Start using your favorite models with Claude Code today.