Skip to content

Commit e93fb4e

Browse files
committed
chore: Updates README.md
also removed dead keys in config examples
1 parent 357ddd8 commit e93fb4e

5 files changed

Lines changed: 26 additions & 22 deletions

File tree

‎Android-APP/README.md‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,11 @@ cd Android-APP
5252

5353
- `Android-APP/` — Gradle project; everything Android-specific lives here.
5454
- `Android-APP/app/src/main/java/com/zcode/proxy/` — Kotlin shell.
55-
- `Android-APP/app/src/main/assets/server_bundle/` — committed in the repo
56-
(canonical); regenerate via `bun run build:android-bundle` + copy
57-
`dist/android/server.cjs` into it (see BUILD in `Android-APP/AGENTS.md`).
55+
- `Android-APP/app/src/main/assets/server_bundle/` — tracked sidecar assets
56+
(`config.example.yaml`, `webui.txt`, `zcode_system.json`); `server.cjs` is
57+
gitignored build output — regenerate via `bun run build:android-bundle` +
58+
copy `dist/android/server.cjs` into it before building (Gradle's
59+
`checkServerBundle` preBuild task fails with a hint if it is missing).
5860
- `Android-APP/app/src/main/jniLibs/arm64-v8a/` — committed Node.js binary
5961
(`libnode.so`) + Termux dependency `.so` files, extracted once via
6062
`scripts/extract-termux-deps.sh`.

‎Android-APP/app/src/main/assets/server_bundle/config.example.yaml‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ auth:
99

1010
# Upstream credentials come from the OAuth login flow — run this first:
1111
# bun run src/index.ts auth login <zai|bigmodel>
12-
# Path to the stored credentials (default shown):
12+
# Parsed but currently not honored — the credential store path is fixed at
13+
# ~/.zcode-proxy/credentials.json:
1314
# oauthCredentialsPath: "~/.zcode-proxy/credentials.json"
1415

1516
# Which upstream provider to use: "zai" or "bigmodel"
@@ -41,6 +42,7 @@ models:
4142
- glm-5.1
4243
- glm-5.2
4344
- glm-5.3
45+
- glm-5.3-flash
4446

4547
# Configurable identity headers injected on every upstream request to mimic the
4648
# ZCode desktop client (User-Agent, X-ZCode-App-Version, X-Title,
@@ -134,9 +136,9 @@ async:
134136
# campaigns are quota-limited first-come-first-served; claimed plans activate
135137
# at the campaign's `starts_at` and land as Start-Plan quota.
136138
#
137-
# IMPORTANT: requires `auth.mode: oauth` (claim uses the JWT from login), and
138-
# identity.appVersion must be >= the campaign's minimum client version
139-
# (default 3.10.0) or the server rejects with `ineligible`.
139+
# IMPORTANT: requires a logged-in credential (claim uses the JWT from
140+
# `auth login`), and identity.appVersion must be >= the campaign's minimum
141+
# client version (default 3.10.0) or the server rejects with `ineligible`.
140142
#
141143
# Env overrides: ZCODE_CLAIM_ENABLED, ZCODE_CLAIM_AUTO, ZCODE_CLAIM_ORIGIN,
142144
# ZCODE_CLAIM_POLL_INTERVAL_MS.

‎README.md‎

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,8 @@ bun install
1010

1111
# Copy and edit config
1212
cp config.example.yaml config.yaml
13-
<<<<<<< Updated upstream
14-
1513
# Log in (OAuth, browser-based)
1614
bun run src/index.ts auth login zai # or: bigmodel
17-
=======
18-
# Log in first via OAuth (see Authentication below)
19-
>>>>>>> Stashed changes
2015

2116
# Start the proxy
2217
bun run src/index.ts
@@ -245,7 +240,7 @@ file (best-effort; never affects handling). Requires a TTY with at least
245240
|-------|---------|---------|-------------|
246241
| `server.port` | `ZCODE_PROXY_PORT` | `8080` | Listen port |
247242
| `auth.proxyApiKey` | `ZCODE_PROXY_API_KEY` | — | Client auth key |
248-
| `auth.oauthCredentialsPath` | — | `~/.zcode-proxy/credentials.json` | Encrypted credential store from `auth login` |
243+
| `auth.oauthCredentialsPath` | — | — | Parsed but currently not honored — the credential store path is fixed at `~/.zcode-proxy/credentials.json` |
249244
| `provider` | `ZCODE_PROVIDER` | `zai` | Upstream provider |
250245
| `plan` | — | `coding-plan` | Plan tier: `coding-plan` (direct upstream) or `start-plan` (zcode.z.ai gateway + JWT + captcha) |
251246
| `identity.appVersion` | `ZCODE_APP_VERSION` | `3.10.0` | `User-Agent: ZCode/{version}` |
@@ -268,7 +263,7 @@ Client Request
268263
Proxy API Key Auth (shared secret)
269264
│
270265
▼
271-
Route Detection + Plan-aware Routing (both plans post Anthropic upstream, v2.4+)
266+
Route Detection + Plan-aware Routing (both plans post Anthropic upstream, v4.5.0+)
272267
/v1/chat/completions (OpenAI client format)
273268
├─ coding-plan → TRANSLATE OpenAI→Anthropic → provider's anthropic endpoint
274269
│ (remapped to zcode.z.ai ultra endpoints via server-controlled mapping)
@@ -344,10 +339,11 @@ encrypted credential store. Log in on the host with a fixed encryption seed
344339
ZCODE_PROXY_CREDENTIAL_SECRET="a-long-random-secret" \
345340
bun run src/index.ts auth login zai
346341

347-
# 2. Point auth.oauthCredentialsPath in config.yaml at the mounted store, then run:
342+
# 2. Mount the store at the path the proxy reads. The image runs as user `bun`
343+
# (home /home/bun) and the store path is fixed, not configurable:
348344
docker run --rm -p 8080:8080 \
349345
-v "$(pwd)/config.yaml:/data/config.yaml:ro" \
350-
-v "$(HOME)/.zcode-proxy/credentials.json:/data/credentials.json:ro" \
346+
-v "$(HOME)/.zcode-proxy/credentials.json:/home/bun/.zcode-proxy/credentials.json:ro" \
351347
-e ZCODE_PROXY_CREDENTIAL_SECRET="a-long-random-secret" \
352348
ghcr.io/tridefender/zcode-proxy:latest
353349
```
@@ -373,7 +369,7 @@ services:
373369
- "8080:8080"
374370
volumes:
375371
- ./config.yaml:/data/config.yaml:ro
376-
- ./credentials.json:/data/credentials.json:ro
372+
- ./credentials.json:/home/bun/.zcode-proxy/credentials.json:ro
377373
environment:
378374
ZCODE_PROVIDER: zai
379375
ZCODE_PROXY_API_KEY: "your-proxy-secret"

‎config.example.yaml‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ auth:
99

1010
# Upstream credentials come from the OAuth login flow — run this first:
1111
# bun run src/index.ts auth login <zai|bigmodel>
12-
# Path to the stored credentials (default shown):
12+
# Parsed but currently not honored — the credential store path is fixed at
13+
# ~/.zcode-proxy/credentials.json:
1314
# oauthCredentialsPath: "~/.zcode-proxy/credentials.json"
1415

1516
# Which upstream provider to use: "zai" or "bigmodel"
@@ -41,6 +42,7 @@ models:
4142
- glm-5.1
4243
- glm-5.2
4344
- glm-5.3
45+
- glm-5.3-flash
4446

4547
# Configurable identity headers injected on every upstream request to mimic the
4648
# ZCode desktop client (User-Agent, X-ZCode-App-Version, X-Title,
@@ -134,9 +136,9 @@ async:
134136
# campaigns are quota-limited first-come-first-served; claimed plans activate
135137
# at the campaign's `starts_at` and land as Start-Plan quota.
136138
#
137-
# IMPORTANT: requires `auth.mode: oauth` (claim uses the JWT from login), and
138-
# identity.appVersion must be >= the campaign's minimum client version
139-
# (default 3.10.0) or the server rejects with `ineligible`.
139+
# IMPORTANT: requires a logged-in credential (claim uses the JWT from
140+
# `auth login`), and identity.appVersion must be >= the campaign's minimum
141+
# client version (default 3.10.0) or the server rejects with `ineligible`.
140142
#
141143
# Env overrides: ZCODE_CLAIM_ENABLED, ZCODE_CLAIM_AUTO, ZCODE_CLAIM_ORIGIN,
142144
# ZCODE_CLAIM_POLL_INTERVAL_MS.

‎src/config/template.ts‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ auth:
1818
1919
# Upstream credentials come from the OAuth login flow — run this first:
2020
# bun run src/index.ts auth login <zai|bigmodel>
21-
# Path to the stored credentials (default shown):
21+
# Parsed but currently not honored — the credential store path is fixed at
22+
# ~/.zcode-proxy/credentials.json:
2223
# oauthCredentialsPath: "~/.zcode-proxy/credentials.json"
2324
2425
# Which upstream provider to use: "zai" or "bigmodel"
@@ -50,6 +51,7 @@ models:
5051
- glm-5.1
5152
- glm-5.2
5253
- glm-5.3
54+
- glm-5.3-flash
5355
5456
# Configurable identity headers injected on every upstream request to mimic the
5557
# ZCode desktop client (User-Agent, X-ZCode-App-Version, X-Title,

0 commit comments

Comments
 (0)