Repository navigation
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.