Author Khrabrov created MyLLM — a subscription gateway (not API) that allows a team to use Claude Code, Grok Build and GPT in unison from the office, home or any location without the need to configure an encrypted tunnel and manage keys. The architecture is built on the principle of “one entry — many providers”: a request enters an internal endpoint, the gateway determines the target model by context or an explicit tag and proxies the call to the corresponding service. Unlike classic API proxies like LiteLLM, MyLLM works with subscriptions — it authorizes in the Anthropic, xAI and OpenAI web interfaces via cookies or session tokens, not API keys. This removes geo-restrictions: the web version of Claude Code and Grok are available from Russia, while official APIs are not.
Related: configured LiteLLM proxy on VPS
Related: local deployment approach for sensitive data
Subscription Gateway Architecture
MyLLM consists of three components: a core written in Go, a plugin for VS Code and a CLI utility. The core accepts requests in the OpenAI Chat Completions format, normalizes them and forwards them to the target provider. For Claude Code it uses the unofficial Anthropic Console protocol — the gateway emulates a browser, maintains a session and processes streaming responses. Grok Build integrates via the xAI Console API, GPT — via ChatGPT web session. All three directions work in parallel, load balancing is configured via YAML config: you can set model priority, fallback on 429 error or timeout, token limits per session.
The VS Code plugin adds a model selection panel in the side panel and intercepts calls to the built-in Copilot Chat, redirecting them to MyLLM. CLI (`myllm`) allows launching generation from the terminal, CI/CD scripts and agent pipelines. Flags `–model`, `–temperature`, `–max-tokens`, `–stream` and reading prompt from stdin are supported. The author states that the gateway has withstood load from a team of 8 developers: 1200 requests per day, peak 15 RPS, average latency 1.2 s to first token on Claude 3.5 Sonnet.
Comparison with API Proxies and Direct Calls
Classic approach — use OpenRouter, LiteLLM or direct API calls — requires valid keys and often gets blocked by geo-IP. MyLLM bypasses this by working at the web session level: cookies `sessionKey` at Anthropic live up to 30 days, xAI tokens — 7 days, ChatGPT sessions — until auth-token expires. The gateway automatically renews them via headless login on 401/403. The cost of the matter is Pro/Max subscriptions on each account ($20-200/mo), without per-token payment. For a team this is cheaper than API at high load: 8 people × $20 = $160/mo vs ~$500-1000 for equivalent volume via API.
There are also limitations. Web interface rate limits are strict: Claude web version allows ~100 messages per 5 hours, Grok — 50 requests per hour, GPT-4o — by account tier limits. MyLLM implements local queue with exponential backoff and fallback to a reserve model on 429. Also, access to system prompt API is lost (e.g., `tools` in Anthropic API) — web version does not give full control over tool calling. The author solves this by injecting instructions into the user prompt.
Practical Team Onboarding
Deployment takes 15 minutes: `docker run -d -p 8080:8080 -v ./config:/config myllm/core:latest`. Config describes the account pool (email:password or exported cookies), tag-to-model mapping (`@claude` → `claude-3-5-sonnet`, `@grok` → `grok-2`, `@gpt` → `gpt-4o`), limits and fallbacks. The VS Code plugin installs from .vsix, CLI — `go install github.com/myllm/cli@latest`. After launch, a developer types in chat `@claude refactor this module` — the request goes to MyLLM, which selects a free Anthropic account, proxies and streams the response back to the editor.
For production the author recommends: move account credentials to a secret manager (HashiCorp Vault or 1Password CLI), enable request logging to ClickHouse for cost audit, configure alerts in Grafana on metrics `myllm_requests_total`, `myllm_latency_seconds`, `myllm_errors_total`. A sample dashboard and Prometheus rules are in the repository. It also makes sense to pair MyLLM with a configured LiteLLM proxy on VPS for a hybrid scheme: web sessions for region-blocked models, API keys — for the rest.
Security and Data Isolation
The main risk is prompt leakage via provider accounts. MyLLM does not log request bodies by default, only metadata (model, tokens, latency, status). The author advises: use dedicated accounts for the team, not shared with personal ones; enable 2FA everywhere; regularly rotate passwords and restart containers to clear cookies. For highly sensitive codebases — run the gateway in an isolated VPC without outbound internet, except for target domains `console.anthropic.com`, `console.x.ai`, `chat.openai.com`. This aligns with the local deployment approach for sensitive data described in our review.
CI/CD integration: in GitHub Actions a step `uses: myllm/action@v1` is added with parameters `model`, `prompt-file`, `output-file`. This allows generating documentation, tests and code review in the pipeline without storing keys in repo secrets — only access to the MyLLM endpoint. An example workflow for automated PR review is in the project wiki.
Useful resources: Anthropic API documentation, Grok — Wikipedia.
Practical checklist for MyLLM rollout: • Provision 3-5 Anthropic Pro subscriptions ($20/mo) and 2-3 xAI/ChatGPT Plus accounts. • Deploy gateway on dedicated VPS (2 vCPU, 4 GB RAM). • Export cookies via EditThisCookie to /config/cookies.json. • Configure config.yaml with account pool and limits. • Install VS Code plugin via shared .vsix. • Configure Prometheus monitoring with alert on errors. • Add MYLLM_ENDPOINT secret for CI/CD.

