feat(judge): watch the judge providers' plan usage; switch to the fallback before the wall
GLM's weekly window ran out while the judge had spent ~0.1% of it: other consumers of the shared key starve the judge, and ClawMates learned only from failed phases. A poller now reads z.ai's quota API and Kimi's usages API every 10 minutes, warns once per window per reset at 80%, and the evaluator skips a judge whose plan is at 95% in any window for the (equally independent) fallback — only on a real reading, never on a missing one. GET /api/judge/quota shows the readings. Parsers pinned to the shapes both APIs returned on 2026-09-23. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
dd335ccfe6
commit
318a6791b9
@@ -12,6 +12,7 @@ pub mod corpus;
|
||||
mod error;
|
||||
pub mod evaluator;
|
||||
pub mod evaluator_tools;
|
||||
pub mod judge_quota;
|
||||
mod extract;
|
||||
pub mod fleet;
|
||||
pub mod fleet_herdr;
|
||||
@@ -190,6 +191,7 @@ pub fn router(state: AppState) -> Router {
|
||||
.route("/api/nodes", get(routes::nodes::list))
|
||||
.route("/api/fleet/capacity", get(routes::nodes::capacity))
|
||||
.route("/api/fleet/backends", get(routes::nodes::backends))
|
||||
.route("/api/judge/quota", get(routes::nodes::judge_quota))
|
||||
.route("/api/nodes/pair", post(routes::nodes::pair))
|
||||
.route("/api/nodes/live", get(routes::nodes::live))
|
||||
.route("/api/nodes/agent", get(routes::nodes::agent_ws))
|
||||
|
||||
Reference in New Issue
Block a user