[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-80275":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":16,"stars7d":15,"stars30d":17,"stars90d":16,"forks30d":16,"starsTrendScore":16,"compositeScore":18,"rankGlobal":10,"rankLanguage":10,"license":19,"archived":20,"fork":20,"defaultBranch":21,"hasWiki":22,"hasPages":20,"topics":23,"createdAt":10,"pushedAt":10,"updatedAt":33,"readmeContent":34,"aiSummary":35,"trendingCount":16,"starSnapshotCount":16,"syncStatus":14,"lastSyncTime":36,"discoverSource":37},80275,"claude-code-provider-gateway","danielalves96\u002Fclaude-code-provider-gateway","danielalves96","The easiest way to use Claude Code with any LLM. Install the app, pick your provider, done.","",null,"TypeScript",68,9,2,1,0,4,43.9,"MIT License",false,"master",true,[24,25,26,27,28,29,30,31,32],"claude-ai","claude-code","free-claude-code","linux","macos","multi-agent","multi-provider","open-source","windows","2026-06-12 04:01:27","\u003Cdiv align=\"center\">\n\n# Claude Code Provider Gateway\n\n**Claude Code, your provider, one local desktop gateway.**\n\nRun Claude Code through OpenAI Account, GitHub Copilot, OpenRouter, DeepSeek, Groq, xAI, Mistral, GLM, Minimax, Command Code, Ollama, LM Studio, llama.cpp, custom OpenAI\u002FAnthropic-compatible endpoints, and many other providers, while keeping the Claude Code workflow intact.\n\n[![Version](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fv0.2-early_release-111827?style=for-the-badge)](#status)\n[![License](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Flicense-MIT-22c55e?style=for-the-badge)](LICENSE)\n[![Desktop App](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fdesktop_app-Tauri-24c8db?style=for-the-badge)](packages\u002Fdesktop)\n[![Providers](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fproviders-40%2B-2563eb?style=for-the-badge)](#supported-providers)\n\u003Cbr \u002F>\n[![Platforms](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FmacOS%20%7C%20Windows%20%7C%20Linux-supported-f97316?style=for-the-badge)](#system-requirements)\n[![No Telemetry](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Ftelemetry-none-0f172a?style=for-the-badge)](#pricing)\n[![Open Source](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fopen_source-MIT-16a34a?style=for-the-badge)](#license)\n\n**Free, open source, and local-first.**\n\n**[Website](https:\u002F\u002Fccpg.live)** · **[Documentation](https:\u002F\u002Fccpg.live\u002Fdocs)** · **[Download](https:\u002F\u002Fccpg.live\u002Fdownload)**\n\n\u003C\u002Fdiv>\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\".github\u002Fassets\u002Fhome.png\" alt=\"Claude Code Provider Gateway desktop app demo\" width=\"95%\" \u002F>\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n  \u003Ca href=\"docs\u002FAPP_SCREENS.md\">View app screens\u003C\u002Fa>\n\u003C\u002Fp>\n\n---\n\n## What This Is\n\nClaude Code Provider Gateway, or CCPG, is a desktop app that starts a local gateway on your machine. Claude Code talks to the Anthropic-compatible proxy surface, while external tools can use the OpenAI-compatible `\u002Fv1` surface. The gateway routes each request to the provider and model you configured, translates protocols when needed, and streams the result back in the caller's expected format.\n\n```text\nClaude Code -> CCPG desktop app -> local proxy -> your selected LLM provider\n```\n\nYou keep Claude Code's agent loop, tool use, project context, custom commands, hooks, MCP servers, and IDE workflow. You choose the model backend.\n\nCCPG is not an npm package for end users. It is built to be downloaded, opened, configured in a UI, and left running as a desktop app.\n\n## Why It Exists\n\nClaude Code is one of the best AI coding tools available, but the default experience keeps you tied to one provider, one model catalog, and one pricing model.\n\nCCPG gives you the missing control layer:\n\n- Use cheaper models for routine edits.\n- Use stronger reasoning models when the task deserves it.\n- Run local models for sensitive code.\n- Use Copilot or OpenAI Account auth from a desktop UI.\n- See what Claude Code is actually sending in the background.\n\nEverything runs locally. There is no hosted CCPG service, no telemetry, no account system, and no gateway markup. The app is MIT licensed, open source, and designed to run locally.\n\n## TL;DR\n\n1. Download the desktop installer for your OS.\n2. Open CCPG. The daemon starts automatically.\n3. Add one built-in or custom provider in **Providers** and click **Test**.\n4. Install the `ccpg` shell command from **Dashboard -> Shell Setup**.\n5. Launch Claude Code:\n\n```bash\nccpg --\u003Cprovider>\n```\n\n> [!WARNING]\n> If your `.claude\u002Fsettings.json` or `.claude\u002Fsettings.local.json` has an `env` block with `ANTHROPIC_AUTH_TOKEN` or `ANTHROPIC_BASE_URL`, **remove those entries before launching via `ccpg`**. Those env vars override the gateway endpoint and prevent CCPG from routing requests correctly.\n\nAfter that, switch providers per session:\n\n```bash\nccpg --OpenRouter\nccpg --OpenAIAccount\nccpg --Copilot\nccpg --Ollama\nccpg --all\nccpg --ModelChain\nccpg --my-chain\n```\n\n## Status\n\nCCPG is an early release, feedback is welcome, and it is already usable for testing.\n\nv0.1 is available now with desktop installers for macOS, Linux, and Windows.\nExpect rough edges, but the core flow is ready:\n\ninstall app → add provider → test connection → run Claude Code through CCPG.\n\nThe production path is desktop-only: users should not need Node.js, npm, Rust, Bun, or hand-edited terminal config.\n\nThe official documentation is at **[ccpg.live\u002Fdocs](https:\u002F\u002Fccpg.live\u002Fdocs)**. The repo also keeps the full Markdown docs in [`docs\u002F`](docs\u002FREADME.md) if you prefer reading them here:\n\n- [Getting Started](docs\u002FGETTING-STARTED.md)\n- [Providers](docs\u002FPROVIDERS.md)\n- [Configuration](docs\u002FCONFIGURATION.md)\n- [Architecture](docs\u002FARCHITECTURE.md)\n- [API Reference](docs\u002FAPI_REFERENCE.md)\n- [Development](docs\u002FDEVELOPMENT.md)\n- [Troubleshooting](docs\u002FTROUBLESHOOTING.md)\n\n## Features\n\n- **Desktop app, not a terminal science project** - Tauri app for macOS, Windows, and Linux with provider setup, connection tests, routing, logs, and history in one UI.\n- **Built-in and custom provider cards** - OAuth, API key, cloud, local, and coming-soon providers out of the box, plus user-created OpenAI-compatible and Anthropic-compatible providers with custom slugs and logos.\n- **Anthropic-compatible local proxy** - Claude Code sends Anthropic Messages API requests to `127.0.0.1`; CCPG translates and routes them.\n- **OpenAI-compatible local gateway** - Tools such as Cursor, Codex, OpenAI SDK clients, and other OpenAI-compatible apps can point at `http:\u002F\u002F127.0.0.1:49250\u002Fv1` and use `\u002Fv1\u002Fmodels` plus `\u002Fv1\u002Fchat\u002Fcompletions` with the same enabled providers.\n- **Full streaming** - provider responses stream back as Anthropic-style SSE events, with upstream cancellation when the client disconnects.\n- **Model routing** - map Claude tiers like `opus`, `sonnet`, and `haiku` to different providers and models.\n- **All-providers mode** - aggregate enabled providers into one model catalog and choose by model in Claude Code.\n- **Model Chains** - create custom fallback chains from active provider models. A chain tries models in priority order, retries transient failures, and moves to the next model when an upstream provider fails, rate limits, idles before emitting useful content, or returns an empty\u002Fmalformed stream.\n- **Built-in OAuth** - OpenAI Account uses PKCE OAuth. GitHub Copilot and Kilo Code use Device Flow. Cline uses browser authorization. Tokens refresh automatically where supported.\n- **Provider management UI** - search providers, filter active\u002Finactive cards, add custom OpenAI\u002FAnthropic-compatible providers, favorite and reorder frequently used providers, edit runtime limits\u002Fmanual model lists, and hide noisy discovered models.\n- **Model Chain timeout controls** - tune request, first-token, and total stream limits per chain from Advanced Settings. Defaults are 30s to first useful token and 60s total stream.\n- **Token savers** - Optional RTK-style tool-result compression and Caveman terse-response mode from Settings.\n- **Outbound proxy support** - Configure an HTTP\u002FHTTPS proxy in Settings so the daemon routes external requests (OAuth, provider API calls) through your network proxy. Required for users in regions where providers restrict direct access.\n- **Local model support** - Ollama, LM Studio, and llama.cpp run through the same Claude Code flow.\n- **Request history** - see model, provider, human-readable prompt, sanitized provider request preview, response preview, warnings, input tokens, latency, errors, and session totals.\n- **Parallel terminal sessions** - launch multiple `ccpg --\u003Cprovider>` terminals at once; each session keeps its own provider\u002Fmodel mode, primary model memory, heartbeat, and live request log.\n- **Provider safeguards** - per-provider concurrency\u002Frate limits are enforced by the daemon before dispatch, and canceled Claude Code requests abort in-flight upstream calls.\n- **Encrypted secrets** - API keys, OAuth tokens, and gateway auth token are split out of config and stored with AES-256-GCM.\n- **No telemetry** - no cloud service, no database server, no analytics, no account.\n\n## The Hidden Prompt Viewer\n\nEver wonder what Claude Code is actually sending to the API?\n\nCCPG logs each request Claude Code sends through the gateway, including background calls that do not appear as normal chat messages. In the History UI you can inspect:\n\n- the requested model and routed provider model\n- the human-readable serialized prompt, including the first request's system prompt\n- the sanitized provider request preview after routing, token savers, and provider conversion\n- tool-use traffic that appears in the message stream\n- input token count\n- latency to first byte\n- provider errors\n- conversion warnings for provider-specific feature drops\u002Ftranslations\n- captured response text preview\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\".github\u002Fassets\u002Flogs.png\" alt=\"CCPG History UI showing prompt, response, token count, latency, and routed provider model\" width=\"95%\" \u002F>\n\u003C\u002Fp>\n\nThis is useful for debugging cost, understanding why a model behaved a certain way, and seeing background housekeeping calls that otherwise feel invisible.\n\n## Token Savers\n\nCCPG includes two optional local token-saving features in **Settings -> Token Savers**:\n\n| Feature | What it does | Best for |\n|---|---|---|\n| RTK compression | Compacts large `tool_result` payloads before the request reaches the provider. | Big `rg`, `git diff`, `git status`, `find`, `ls`, `tree`, numbered file dumps, and repetitive logs. |\n| Caveman mode | Injects terse-response guidance into the system prompt. | Reducing response verbosity and output tokens. |\n\nRTK does not change normal chat messages or errored tool results. If a request has no large tool output, there may be nothing to compress. When RTK does compress something, the daemon log records a line with bytes saved and the filter used.\n\nCaveman is different: it does not reduce input tokens. It asks the model to answer more tersely, with levels `lite`, `full`, and `ultra`.\n\n## How `ccpg --all` Works\n\n`ccpg --all` is not round-robin and it does not randomly pick a provider.\n\nWhen you launch with `--all`, CCPG enables model discovery across every provider you turned on in the app. Claude Code's model picker sees gateway-prefixed model IDs such as:\n\n```text\nanthropic\u002Fopenrouter\u002Fanthropic\u002Fclaude-sonnet-4.5\nanthropic\u002Fdeepseek\u002Fdeepseek-chat\nanthropic\u002Follama\u002Fqwen2.5-coder\n```\n\nWhen Claude Code sends a request for one of those models, CCPG reads the provider prefix and routes the request to that provider and model. If Claude Code later sends background requests using hardcoded Claude tier names, CCPG remembers the primary provider-prefixed model selected in the session and routes those background calls there too.\n\nUse `--all` when you want to choose models from multiple providers inside one Claude Code session. Use `ccpg --DeepSeek`, `ccpg --OpenRouter`, or another single-provider flag when you want a simpler model list.\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\".github\u002Fassets\u002Fclaude_models.png\" alt=\"Claude Code \u002Fmodel picker showing gateway-provided models\" width=\"90%\" \u002F>\n\u003C\u002Fp>\n\n## How Model Chains Work\n\nModel Chains let you create user-defined gateway models from the panel. Open\n**Model Chains**, create a chain with a name and `chain-slug`, then add models from\nactive providers and enabled model lists. The order in the chain is the runtime\npriority.\n\nClaude Code sees each chain as a single custom model:\n\n```text\n{Chain Name} · Gateway:custom-model (Defined by user)\n```\n\nInternally, the daemon exposes the model as `anthropic\u002Fchain\u002F\u003Cslug>`. When a\nrequest hits that chain, CCPG calls the first target model. If the provider\nreturns an API error, rate limit, credit\u002Fquota failure, network failure, or a\n200 response whose stream ends, idles, errors, or parses without useful\nAnthropic content before any answer content is emitted, CCPG retries that\ntarget and then moves to the next target in the chain. Once useful content has\nbeen emitted, CCPG keeps the stream attached to that provider and does not\nrewind partial answers. If the upstream stream fails after content has started,\nCCPG closes open content blocks and emits a terminal Anthropic-compatible error\nframe before stopping the message. The session stays attached to the chain, so Claude Code\nbackground tier calls continue through the same chain instead of leaking back\nto the first provider.\n\nThe Model Chain page also includes an **Economy\u002FLocal** preset. It builds a\nHaiku -> DeepSeek -> Ollama-style waterfall from the providers and models you\nalready have enabled\u002Fconfigured, skipping unavailable entries instead of\nrequiring Anthropic-native Claude.\n\nEach chain has optional **Advanced Settings** for fallback timing. Request\ntimeout controls how long CCPG waits for response headers, first-token timeout\ncontrols how long a target may stall before useful Anthropic content, and total\nstream timeout caps one chain attempt. Empty fields use the defaults: 60s\nrequest, 30s first token, and 60s total stream.\n\nLaunch modes:\n\n| Command | What Claude Code sees |\n|---|---|\n| `ccpg --\u003Cchain-slug>` | Only that Model Chain. |\n| `ccpg --ModelChain` | All enabled Model Chains, and no provider models. |\n| `ccpg --all` | Enabled Model Chains plus all enabled provider models. |\n\nUse a single `chain-slug` when you want one controlled fallback path. Use\n`--ModelChain` when you want Claude Code's model picker to show every enabled\nchain.\n\n## Supported Providers\n\n### OAuth\n\n| Provider | Auth | Notes |\n|---|---|---|\n| OpenAI Account | OAuth PKCE | Uses your OpenAI account session from the desktop app. |\n| GitHub Copilot | OAuth Device Flow | Uses Copilot model access available to your GitHub account. |\n| Kilo Code | OAuth Device Flow | Uses a Kilo Code account token and organization id when provided. |\n| Cline | OAuth authorization code | Uses the Cline account flow and refreshes tokens when possible. |\n| Kiro AI | OAuth placeholder | Visible as coming soon; the OAuth flow is not implemented yet. |\n| iFlow AI | OAuth placeholder | Visible as coming soon; the OAuth flow is not implemented yet. |\n\n### API Key Cloud\n\n| Provider | Auth | Notes |\n|---|---|---|\n| OpenRouter | API key | Broad model catalog through one provider. |\n| DeepSeek | API key | Anthropic-compatible endpoint. |\n| NVIDIA NIM | API key | OpenAI-compatible endpoint, translated by CCPG. |\n| Kimi (Moonshot) | API key | OpenAI-compatible endpoint, translated by CCPG. |\n| Google AI (Gemini) | API key | OpenAI-compatible Gemini endpoint, translated by CCPG. |\n| Groq, xAI, Mistral, Cerebras, Together AI, Fireworks AI | API key | OpenAI-compatible endpoints, translated by CCPG. |\n| GLM, GLM China, SiliconFlow, Hyperbolic, Chutes AI, Perplexity, Nebius AI | API key | Regional and aggregator providers with model prefix routing. |\n| Volcengine Ark, BytePlus ModelArk, Alibaba Bailian, Alibaba Bailian Intl | API key | OpenAI-compatible regional cloud providers. |\n| Minimax, Minimax China | API key | Anthropic-compatible endpoints. |\n| OpenCode Go, Xiaomi MiMo, Xiaomi MiMo Token Plan, Cohere, Blackbox AI, HuggingFace Router, Ollama Cloud | API key | Additional hosted model catalogs. |\n| Command Code | API key | Custom provider transport that converts AI SDK v5 NDJSON streams into Anthropic SSE. |\n| Custom OpenAI\u002FAnthropic compatible | API key | Add self-hosted or third-party compatible endpoints from the Providers tab with a custom slug, base URL, optional PNG\u002FWebP logo, and manual models when discovery is unavailable. |\n\n### Local\n\n| Provider | Default URL | Notes |\n|---|---|---|\n| Ollama | `http:\u002F\u002Flocalhost:11434` | Pull models in Ollama, then select them in CCPG. |\n| LM Studio | `http:\u002F\u002Flocalhost:1234\u002Fv1` | Load a local model and enable the server. |\n| llama.cpp | `http:\u002F\u002Flocalhost:8080\u002Fv1` | Run the llama.cpp server locally. |\n\n### Anthropic Passthrough\n\nCCPG can also pass native Claude requests through to Anthropic when credentials are available. This is useful when you want Claude models and non-Anthropic models in the same gateway workflow.\n\nSee [docs\u002FPROVIDERS.md](docs\u002FPROVIDERS.md) for the complete provider ID list, CLI flags, auth behavior, and contributor notes.\n\n## System Requirements\n\n### For Users\n\n| Platform | Release format | Notes |\n|---|---|---|\n| macOS Apple Silicon | `.dmg` | Built by CI for `aarch64-apple-darwin`. |\n| macOS Intel | `.dmg` | Built by CI for `x86_64-apple-darwin`. |\n| Linux x86_64 | `.deb`, `.rpm`, `.AppImage` | CI builds on Ubuntu 22.04 with WebKitGTK dependencies. |\n| Linux ARM64 | `.deb`, `.rpm`, `.AppImage` | CI builds on Ubuntu 22.04 ARM. |\n| Windows x86_64 | `.msi`, `-setup.exe` | Windows WebView2 is required; it ships with modern Windows 10\u002F11 through Windows Update. |\n\nYou also need Claude Code installed and able to run from your shell as `claude`.\n\n### For Source Development\n\nSource development needs Node.js, npm workspaces, Bun, Rust, and Tauri system dependencies. See [docs\u002FDEVELOPMENT.md](docs\u002FDEVELOPMENT.md).\n\n## Install\n\nDownload the latest desktop build from:\n\n**[ccpg.live\u002Fdownload](https:\u002F\u002Fccpg.live\u002Fdownload)** — or directly from [GitHub Releases](https:\u002F\u002Fgithub.com\u002Fdanielalves96\u002Fclaude-code-provider-gateway\u002Freleases)\n\nThen:\n\n1. Open the app.\n2. Add or log into at least one provider.\n3. Test the provider connection.\n4. Install the `ccpg` shell command from Dashboard -> Shell Setup.\n5. Relaunch your shell.\n6. Start Claude Code through CCPG.\n\n```bash\nccpg --DeepSeek # Or other configured provider\n```\n\n> [!WARNING]\n> If your `.claude\u002Fsettings.json` or `.claude\u002Fsettings.local.json` has an `env` block containing `ANTHROPIC_AUTH_TOKEN` or `ANTHROPIC_BASE_URL`, **remove those entries**. They override the gateway endpoint and prevent CCPG from intercepting Claude Code's requests.\n\nAny arguments after the provider flag are passed to Claude Code:\n\n```bash\nccpg --DeepSeek --resume \u003Csession-id>\nccpg --OpenRouter --dangerously-skip-permissions\nccpg --Ollama --continue\n```\n\n## Provider Flags\n\n| Flag | Mode |\n|---|---|\n| `--OpenAIAccount` | OpenAI Account models |\n| `--Copilot` or `--GitHubCopilot` | GitHub Copilot models |\n| `--OpenRouter` | OpenRouter models |\n| `--DeepSeek` | DeepSeek models |\n| `--NvidiaNim` | NVIDIA NIM models |\n| `--Kimi` | Kimi models |\n| `--Google` or `--GoogleAI` | Google AI (Gemini) models |\n| `--Ollama` | Ollama local models |\n| `--LMStudio` | LM Studio local models |\n| `--LlamaCpp` | llama.cpp local models |\n| `--Groq` | Groq models |\n| `--XAI` or `--Grok` | xAI models |\n| `--Mistral` | Mistral models |\n| `--Cerebras` | Cerebras models |\n| `--Together` | Together AI models |\n| `--Fireworks` | Fireworks AI models |\n| `--GLM` or `--ZAI` | GLM models |\n| `--SiliconFlow` | SiliconFlow models |\n| `--Hyperbolic` | Hyperbolic models |\n| `--Chutes` | Chutes AI models |\n| `--Perplexity` | Perplexity models |\n| `--Nebius` | Nebius AI models |\n| `--GLMCN` | GLM China models |\n| `--VolcengineArk` or `--Ark` | Volcengine Ark models |\n| `--BytePlus` | BytePlus ModelArk models |\n| `--Alicode` or `--Bailian` | Alibaba Bailian models |\n| `--AlicodeIntl` | Alibaba Bailian Intl models |\n| `--Minimax` | Minimax models |\n| `--MinimaxCN` | Minimax China models |\n| `--OpenCodeGo` | OpenCode Go models |\n| `--XiaomiMimo` or `--MiMo` | Xiaomi MiMo models |\n| `--XiaomiTokenPlan` | Xiaomi MiMo Token Plan models |\n| `--Cohere` | Cohere models |\n| `--Blackbox` | Blackbox AI models |\n| `--HuggingFace` or `--HF` | HuggingFace Router models |\n| `--OllamaCloud` | Ollama Cloud models |\n| `--KiloCode` | Kilo Code models |\n| `--Cline` | Cline models |\n| `--Kiro` | Kiro AI placeholder |\n| `--IFlow` | iFlow AI placeholder |\n| `--CommandCode` | Command Code models |\n| `--all` or `--a` | All enabled providers in one model catalog |\n| `--ModelChain`, `--ModelChains`, or `--chains` | All enabled Model Chains |\n| `--\u003Cchain-slug>` | One enabled Model Chain with the matching slug |\n| `--\u003Ccustom-provider-slug>` | One user-created custom provider with the matching slug |\n\nFlags are case-insensitive in the shell setup flow.\n\n## Pricing\n\nCCPG is free, open source, and runs locally.\n\nThere is no hosted CCPG bill. You only pay whatever your selected upstream provider charges, or nothing when you use a local provider. CCPG does not add a per-request fee and does not proxy traffic through a hosted CCPG server.\n\n## Comparison\n\nThis table is about product focus, not a claim that other projects are bad. Terminal-first routers are great for technical users. CCPG is trying to make provider switching feel like a desktop product.\n\n| Capability | CCPG | LiteLLM | claude-code-router |\n| --- | --- | --- | --- |\n| **Install path** | Desktop installer | `pip install` + config file | `npm install` + config file |\n| **User interface** | Desktop app | Web admin + terminal | Terminal-first + basic web UI |\n| **Session history** | ✅ Full UI with prompt\u002Fresponse preview | ⚠️ Opt-in via `store_prompts_in_spend_logs` | ❌ Plaintext log files only |\n| **Per-request token visibility** | ✅ Yes, in history UI | ✅ Yes, in admin UI | ❌ No |\n| **Background prompt visibility** | ✅ Yes | ❌ No | ❌ No |\n| **OpenAI Account OAuth** | ✅ Built-in PKCE | ❌ Manual \u002F custom | ❌ Manual \u002F custom |\n| **GitHub Copilot OAuth** | ✅ Built-in Device Flow | ❌ Manual \u002F custom | ❌ Manual \u002F custom |\n| **Kilo Code OAuth** | ✅ Built-in Device Flow | ❌ No | ❌ No |\n| **Cline OAuth** | ✅ Built-in authorization code | ❌ No | ❌ No |\n| **Local model support** | ✅ Ollama, LM Studio, llama.cpp | ✅ Yes | ✅ Yes |\n| **Model Chains \u002F fallback routing** | ✅ Declarative UI, retry + next-model | ✅ Declarative config, error-type chains | ⚠️ Custom JS scripting only |\n| **All-providers aggregation** | ✅ `--all` flag, unified model picker | ⚠️ API-level `\u002Fmodels` list, no UI picker | ❌ No |\n| **Model tier routing** | ✅ Map opus\u002Fsonnet\u002Fhaiku to any model | ✅ `model_group_alias` + router config | ✅ Slot-based (default\u002Fthink\u002Fbackground\u002Flong) |\n| **Parallel terminal sessions** | ✅ Per-session isolation, routing + logs | ⚠️ Concurrent connections, no session isolation | ⚠️ Stateless, no per-session tracking |\n| **Token saver \u002F compression** | ✅ RTK tool-result compression + Caveman mode | ✅ `compress()` SDK + `\u002Fresponses\u002Fcompact` | ❌ No |\n| **Outbound proxy support** | ✅ HTTP\u002FHTTPS proxy in Settings UI | ✅ Via `HTTPS_PROXY` env var | ✅ Via `PROXY_URL` in config |\n| **Provider management UI** | ✅ Search, test, favorite, custom logos | ✅ Admin dashboard (add\u002Fedit\u002Fdelete) | ⚠️ Config editor UI, no provider lifecycle |\n| **Secrets storage** | ✅ AES-256-GCM encrypted store | ✅ Encrypted via `LITELLM_MASTER_KEY` | ❌ Env variable interpolation only |\n| **Windows support** | ✅ `.msi` \u002F `-setup.exe` native installer | ⚠️ Docker or `pip install` | ✅ npm package (Node 18+) |\n| **ARM64 \u002F Apple Silicon support** | ✅ Native `.dmg` and Linux ARM builds | ⚠️ pip works natively; Docker ARM images are secondary | ✅ Native via Node.js |\n| **No-install desktop experience** | ✅ Download and open | ❌ CLI \u002F Docker setup required | ❌ CLI setup required |\n| **Non-technical user focus** | ✅ First-class | ❌ Not the primary target | ❌ Not the primary target |\n\n## How It Works\n\n```text\n┌────────────────┐     ┌───────────────────────────────────┐     ┌─────────────────┐\n│  Claude Code   │     │   Claude Code Provider Gateway    │     │  OpenRouter     │\n│                │────▶│  ┌─────────────────────────────┐  │────▶│  DeepSeek       │\n│                │◀────│  │ Proxy :49250                │  │◀────│  OpenAI Account │\n│  Anthropic     │ SSE │  │ \u002Fv1\u002Fmessages -> translate   │  │     │  Copilot        │\n│  Messages API  │     │  │ \u002Fv1\u002Fchat\u002Fcompletions         │  │     │  Ollama         │\n│  or OpenAI API │     │  │ \u002Fv1\u002Fmodels   -> aggregate   │  │     │                 │\n└────────────────┘     │  └─────────────────────────────┘  │     │  ...            │\n                       │  ┌─────────────────────────────┐  │     └─────────────────┘\n                       │  │ Desktop Management UI       │  │\n                       │  │ Providers · Routing          │  │\n                       │  │ Model Chain · OpenAI Gateway │  │\n                       │  │ History · Logs · Shell Setup  │  │\n                       │  └─────────────────────────────┘  │\n                       └───────────────────────────────────┘\n```\n\nEvery request goes through the same basic flow:\n\n1. Claude Code sends `POST \u002Fv1\u002Fmessages` to CCPG's local proxy.\n2. CCPG authenticates the local request with its generated gateway token.\n3. CCPG resolves the target provider and model from the selected launch mode, model prefix, or routing rules.\n4. CCPG applies enabled token savers to the request.\n5. CCPG converts Anthropic Messages to the provider's native format when needed.\n6. CCPG streams the response back as Anthropic-compatible SSE.\n7. CCPG records session metadata and request details locally.\n\n## Runtime Storage\n\nRuntime files live in:\n\n- Linux\u002FmacOS: `~\u002F.config\u002Fclaude-code-provider-gateway\u002F`\n- Windows: `%APPDATA%\u002Fclaude-code-provider-gateway\u002F`\n\n| File | Purpose |\n|---|---|\n| `config.json` | Non-sensitive provider settings, routing rules, Model Chains, token saver settings, ports, and model mode. |\n| `secrets.enc.json` | API keys, OAuth tokens, and auth token encrypted with AES-256-GCM. |\n| `secret.key` | Local master key, unless `CC_GATEWAY_SECRET_KEY` is provided. |\n| `provider-logos\u002F` | Uploaded PNG\u002FWebP logos for user-created custom providers. |\n| `daemon.pid` | PID marker used by the daemon and desktop supervisor. |\n| `daemon.log` | Local daemon log file. May include provider errors and request diagnostics. |\n| `current-session.json` | Active session checkpoints for currently running `ccpg` launches. |\n| `sessions.jsonl` | Completed session archive, capped to 200 sessions. |\n\n## Documentation\n\nThe full documentation is available at **[ccpg.live\u002Fdocs](https:\u002F\u002Fccpg.live\u002Fdocs)**. The Markdown sources are also kept in this repo under [`docs\u002F`](docs\u002FREADME.md) as a local alternative.\n\n| Document | Use it for |\n|---|---|\n| [Documentation Hub](docs\u002FREADME.md) | The complete docs map and reading paths for users, contributors, and maintainers. |\n| [App Screens](docs\u002FAPP_SCREENS.md) | Preview the desktop app UI before installing it. |\n| [Getting Started](docs\u002FGETTING-STARTED.md) | Install the desktop app, configure a provider, and launch Claude Code through `ccpg`. |\n| [Providers](docs\u002FPROVIDERS.md) | Provider catalog, auth modes, CLI flags, model discovery, Model Chains, and panel behavior. |\n| [Configuration](docs\u002FCONFIGURATION.md) | Config file shape, environment variables, defaults, secrets, and runtime storage. |\n| [Architecture](docs\u002FARCHITECTURE.md) | System layers, request lifecycle, routing, provider transports, security model, and storage. |\n| [Panel Features](docs\u002FPANEL_FEATURES.md) | Management UI feature modules and frontend organization. |\n| [API Reference](docs\u002FAPI_REFERENCE.md) | Local proxy and panel endpoints used by Claude Code, the desktop UI, and shell setup. |\n| [Daemon Reference](docs\u002FDAEMON_REFERENCE.md) | Backend module reference for the proxy, panel API, providers, sessions, and observability. |\n| [Adding a Provider](docs\u002FADDING_PROVIDER.md) | Checklist and implementation patterns for new provider support. |\n| [Codebase Guide](docs\u002FCODEBASE_GUIDE.md) | Repository structure, conventions, extension points, and verification checklist. |\n| [Development](docs\u002FDEVELOPMENT.md) | Source setup, desktop dev, tests, builds, release flow, and package scripts. |\n| [Testing](docs\u002FTESTING.md) | Test runner, layout, commands, coverage expectations, and CI integration. |\n| [Troubleshooting](docs\u002FTROUBLESHOOTING.md) | Practical fixes for launch, provider, OAuth, proxy, Model Chain, history, and build issues. |\n| [Maintenance Notes](docs\u002FMAINTENANCE.md) | Known limitations, fragile areas, and maintenance review checklists. |\n| [Contributing](CONTRIBUTING.md) | Issues, PRs, conventions, and contribution workflow. |\n| [Security](SECURITY.md) | Local threat model and vulnerability reporting. |\n| [Changelog](CHANGELOG.md) | Release notes. |\n\n## License\n\nMIT © [Daniel Luiz Alves 🇧🇷](https:\u002F\u002Fgithub.com\u002Fdanielalves96)\n","Claude Code Provider Gateway 是一个桌面应用程序，旨在让用户能够通过多种语言模型提供商使用 Claude Code。其核心功能包括支持超过40种不同的LLM提供商，如OpenAI、GitHub Copilot等，并且可以在保持Claude Code原有工作流程的同时，实现协议转换和结果流回传。该应用基于TypeScript开发，适用于需要灵活选择不同AI编码工具的开发者或团队，在本地环境中运行，无需担心数据隐私问题。特别适合那些希望在不改变现有开发环境的情况下尝试不同AI助手的用户。","2026-06-11 04:00:08","CREATED_QUERY"]