Skip to main content

Module zai

Module zai 

Source
Expand description

Z.ai GLM coding plan monitor response shapes.

Type-only - the HTTP fetcher lives in the forge-gateway Zai backend. These are the JSON wire shapes; the fetcher deserializes into them.

Every Z.ai monitor endpoint answers HTTP 200 regardless of outcome (a wrong key, a wrong path and a healthy response share the status), so the verdict lives entirely inside the {code, msg, data, success} envelope and callers key on success/code, never on HTTP status.

Re-exportsยง

use serde::Deserialize; ๐Ÿ”’
use serde::Deserialize; ๐Ÿ”’
use serde::Serialize; ๐Ÿ”’
use serde::Serialize; ๐Ÿ”’

Structsยง

QuotaLimitData
The plan tier and its rolling credit windows.
QuotaLimitEntry
One rolling window, in credits. usage is the per-window LIMIT (28000 on a 5h Max window, 140000 weekly), not consumption; consumption is usage - remaining. unit 3 counts hours (the 5-hour window, number 5), unit 6 counts weeks (number 1).
QuotaLimitResponse
/api/monitor/usage/quota/limit envelope.