Skip to content

Lets Claude Code speak Anthropic /v1/messages to Poe, OpenRouter, OpenAI Codex subscription or LM Studio

License

Notifications You must be signed in to change notification settings

binbinsh/cc-adapter

Repository files navigation

CC Adapter

PyPI Version Monthly Downloads

cc-adapter lets Claude Code speak Anthropic /v1/messages to Poe, OpenRouter, OpenAI Codex subscription or LM Studio. It supports streaming, tool calls, and cache-control passthrough.

Tested models (quick list)

Choose one of these thoroughly tested models:

  • codex:gpt-5.2-medium (requires OpenAI Codex Subscription)
  • poe:claude-opus-4.5 (best quality; requires Poe key)
  • poe:claude-sonnet-4.5 (requires Poe key)
  • poe:deepseek-v3.2 (best value for money; requires Poe key)
  • poe:glm-4.6 (requires Poe key)
  • poe:gpt-5.2-pro (requires Poe key; extremely expensive!)
  • openrouter:claude-sonnet-4.5 (requires OpenRouter key)
  • openrouter:claude-opus-4.5 (requires OpenRouter key)
  • openrouter:gpt-5.2 (requires OpenRouter key)
  • openrouter:glm-4.6 (requires OpenRouter key)
  • openrouter:gpt-5.2-pro (requires OpenRouter key; extremely expensive!)
  • lmstudio:gpt-oss-120b (requires LM Studio + gpt-oss-120b)

Install from PyPI (recommended)

Quickest way to get cc-adapter:

uv tool install cc-adapter

Install from source

Clone and set up a local dev environment:

git clone https://github.com/binbinsh/cc-adapter.git
cd cc-adapter/
uv venv --python 3.10

GUI (recommended for daily use)

Launch the Tkinter GUI to configure and start/stop the adapter:

uv run cc-adapter-gui

Set provider/model/API keys in the window, then use Test Provider and Start/Stop.

CC Adapter GUI

OpenAI Codex (ChatGPT OAuth)

This provider uses ChatGPT subscription to call the Codex backend. You do not need an OPENAI_API_KEY.

CLI

cc-adapter-codex-login
uv run cc-adapter --model codex:gpt-5.2-medium

GUI

choose provider OpenAI Codex, then click Login and Start.

CC Adapter GUI

CLI (recommended for remote host)

The GUI offers a curated drop-down list. But the CLI accepts any provider-prefixed model string (e.g., poe:any-model-name); Common flags: --host (default 127.0.0.1), --port (default 8005), plus provider-specific API keys.

Poe

uv run cc-adapter --host 127.0.0.1 --port 8005 \
  --model poe:claude-opus-4.5 \
  --poe-api-key YOUR_POE_API_KEY \
  --daemon

OpenRouter

uv run cc-adapter --host 127.0.0.1 --port 8005 \
  --model openrouter:claude-opus-4.5 \
  --openrouter-api-key YOUR_OPENROUTER_API_KEY \
  --daemon

LM Studio

uv run cc-adapter --host 127.0.0.1 --port 8005 \
  --model lmstudio:gpt-oss-120b \
  --lmstudio-base http://127.0.0.1:1234/v1/chat/completions \
  --lmstudio-timeout 3600 \
  --daemon

Proxy support (optional)

Only set these if your network blocks the provider URLs:

export HTTP_PROXY=http://localhost:port
export HTTPS_PROXY=http://localhost:port
export NO_PROXY=127.0.0.1,localhost
uv run cc-adapter --model poe:claude-opus-4.5 --poe-api-key YOUR_POE_API_KEY

Run Claude Code

Point Claude Code to the adapter:

export ANTHROPIC_BASE_URL=http://127.0.0.1:8005
export ANTHROPIC_AUTH_TOKEN=dummy
export ANTHROPIC_API_KEY=
export NO_PROXY=127.0.0.1
export DISABLE_TELEMETRY=true
export DISABLE_COST_WARNINGS=true
export API_TIMEOUT_MS=600000
export CLAUDE_CODE_USE_BEDROCK=

claude

About

Lets Claude Code speak Anthropic /v1/messages to Poe, OpenRouter, OpenAI Codex subscription or LM Studio

Resources

License

Stars

Watchers

Forks

Languages