OpenAI-compatible local proxy in front of Cline (api.cline.bot).
Cline VS Code streams delta.reasoning + include_reasoning. Hermes / OpenAI clients expect delta.reasoning_content. This proxy:
- injects
include_reasoning: true - copies
reasoning/reasoning_details→reasoning_content - unwraps
{data, success}envelopes - round-robins Cline
sk_keys - serves a settings UI at
/(API key, reasoning effort, models)
Default model: z-ai/glm-5.3-flash (free Cline flash). Old picker names still remap.
python proxy.py
Settings: http://127.0.0.1:20129/
OpenAI:
base_url: http://127.0.0.1:20129/v1
Authorization: Bearer <api_key from config.json>
model: z-ai/glm-5.3-flash
Upstream keys: active provider=cline rows in %APPDATA%\9router\db\data.sqlite.
WSL2 cannot use 127.0.0.1 (that is the VM). Use the Windows vEthernet IP:
ip route | awk '/^default/{print $3}'
# then http://<that-ip>:20129/v1
sudo apt update && sudo apt install -y python3
git clone https://github.com/kevinnft/cline-reason-proxy.git
cd cline-reason-proxy
chmod +x run.shCline keys (pick one):
cp keys.example.json keys.jsonand putsk_…valuesexport CLINE_API_KEYS='sk_aaa,sk_bbb'- 9router sqlite at
~/.9router/db/data.sqliteorNINE_ROUTER_DB=/path/to/data.sqlite
./run.shThen open http://127.0.0.1:20129/
Do not prefix Cline API keys with workos: — that 401s (sk_ keys are Bearer as-is).
config.json and keys.json are gitignored. Copy the *.example.json files.
| Hop | Key |
|---|---|
| Client → proxy | one api_key in config.json |
| Proxy → Cline | pool of sk_ keys (round-robin + failover on 401/402/429/5xx, up to 8) |