52227 3cc3219a90 docs: 更新中英文 README,完善模型配额查询与 Claude Code 适配说明
- 新增 Antigravity 账户额度与模型列表查询指南
- 完善 Claude Code 兼容性特性说明 (Thinking Signature, Zombie Stream Watchdog)
- 移除无关广告信息,优化文档结构
- 明确二开维护者信息
2026-01-05 23:07:04 +08:00
2025-11-25 20:38:52 +08:00
2025-12-20 01:40:41 +08:00
2025-08-10 19:09:56 +09:00
2025-12-12 11:38:31 +08:00
2025-07-14 18:32:47 +08:00
2025-11-22 18:41:24 +08:00
2025-12-19 10:25:43 +08:00
2025-12-19 10:25:43 +08:00

Claude Relay Service (Antigravity Edition)

Maintained fork by dadongwo.

This fork focuses on:

  • Native compatibility for claude (Claude Code CLI)
  • Antigravity OAuth integration + path-based routing
  • Better stability for streaming (SSE) workloads
  • Optional request/response dumps for debugging

Highlights

  • Claude Code protocol compatibility: thoughtSignature fallback + cache, tool_result passthrough, and message ordering fixes.
  • Antigravity OAuth: account type gemini-antigravity with permission checks.
  • Path-based routing (Anthropic Messages API):
    • /api -> Claude account pool (default)
    • /antigravity/api -> Antigravity OAuth account pool
    • /gemini-cli/api -> Gemini OAuth account pool
  • Stability:
    • Zombie stream watchdog (disconnect after 45s without valid data)
    • Auto retry + account switching for Antigravity 429 Resource Exhausted (streaming and non-streaming)
  • Observability: JSONL dumps for request/response/tools/upstream (with size limit + rotation)

Quick Start

Requirements

  • Node.js 18+ (or Docker)
  • Redis 6+/7+
cp .env.example .env
cp config/config.example.js config/config.js

# Edit .env at least:
# JWT_SECRET=... (random string)
# ENCRYPTION_KEY=... (32-char random string)

docker-compose up -d

Node (no Docker)

npm install
cp .env.example .env
cp config/config.example.js config/config.js
npm run setup
npm run service:start:daemon

Admin UI

  • URL: http://<host>:3000/web
  • Initial credentials: generated by npm run setup and saved to data/init.json (Docker users can also inspect container logs).

Using with Claude Code (CLI)

export ANTHROPIC_BASE_URL="http://<host>:3000/antigravity/api/"
export ANTHROPIC_AUTH_TOKEN="cr_xxxxxxxxxxxx"
export ANTHROPIC_MODEL="claude-opus-4-5"
claude

Gemini pool

export ANTHROPIC_BASE_URL="http://<host>:3000/gemini-cli/api/"
export ANTHROPIC_AUTH_TOKEN="cr_xxxxxxxxxxxx"
export ANTHROPIC_MODEL="gemini-2.5-pro"
claude

Standard Claude pool

export ANTHROPIC_BASE_URL="http://<host>:3000/api/"
export ANTHROPIC_AUTH_TOKEN="cr_xxxxxxxxxxxx"
claude

Antigravity Quota & Models

  • Quota display: in Admin UI -> Accounts -> gemini-antigravity -> click Test/Refresh.
  • Dynamic models list:
    • Anthropic/Claude Code routing: GET /antigravity/api/v1/models (proxies Antigravity fetchAvailableModels)
    • OpenAI-compatible routing: GET /openai/gemini/models (or GET /openai/gemini/v1/models)

Debug Dumps (optional)

See .env.example for the full list. Common toggles:

  • ANTHROPIC_DEBUG_REQUEST_DUMP=true
  • ANTHROPIC_DEBUG_RESPONSE_DUMP=true
  • ANTIGRAVITY_DEBUG_UPSTREAM_REQUEST_DUMP=true
  • ANTIGRAVITY_DEBUG_UPSTREAM_RESPONSE_DUMP=true
  • DUMP_MAX_FILE_SIZE_BYTES=10485760

License

This project is licensed under the MIT License.

Description
CRS-自建Claude Code镜像,一站式开源中转服务,让 Claude、OpenAI、Gemini、Droid 订阅统一接入,支持拼车共享,更高效分摊成本,原生工具无缝使用。
Readme MIT 77 MiB
Languages
JavaScript 62.6%
Vue 35%
Shell 1.6%
CSS 0.7%
Makefile 0.1%