diff --git a/README.md b/README.md index bc44392..976db3b 100644 --- a/README.md +++ b/README.md @@ -30,14 +30,15 @@ The proxy: | Client Sends | Provider | Rewrites To | Cost Model | |---|---|---|---| -| `claude-opus-4-6` | Anthropic (api.anthropic.com) | *unchanged* | Pay-per-token | -| `claude-sonnet-4-6` | Z.ai (api.z.ai) | `glm-4.7` | Flat rate subscription | -| `claude-sonnet-4-5` | Z.ai | `glm-4.7` | Flat rate subscription | -| `claude-haiku-4-5-*` | DeepSeek (api.deepseek.com) | `deepseek-chat` | Cheap per-token | +| `claude-opus-*` | Anthropic (api.anthropic.com) | *unchanged* | Pay-per-token | +| `claude-sonnet-*` | Z.ai (api.z.ai) | `glm-4.7` | Flat rate subscription | +| `claude-haiku-*` | DeepSeek (api.deepseek.com) | `deepseek-chat` | Cheap per-token | | `glm-4.7` | Z.ai | *unchanged* | Flat rate subscription | | `deepseek-chat` | DeepSeek | *unchanged* | Cheap per-token | | *anything else* | Z.ai | `glm-4.7` | Flat rate subscription | +The proxy matches exact model names first, then tries prefix matching (so dated variants like `claude-sonnet-4-5-20250929` are handled automatically). See `CONTEXT.md` for the full routing table with every explicit entry. + Z.ai and DeepSeek both expose Anthropic-compatible APIs natively, so the proxy only needs to rewrite the model name and auth headers — no response translation required. ## Setup @@ -87,9 +88,13 @@ npm run dev ### Deploy as a Service -The included `deploy.sh` script validates your config, tests the proxy, and installs a systemd service: +On mini-server (where the proxy runs), the `deploy.sh` script validates your config, tests the proxy, and installs a systemd service: ```bash +# SSH into mini-server first +ssh mini-server +cd ~/ai-proxy + chmod +x deploy.sh ./deploy.sh ``` @@ -258,6 +263,7 @@ scp global-claude-md/CLAUDE.md mini-server:~/.claude/CLAUDE.md | `proxy.mjs` | Main proxy server — zero npm dependencies, Node.js 18+ built-ins only | | `config.json` | API keys and auth token (**gitignored**, never commit) | | `config.example.json` | Template config — copy to `config.json` and fill in | +| `.gitignore` | Excludes `config.json`, `node_modules/`, and `*.log` | | `ein-ai-proxy.service` | Systemd unit file for running as a service | | `deploy.sh` | Deployment script — validates config, tests proxy, installs service | | `sync-context.sh` | Syncs global AI context to Claude Code and Roo Code |