dbardi

Claude Code Model Bridge — AI skill for Claude Code

AI community

Presents the Claude Code CLI as an OpenAI-compatible model endpoint.

How to install Claude Code Model Bridge

This entry records only its repository, not the path inside it, so there is no exact command to give. Open dbardi/claude-code-model-bridge and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Claude Code Model Bridge does

Presents the Claude Code CLI as an OpenAI-compatible model endpoint.

Alternatives in AI

  • Codex — openai-codex Adversarial code review, Codex CLI integration, cross-model analysis 9.6k ★
  • EchoBird — One-click install + model switch:Claude Code,Codex CLI (OpenAI), Grok Build (xAI), DeepSeek Harness, Kimi Code 3.1k ★
  • CliRelay — Self-hosted AI gateway for coding CLIs — one OpenAI/Claude/Gemini/Codex-compatible endpoint, with a multi-tena 1k ★

README

claude-code-model-bridge

Presents the Claude Code CLI to any OpenAI-compatible client as an ordinary model endpoint.

Requests arrive as normal chat completions. Each one is answered by running `claude -p`, so the work is billed to a Claude subscription rather than to API credits. The bridge refuses to start when an API key is present, so it cannot quietly spend anything else.

Claude Code's own tools stay off. It acts purely as a model: it requests tool calls, and the client that made the request runs them. An agent harness therefore keeps its own tools, permissions, memory and logging, and needs no changes to use this.

Requirements

  • Python 3.13 or newer, and uv
  • The Claude Code CLI, logged in (claude auth status should report a subscription)
  • No ANTHROPIC_API_KEY or ANTHROPIC_AUTH_TOKEN in the environment

Running it

uv sync
uv run claude-code-model-bridge

The bridge serves `http://127.0.0.1:8765/v1` and binds to loopback only.

Configuration comes from the environment:

Variable Default Meaning
CLAUDE_BRIDGE_HOST 127.0.0.1 Address to bind
CLAUDE_BRIDGE_PORT 8765 Port to bind
CLAUDE_BRIDGE_CATALOG the shipped models.yaml Path to a catalog file
CLAUDE_BRIDGE_MAX_CONCURRENT 4 How many calls may run at once
CLAUDE_BRIDGE_PLUGIN_DIR unset Directory of plugins whose skills the model may use

Installing it as a service

On a machine with systemd, `scripts/install.sh` installs the bridge as a user service that starts at boot and restarts if it stops.

./scripts/install.sh --check      # check prerequisites, change nothing
./scripts/install.sh              # install and start the service
./scripts/install.sh --uninstall  # stop and remove it

The script installs only the service. It never edits the configuration of whatever client will use the bridge, so a failed install cannot take your assistant offline; p