Files
ein-ai-proxy/CLAUDE.md
T

1.2 KiB

Ein AI Proxy - Project Context

Anthropic-compatible proxy that routes AI requests to multiple providers based on model name: sonnet→GLM-4.7 (Z.ai), opus→Anthropic, haiku→DeepSeek. .clinerules is a symlink to this file so Roo Code reads the same context.

File Structure

  • proxy.mjs - Main proxy server (zero dependencies, Node.js built-ins only)
  • config.json - API keys, auth token, and pricing (gitignored)
  • config.example.json - Template config
  • usage-data.json - Token usage tracking, auto-generated and gitignored
  • ein-ai-proxy.service - Systemd unit file
  • deploy.sh - Deployment and testing script
  • sync-context.sh - Syncs global context to Claude Code and Roo Code

Development

Run locally: node proxy.mjs (requires config.json) Test health endpoint: curl http://localhost:3100/health Check usage: curl http://localhost:3100/usage Zero npm dependencies — do not add any.

Deployment

On mini-server (ssh mini-server): cd ~/ai-proxy && git pull && sudo systemctl restart ein-ai-proxy View logs: sudo journalctl -u ein-ai-proxy -f

See Also

CONTEXT.md - Full infrastructure details (network, servers, Caddy, routing table)