Repository navigation
Releases
v1.1.0 — resilience: auto-follow CLI version, pre-output failover, idle timeouts
Resilience release — the adapter keeps its CLI fingerprint current automatically, survives stalled or empty upstream responses, and gains a zero-data-retention switch. Also ships the two v1.0.0-era stability fixes that had not been released yet.
What's new in v1.1.0
- CLI fingerprint auto-follow — the simulated CLI version sent to the gateway now tracks the latest
command-coderelease on the npm registry, refreshed every 24h, soupgrade_requiredrejections stop being a maintenance burden. SetCC_VERSION(env) or--cc-versionto pin an exact version. - Failover before first byte — streaming responses are buffered until the first visible output. An empty upstream reply now returns a retryable
429, and errors or idle timeouts that occur before any output trigger failover to the next pool account instead of a broken SSE stream. Once output has started, behavior is unchanged (stream passes through). - Upstream idle timeouts — reads that see no data for 120s (streaming) / 300s (non-streaming) abort instead of hanging for 10 minutes. Tunable via
CC_STREAM_IDLE_S/CC_NONSTREAM_IDLE_S. The defaults are deliberately generous: the official CLI has no idle timeout at all and long reasoning pauses are normal. - 402 handling — gateway
402(credits exhausted) is treated like rate limiting: the request fails over to the next account and the exhausted account cools down. - Zero-data-retention toggle — send
x-cmd-zdr: 1on generation requests viaCC_ZDR=1, the--zdrflag, or the new 零数据保留 checkbox in the desktop status bar (runtime switch, takes effect immediately). - Model metadata —
/v1/modelsnow exposescontext_windowandmax_context_lengthaliases alongsidecontext_length. - Stability fixes carried in — headless-zombie watchdog (a crashed GUI no longer leaves an unkillable background proxy holding the port; a second launch wakes the existing window) and the UI-freeze deadlock fix (cross-thread font GC deadlocked the main thread after long runtimes).
Configuration (new)
| Variable | Default | Meaning |
|---|---|---|
CC_VERSION |
auto (npm latest, 24h) | CLI fingerprint version; setting it pins the value |
CC_ZDR |
unset | 1/true enables zero-data-retention routing |
CC_STREAM_IDLE_S |
120 |
Streaming read idle timeout (seconds) |
CC_NONSTREAM_IDLE_S |
300 |
Non-streaming read idle timeout (seconds) |
Usage
Double-click General-cmdgo-provider.exe. Click OAuth 登录 once per account to add accounts; requests spread across them automatically and fail over within a single request when one account is rate-limited.
Point your OpenAI-compatible client at:
| Item | Value |
|---|---|
| Base URL | http://127.0.0.1:8787/v1 |
| API key | cmdgo |
| Protocol | OpenAI Chat Completions |
Build from source
python -m pip install pyinstaller customtkinter pystray pillow cryptography
windows\build_gui.cmdToken/accounts are stored per-user (DPAPI-encrypted on Windows) at
%APPDATA%\cmdgo-provider\. The server binds to 127.0.0.1 only.
v1.0.0 — dashboard UI with live usage & quota
First stable release — the desktop app becomes a five-tab dashboard with live usage and quota.
What's new in v1.0.0
- Five-tab desktop UI — the single window is now organized as
概览 / 账号 / 用量与额度 / 模型型号 / 实时日志, so status, accounts, quota,
models and logs each get their own space. - 概览 — status cards (proxy state, listen address, accounts, models),
uptime, current account, app + CLI versions, and the start/stop, OAuth,
tray and web-panel controls. - 用量与额度 — live quota pulled from the official CLI-channel endpoints
(/alpha/usage/summary,/alpha/billing/credits, 30s cache):
5-hour and weekly windows as percentages with used/cap and reset countdowns;
the monthly allowance shown as 已用 / 上限 / 剩余 (the cap is derived from
used + remaining, matching the official usage page); totals for requests,
success rate, input/output tokens and cost; plus locally accumulated
per-account totals. Auto-refreshes every 60s, or click 刷新. - 模型型号 — searchable catalog with context-window badges (
200K,1M);
click a model id (or its row) to copy it. - 实时日志 — the log view now uses the system UI font so mixed
Chinese/ASCII lines render consistently; includes a clear button and the
rotated log file path (%APPDATA%\cmdgo-provider\logs\app.log). - 账号 — pool management with per-account usage, one-click health test
(diagnostic only, never touches cooldown or stats), click the name for full
details, plus passphrase-encrypted export/import. - Fixes — monthly quota had the wrong field semantics (remaining was shown
as the cap, overstating usage); the build script now fails loudly instead of
reporting success with a stale binary when the exe is in use.
Carried over from 0.5 / 0.6: autostart toggle, update banner, DPAPI-encrypted
credentials, upgrade_required surfacing, General-cmdgo-provider.exe naming,
and CI building the release binary on every tag.
Usage
Double-click General-cmdgo-provider.exe. Click OAuth 登录 once per account to add
accounts; requests spread across them automatically and fail over within
a single request when one account is rate-limited.
Point your OpenAI-compatible client at:
| Item | Value |
|---|---|
| Base URL | http://127.0.0.1:8787/v1 |
| API key | cmdgo |
| Protocol | OpenAI Chat Completions |
Build from source
python -m pip install pyinstaller customtkinter pystray pillow cryptography
windows\build_gui.cmdToken/accounts are stored per-user (DPAPI-encrypted on Windows) at
%APPDATA%\cmdgo-provider\. The server binds to 127.0.0.1 only.
v0.6.0 — autostart, account tools, General-cmdgo-provider.exe
Feature release: the exe is now General-cmdgo-provider.exe, with autostart, account health tools, and portable account migration.
What's new in v0.6.0
- Executable renamed —
cmdgo-gui.exeis nowGeneral-cmdgo-provider.exe, matching the app name. Update your shortcuts;login.pystill recognizes the old name. - Autostart toggle — a 开机自启 checkbox in the title bar writes the HKCU Run key and starts tray-resident (via
--minimized), replacing the outdated VBS scripts. - Update banner — the app checks GitHub releases in the background and shows a clickable ⬆ notice when a newer version exists (
/healthznow reportsappVersiontoo). - Account health test — a 测试 button per account sends a 16-token diagnostic request and reports ok/latency/error without touching cooldown or stats; click an account name to log full details.
- Account export/import — passphrase-encrypted export files (Fernet + PBKDF2, 600k iterations) restore the cross-machine migration that DPAPI encryption removed; import dedupes by key.
- Rotating file log —
%APPDATA%\cmdgo-provider\logs\app.log(1MB × 3) alongside the GUI log view.
Usage
Double-click General-cmdgo-provider.exe. Click OAuth 登录 once per account to add
accounts; requests spread across them automatically and fail over within
a single request when one account is rate-limited.
Point your OpenAI-compatible client at:
| Item | Value |
|---|---|
| Base URL | http://127.0.0.1:8787/v1 |
| API key | cmdgo |
| Protocol | OpenAI Chat Completions |
Build from source
python -m pip install pyinstaller customtkinter pystray pillow cryptography
windows\build_gui.cmdToken/accounts are stored per-user (DPAPI-encrypted on Windows) at
%APPDATA%\cmdgo-provider\. The server binds to 127.0.0.1 only.
v0.5.0 — new identity, encrypted credentials, usage stats
Feature release: new app identity, encrypted credentials, usage stats — plus a hardening pass across the board.
What's new in v0.5.0
- New name & unified icon — the app is now General-cmdgo-provider everywhere (window title, tray, web panel), with one icon design (green circle "G") shared by the tray, title bar, taskbar and the .exe itself. The icon previously kept getting swapped to the framework's default blue by CustomTkinter 200ms after startup; that override is now properly blocked.
- Credentials encrypted at rest —
token.jsonandaccounts.jsonare encrypted with Windows DPAPI (per-user, zero dependencies). Old plaintext files keep working and are upgraded to encrypted on the next write. On non-Windows platforms files stay plaintext. - Per-account usage stats — the GUI account panel (and
/account/list) now shows cumulative successful/failed requests and token usage per account, so multi-account users can see the quota actually spreading. - Single desktop app — the redundant pywebview GUI runtime was removed;
cmdgo_gui.py(customtkinter) is the one desktop entry,cmdgo_provider.pyruns console mode with the browser panel athttp://127.0.0.1:8787/. - Model metadata —
/v1/modelsnow forwards the upstreamcontext_length(e.g. MiniMax M2.5 = 200k), so clients like ZCode can configure context windows automatically. - Clearer gateway errors — when Command Code starts requiring a newer CLI version (
upgrade_required), the adapter returns explicit instructions instead of a misleading auth failure;/healthzexposes the runningccVersion. - Quality/CI — test suite ported to pytest (30 tests), ruff lint job added, release exe built automatically by CI on tagged pushes.
Usage
Double-click cmdgo-gui.exe. Click OAuth 登录 once per account to add
accounts; requests spread across them automatically and fail over within
a single request when one account is rate-limited.
Point your OpenAI-compatible client at:
| Item | Value |
|---|---|
| Base URL | http://127.0.0.1:8787/v1 |
| API key | cmdgo |
| Protocol | OpenAI Chat Completions |
Build from source
python -m pip install pyinstaller customtkinter pystray pillow
windows\build_gui.cmdToken/accounts are stored per-user (DPAPI-encrypted on Windows) at
%APPDATA%\cmdgo-provider\. The server binds to 127.0.0.1 only.
v0.4.2 — restart fix, CI-built exe
Patch release: GUI proxy restart fix, CI-built exe.
What's new in v0.4.2
- Fixed "start proxy" occasionally failing right after stopping it — the
listening socket is now closed deterministically (server_close), the server
loop polls faster so shutdown completes ~10x sooner, and the GUI retries
binding briefly across the shutdown window. A genuine port conflict still
reports the error as before. - The
cmdgo-gui.exebelow is now built by CI (releaseworkflow) on every
tagged push, instead of being uploaded manually. - README: how to configure the provider in ZCode (EN/zh), including the
unknown-model-id trap that shows up as "authentication failed".
Usage
Double-click cmdgo-gui.exe. Click OAuth 登录 once per account to add
accounts; requests are spread across them automatically and fail over within
a single request when one account is rate-limited.
Point your OpenAI-compatible client at:
| Item | Value |
|---|---|
| Base URL | http://127.0.0.1:8787/v1 |
| API key | cmdgo |
| Protocol | OpenAI Chat Completions |
Build from source
python -m pip install pyinstaller customtkinter pystray pillow
windows\build_gui.cmdToken/accounts are stored per-user at
%APPDATA%\cmdgo-provider\. The server binds to 127.0.0.1 only.
v0.4.1 — failover & error propagation
Reliability pass for the proxy core: in-request failover, honest error propagation, and a security fix.
What's new in v0.4.1
- In-request account failover — when an account hits a 429/auth failure or the
gateway is unreachable, the request is retried with the next enabled pool account
before failing (previously only the next request would fail over). - Upstream errors are no longer swallowed —
errorevents inside a 200 stream now
surface as SSE errors / HTTP 502 instead of an empty "successful" reply. - 401 for unknown models mapped to 400 — the gateway answers 401 with
"Model/provider not recognized"; the adapter rewrites it to 400 so clients (e.g.
ZCode) no longer misreport a bad model id as "Provider authentication failed". /login/statusno longer echoes the plaintext apiKey (it used to survive
logout), and/login/cancelnow notifies pollers instead of letting them run to
the 10-minute timeout.- Client disconnects are quiet — stopping a turn mid-stream no longer spams
tracebacks and is not charged against the account. - Cooldown decay — an account that last failed long ago starts over at the 30s
base cooldown instead of jumping straight to the 15-minute cap; pool bookkeeping
is now lock-guarded. - All-disabled pool falls back to the cached OAuth key instead of returning 401.
- GUI — fixed intermittent "not responding" after running for a while
(cross-threadafter()misuse → thread-safe dispatch queue, log capped at 800
lines); account panel keeps its last snapshot when the proxy is briefly busy;
single-instance guard prevents duplicate tray icons. - Packaging —
pyprojectversion aligned to 0.4.1,[gui]extras now include
customtkinter; CI additionally runs the pool unit tests and a new failover /
error-propagation e2e test (tests/test_failover.py).
Usage
Double-click cmdgo-gui.exe. Click OAuth 登录 once per account to add
accounts; requests are spread across them automatically (and now fail over
within a single request when one account is rate-limited).
Point your OpenAI-compatible client at:
| Item | Value |
|---|---|
| Base URL | http://127.0.0.1:8787/v1 |
| API key | cmdgo |
| Protocol | OpenAI Chat Completions |
Build from source
python -m pip install pyinstaller customtkinter pystray pillow
windows\build_gui.cmdToken/accounts are stored per-user at
%APPDATA%\cmdgo-provider\. The server binds to 127.0.0.1 only.
v0.3.0
Modern GUI + system tray, with a full multi-account pool.
What's new in v0.3.0
- Multi-account pool — several OAuth logins are harvested into a pool
(%APPDATA%\cmdgo-provider\accounts.json) and requests rotate across enabled
accounts (round-robin) to spread plan quota. - Exponential backoff + failover — a failed request cools the account down
(30s → 15min cap) and the next request fails over to another account. - GUI account panel — the window shows a 账号池 (account pool) list with
enable/disable and delete buttons; actions run on worker threads (no UI freeze). - Friendly account display — accounts show their username (or a readable
fallback) instead of a bare id. - Modern dark-theme desktop GUI, system-tray resident, bundled icon, system font.
Usage
Double-click cmdgo-gui.exe. Click OAuth 登录 once per account to add
accounts; requests are then spread across them automatically.
Point your OpenAI-compatible client at:
| Item | Value |
|---|---|
| Base URL | http://127.0.0.1:8787/v1 |
| API key | cmdgo |
| Protocol | OpenAI Chat Completions |
Build from source
�at python -m pip install pyinstaller customtkinter pystray pillow windows\build_gui.cmd
Token/accounts are stored per-user at
%APPDATA%\cmdgo-provider\. The server binds to 127.0.0.1 only.
v0.1.0
Modern GUI + system-tray packaged build.
Features
- Modern dark-theme native GUI (customtkinter)
- System tray resident (close to tray, right-click menu)
- Auto-starts the local OpenAI-compatible proxy on port 8787
- Bundled app icon
- Uses the OS default UI font throughout the window
Usage
Double-click cmdgo-gui.exe. Point your OpenAI-compatible client at:
| Item | Value |
|---|---|
| Base URL | http://127.0.0.1:8787/v1 |
| API key | cmdgo |
| Protocol | OpenAI Chat Completions |
Build from source
�at python -m pip install pyinstaller customtkinter pystray pillow windows\build_gui.cmd
Token is stored per-user at
%APPDATA%\cmdgo-provider\token.json. Server binds to 127.0.0.1 only.