@wendellresearch-ai/benchwarmers 0.2.1 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -15,8 +15,11 @@ the same collection is called every day:
15
15
  seats; empty means a decision model labels each prompt, or `general` without
16
16
  one. `reply` is what the caller reads: `all` (every answer, the default) or
17
17
  `merged` (one answer a `merger` model writes from them; empty means chosen by
18
- verdict record, gateway.py). A request may override it with a `:merged` or
19
- `:all` suffix on the model name, or `"bench": {"reply": ...}` in the body.
18
+ verdict record, gateway.py) or `route` (no panel: one member, picked by its
19
+ record, gets the request as sent, tools and all, for agent clients;
20
+ GATEWAY.md "Route mode"). A request may override it with a `:merged`,
21
+ `:all` or `:route` suffix on the model name, or `"bench": {"reply": ...}`
22
+ in the body.
20
23
  Named `bench_collections` because `collections` would shadow the standard
21
24
  library for everything importing from metrics/.
22
25
  """
@@ -34,7 +37,7 @@ SETTINGS_FILE = DATA / "config" / "gateway.json"
34
37
  DEFAULTS = {"max_calls": 5, "max_explorers": 2}
35
38
  NAME = re.compile(r"^[a-z0-9][a-z0-9-]{1,31}$")
36
39
  PREFIX = "bench/"
37
- REPLIES = ("all", "merged")
40
+ REPLIES = ("all", "merged", "route")
38
41
 
39
42
 
40
43
  def _read(path: pathlib.Path) -> dict:
@@ -135,6 +138,7 @@ if __name__ == "__main__":
135
138
  assert explorers_for(3, {"max_calls": 4, "max_explorers": 2}) == 1
136
139
  assert resolve("bench/") is None and resolve("bench/no-such") is None and resolve("") is None
137
140
  assert split_reply("bench/core:merged") == ("bench/core", "merged") and split_reply("core:all") == ("core", "all")
141
+ assert split_reply("bench/core:route") == ("bench/core", "route")
138
142
  assert split_reply("bench/core") == ("bench/core", "") and split_reply("bench/core:x") == ("bench/core:x", "")
139
143
  assert not reply_errors("merged", "", []) and not reply_errors("all", "m", ["m"])
140
144
  assert len(reply_errors("", "m", [])) == 2
@@ -11,7 +11,11 @@ THREE FILES, ONE RECORD
11
11
  config/model-overrides.json WRITTEN BY YOU (the model popup). Per alias,
12
12
  any field, including its own rate limits.
13
13
  config/connection-limits.json WRITTEN BY YOU (the Endpoints dialog). Per
14
- connection: rpm, rpd, tpm, tpd.
14
+ connection: rpm, rpd, tpm, tpd, and rpmo
15
+ (calls a calendar month).
16
+
17
+ Since Phase 2b the built-in client enforces these, a model's own limits and
18
+ the learned ones (metrics/pacing.py); before, they were only shown.
15
19
 
16
20
  `info(alias)` merges them: an override beats the refresh, a model's own limits
17
21
  beat its connection's. Rate limits are kept per CONNECTION (nvidia-api, groq,
@@ -52,6 +56,11 @@ FIELDS = ("context_window", "max_output", "vision", "tools", "structured_output"
52
56
  "release_date", "open_weights", "description")
53
57
  CAPS = ("tools", "vision", "structured_output", "reasoning")
54
58
  LIMIT_KEYS = ("rpm", "rpd", "tpm", "tpd")
59
+ # A connection's limits add a monthly cap: calls a calendar month (UTC), as a
60
+ # trial key has (Cohere's: 1,000). Per key, so not among a model's own limits.
61
+ CONNECTION_LIMIT_KEYS = LIMIT_KEYS + ("rpmo",)
62
+ LIMIT_LABELS = {"rpm": "requests per minute", "rpd": "requests per day", "tpm": "tokens per minute",
63
+ "tpd": "tokens per day", "rpmo": "requests per calendar month (UTC)"}
55
64
 
56
65
 
57
66
  def _read(path: pathlib.Path) -> dict: