Description
Repro: Any Z.AI account on a newer V3 plan (Lite/Pro, GLM-5 era). Valid API key; the endpoint returns 200 and real usage, but the sidebar ZAI block renders "invalid ZAI usage". Verified 2026-09-02 against the live endpoint.
Root cause: zaiWindowFromLimit in src/providers/zai.ts only recognizes TOKENS_LIMIT (→ 5h rolling window) and TIME_LIMIT (→ tier). Z.AI's quota API now returns CREDIT_LIMIT entries for credit-based plans
Providers
ZAI
Plugin version
1.6.1
OpenCode version
1.18.23
OS
Linux
Steps to reproduce
Install the plugin in opencode connected to Z.ai provider
Expected behavior
Shows correct z.ai usage
Actual behavior
Shows "invalid ZAI usage"
Config
Description
Repro: Any Z.AI account on a newer V3 plan (Lite/Pro, GLM-5 era). Valid API key; the endpoint returns 200 and real usage, but the sidebar ZAI block renders "invalid ZAI usage". Verified 2026-09-02 against the live endpoint.
Root cause: zaiWindowFromLimit in src/providers/zai.ts only recognizes TOKENS_LIMIT (→ 5h rolling window) and TIME_LIMIT (→ tier). Z.AI's quota API now returns CREDIT_LIMIT entries for credit-based plans
Providers
ZAI
Plugin version
1.6.1
OpenCode version
1.18.23
OS
Linux
Steps to reproduce
Install the plugin in opencode connected to Z.ai provider
Expected behavior
Shows correct z.ai usage
Actual behavior
Shows "invalid ZAI usage"
Config