Local OpenAI & Anthropic-compatible gateway for the ZCode Start-Plan (GLM-5.3 & GLM-5.3-Flash) with customizable reasoning effort levels (low, high, max).
- Dual Dialects: Fully supports standard OpenAI (
/v1/chat/completions) and Anthropic (/v1/messages) protocols. - Reasoning Effort Control: Fine-tune thinking budget directly via OpenAI parameter
reasoning_effortor model suffix (:low,:high,:max). - Standard Reasoning Output: Returns thinking blocks mapped to OpenAI standard
reasoning_contentdelta and non-streaming message fields. - Zero Configuration Discovery: Automatic device mid detection from local desktop installation (
%APPDATA%\ZCode\.updaterId). - Optimized for Proxy Gateways: Ready to connect with 9Router, Next.js AI SDK, Claude Code, and OpenAI-compatible tools.
| Model ID | Reasoning Effort | Best For |
|---|---|---|
glm-5.3-flash |
Default (low) |
Fast everyday coding and high-throughput chat |
glm-5.3-flash:low |
Low | Minimal token consumption, lowest latency |
glm-5.3-flash:high |
High | Balanced deep reasoning |
glm-5.3-flash:max |
Max | Complex algorithmic problems and architecture design |
glm-5.3 |
Default (low) |
High parameter precision |
glm-5.3:low |
Low | Standard coding with brief thoughts |
glm-5.3:high |
High | Detailed chain of thought |
glm-5.3:max |
Max | Comprehensive reasoning |
git clone https://github.com/apissaj/zcode-gateway.git
cd zcode-gateway
# Build binary
go build -o zcode-gateway.exe ./cmd/zcode-gateway
# Run gateway on custom port (default: 20131 or set PORT)
PORT=8085 ZCODE_DEFAULT_EFFORT=low ./zcode-gateway.exeSynchronize session JWT directly from your signed-in ZCode desktop IDE:
node sync-token.jscurl -X POST http://127.0.0.1:8085/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model": "glm-5.3-flash:low",
"messages": [
{"role": "user", "content": "Explain binary search in 2 sentences."}
],
"stream": true
}'curl -X POST http://127.0.0.1:8085/v1/messages \
-H "Content-Type: application/json" \
-d '{
"model": "glm-5.3-flash",
"thinking": {"type": "enabled", "effort": "low"},
"max_tokens": 1024,
"messages": [
{"role": "user", "content": "Hello!"}
]
}'| Variable | Default | Description |
|---|---|---|
PORT |
20131 |
Listening port |
BIND_HOST |
127.0.0.1 |
Network interface to bind |
ZCODE_DEFAULT_EFFORT |
low |
Default reasoning effort when unspecified (low, high, max) |
ZCODE_PLAN_JWT |
- | Manual Plan JWT override |
ZCODE_IDENTITY_DEVICE_MID |
Auto | Device identifier (auto-detected on Windows) |
MIT © 2026 apissaj