Probing a live GLM Coding Plan key showed the Anthropic-compat /v1/messages
response carries NO rate-limit headers. z.ai instead exposes a dedicated status
endpoint (found via github.com/rygel/AIUsageTracker):
GET https://api.z.ai/api/monitor/usage/quota/limit
Authorization: <raw key> (no "Bearer") Accept-Language: en-US,en
-> data.limits[] of TOKENS_LIMIT windows {percentage 0-100, nextResetTime ms, unit,number}
+ data.level (plan tier)
ZaiProvider now GETs that: the shortest TOKENS_LIMIT window -> the 5h bar (s/sr),
the longest -> the weekly bar (w/wr); the monthly TIME_LIMIT (web-tool quota) is
ignored; level -> status ("Lite"/"Pro"/…), any window at 100% -> "limited". It's
a status GET, so it does NOT spend the prompt-metered plan — no self-throttle
needed, polls on the normal cadence. Monitor URL derives from the configured
base host.
Verified live: s=1% (5h, resets ~4.9h), w=2% (weekly, resets ~6.5d), st="Lite".
test_zai rewritten for the JSON envelope (9 tests). probe_zai.py repointed to the
monitor endpoint. 122 passed, 2 Linux-only failures (baseline).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Splash animation tools
Two-step pipeline for getting third-party 20×20 pixel animations onto the device.
1. Scrape
node scrape_claudepix.js
Fetches the manifest from claudepix.vercel.app/app.js, then each animation's
HTML file, evaluates the embedded JS in a Node VM context (loading the same
creature-engine.js the site uses), and writes resolved frame data to
tools/claudepix_data/*.json.
Each output file looks like:
{
"filename": "idle_breathe.html",
"name": "idle breathe",
"category": "Idle",
"description": "...",
"frame_count": 17,
"frames": [{ "hold": 500, "grid": [[0,0,...],[0,1,1,...],...] }, ...]
}
Override URL or output dir with --base and --out.
2. Convert to C
node convert_to_c.js
Reads tools/claudepix_data/*.json and emits a single
firmware/src/splash_animations.h with:
splash_<ident>_frames[N][400]— per-frame cell codes (0 = empty, 1 = body, 2 = eye)splash_<ident>_holds[N]— per-frame hold time in mssplash_anims[]— master table with name, category, frame count, pointersSPLASH_ANIM_COUNT
The firmware (splash.cpp) consumes this header to render and animate.
Re-running
The scraper is idempotent — re-run any time the source library updates. The converter overwrites the header. Rebuild firmware after running both.
License note
The scraper hits a public site without a stated license. Confirm reuse is appropriate for your case before redistributing the output.