From 49357f269920d1ad468de2aac9cbe54965e31e72 Mon Sep 17 00:00:00 2001 From: Dai Ha Date: Wed, 8 Jul 2026 16:01:01 +0200 Subject: [PATCH] Init claude-bridge: README + wiki submodule (AgentAPI approach) --- .gitmodules | 3 +++ README.md | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ wiki | 1 + 3 files changed, 53 insertions(+) create mode 100644 .gitmodules create mode 100644 README.md create mode 160000 wiki diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..936b387 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "wiki"] + path = wiki + url = ssh://git@git.ltms.dev:2224/lms/claude-bridge.wiki.git diff --git a/README.md b/README.md new file mode 100644 index 0000000..e735964 --- /dev/null +++ b/README.md @@ -0,0 +1,49 @@ +# claude-bridge + +A **subscription-safe bridge** that lets a primary **Claude Code (Opus 4.8, on Pro/Max)** +session drive a **secondary Claude agent running a different model** via its own +`ANTHROPIC_BASE_URL` — without ever putting a proxy on the primary session. + +Sibling of [`crush-bridge`](https://git.ltms.dev/systems/vms) (which drives a headless +**Crush** worker on GX10 DeepSeek). `claude-bridge` keeps the worker a *real Claude Code +process*, so it inherits `CLAUDE.md`, hooks, skills, and MCP — just pointed at a +cheaper/local model. + +## Leading approach — AgentAPI + +[`coder/agentapi`](https://github.com/coder/agentapi) wraps the Claude Code **CLI** as an +HTTP server (`POST /message`, `GET /messages`, `GET /events` SSE, `GET /status`). The +worker's model is whatever env its wrapped `claude` process launches with — so the worker +server runs with `ANTHROPIC_BASE_URL=https://ollama.ltms.dev` + a bearer token, and the +primary Opus session talks to it over HTTP. + +``` + Opus (Claude Code, subscription, env CLEAN) + │ HTTP POST /message ─┐ + ▼ ▼ + agentapi server ──launches──► claude (ANTHROPIC_BASE_URL=ollama.ltms.dev, worker model) + ▲ GET /events (SSE) ◄──┘ +``` + +- **Subscription boundary:** the *primary* never sets `ANTHROPIC_BASE_URL` (stays on + Pro/Max). Only the *secondary* process is off-subscription. +- **Different model per process** sidesteps Claude Code's lack of per-subagent provider + routing — the worker isn't a subagent, it's its own configured process. + +## Docs + +Full design, setup, and operations live in the **[wiki](https://git.ltms.dev/lms/claude-bridge/wiki)**, +vendored here as a submodule under [`wiki/`](./wiki): + +```bash +git clone --recurse-submodules ssh://git@git.ltms.dev:2224/lms/claude-bridge.git +# or, after a plain clone: +git submodule update --init +``` + +Edit docs in `wiki/`, then `cd wiki && git commit && git push` to publish them to the +Gitea wiki. + +## Status + +🟡 Planning — AgentAPI selected as the primary approach (2026-07-08). diff --git a/wiki b/wiki new file mode 160000 index 0000000..e973975 --- /dev/null +++ b/wiki @@ -0,0 +1 @@ +Subproject commit e973975ae81e3b6cdc92ab87016571b9a64546b2