Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 17 additions & 17 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ categories = ["network-programming", "web-programming::http-server"]

# 二进制走 CalVer,crate 走 SemVer —— 两者是两回事,卖给不同的人。
# 这里是 crate 的版本。
version = "0.50.0"
version = "0.51.0"

[workspace.dependencies]
# ── 内部 crate ───────────────────────────────────────────
Expand Down
13 changes: 13 additions & 0 deletions release-notes/0.51.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
This release stops counting the MCP tool calls of the older GLM Coding Plans as a quota, marks only the weekly window when a model request gets business code 1310, and tells the app at once when a GLM key turns out to have no plan.

**Upgrade notes**

- The control-plane protocol version (`CONTROL_API_VERSION`) is now 24. ThinkWatch Lite connects only to a core with the same protocol version, and has to regenerate its protocol types from this release to use it. ThinkWatch Lite 2026.9.17 includes 0.49.0 (protocol 22) and no released version of the app includes 0.50.0, so a server used with the app stays on 0.49.x until the app is updated to a release that includes 0.51.0. `sudo twcore upgrade --version 0.49.1 --restart` switches a server back to 0.49.1.
- The request store's schema is unchanged (21). Upgrading from 0.50.0 keeps the request history. Upgrading from 0.49.x or earlier replaces the request history and the stored bodies with an empty store on the first start, as 0.50.0 does; the configuration is kept. Switching back to 0.49.x empties it again.
- Changed in the protocol: the quota window `monthly` is gone, and a `QuotaSeen` with empty `windows` means the upstream's quota was taken down. No endpoint, type or message code changed.

**MCP calls are not a quota.** The quota endpoint of the older GLM Coding Plans also reports a count (`TIME_LIMIT`) of calls to Z.ai's own MCP tools: search-prime, web-reader and zread. Those calls do not go through the gateway, so the count says nothing about the requests it forwards. Core no longer reads it: there is no `monthly` window, and a used-up count no longer marks the upstream used up or emits `QuotaExhausted`. `credits` are reported only for the windows of credit-based plans (`CREDIT_LIMIT`).

**1310 is the weekly quota.** A 429 with business code 1310 on a model request marks the `weekly` window used up, whatever its message says. 1308 still marks the 5-hour window. For 1316 to 1321 the window still comes from the message when it names the 5-hour or weekly window; otherwise it is the fuller of the two known windows, or the weekly one when neither is known.

**A key without a plan.** When a GLM key is found to have no plan, core clears the quota it had stored for that upstream and emits a `QuotaSeen` with empty `windows`, so the app removes the quota at once instead of on its next read of `/quota`.
Loading