Skip to content

Commit 0b91b3e

Browse files
RasmusSootclaudehomelab-agents-1234[bot]
authored
gateway: the Go rail is one account allowance — latch_scope account, no subscription twins, anthropic first for workers (#3105)
* gateway: the Go rail is one account allowance — latch_scope account, no subscription twins among its candidates, anthropic first for workers The 2026-11-01 01:39–01:47Z strike: three Go cells 429'd against one reset (retry-after ≈ 2 h), two of them admitted fresh after the first, because the opencode rail declared latch_scope model (the Go catalog spike's ruling 3). The vendor meters every paid Go model against ONE shared allowance; the per-model limits only weight the draw (anomalyco/opencode#54875, #60311). - rails.opencode.admission.latch_scope: account (deployed policy + the policy-default world and its fixture); GW-SESSIONS-ADMIT §Capacity: the five Go latch rows rewritten to rail-latched, the prose names the wire evidence; a "⚑ gap: the Go account headroom" row names GET /zen/go/v1/usage (rolling / weekly / monthly percent + resetsAt, probed 200) as the GW-CODEX-HEADROOM twin to build. - build_snapshot drops a Go candidate whose twin is a subscription candidate's AA row (operator ruling 2026-11-01: Go is the cheaper door to the priced catalog, never a second door to a model the subscription pays for) — one rule on same_model; GW-MODEL-TIERS "the candidates per rail" row + test claim extended. Fresh snapshot, tiers apply + check green: claude-haiku-5-5 leaves the Go lists; standard = mimo-v2.6-pro, minimax-m3.1-flash, step-5-preview. - roles worker / retro / researcher: anthropic → codex → opencode → openrouter. - docs/spikes/opencode-go-catalog.md: ruling 3 superseded, F5's "no usage endpoint" stale (dated). Co-Authored-By: Claude Fable 5.1 <[email protected]> * gateway specs: ⚖ on the shared-allowance row; rule-10 flag → work #3108 (the Go account headroom poll) The specs reviewer's two findings on #3105: r9.7 encodes a scope choice with a plausible alternative (⚖, on the row and its case id); the new "⚑ gap: the Go account headroom" row needs its index flag `⚑ gap (2026-11-01, PR #3105 → work #3108)` on the requirement's index row (sessions.md's coupling table + specs/README.md) — #3108 filed as that work item. Co-Authored-By: Claude Fable 5.1 <[email protected]> * gateway tests: "the candidates per rail" reports one verdict step per rail The specs reviewer's hygiene belt on #3105 (STEP_NOISE / ATTACH_BULK, 14 flat Then steps and 14 attachments over the threshold of 8): the row's checks are grouped under one Then per rail — opencode, openrouter, anthropic, codex, sources — each attached once. Same claims, same assertions. Co-Authored-By: Claude Fable 5.1 <[email protected]> --------- Co-authored-by: Claude Fable 5.1 <[email protected]> Co-authored-by: homelab-agents-1234[bot] <297114375+homelab-agents-1234[bot]@users.noreply.github.com>
1 parent 76567cc commit 0b91b3e

11 files changed

Lines changed: 130 additions & 114 deletions

File tree

‎argocd/resources/agent-gateway/benchmarks.json‎

Lines changed: 32 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
{
2-
"snapshot_at": "2026-10-29T19:03:52Z",
2+
"snapshot_at": "2026-11-01T09:49:26Z",
33
"sources": {
44
"capability": {
55
"source": "artificial-analysis",
66
"pulled_at": "2026-10-25T21:52:21Z",
77
"rows": 347
88
},
99
"go_catalog": {
10-
"fetched_at": "2026-10-29T13:36:21Z",
10+
"fetched_at": "2026-11-01T07:36:31Z",
1111
"fee_usd_month": 10.0,
12-
"draw_30d_usd": 1.471611
12+
"draw_30d_usd": 5.498803
1313
},
1414
"openrouter_catalog": {
15-
"fetched_at": "2026-10-29T18:22:20Z",
15+
"fetched_at": "2026-11-01T06:22:58Z",
1616
"cells": {
17-
"candidate": 210,
17+
"candidate": 200,
1818
"eligible": 15,
1919
"excluded": 0
2020
}
@@ -88,22 +88,6 @@
8888
"prior": 1.0
8989
}
9090
},
91-
"opencode-go/claude-haiku-5-5": {
92-
"aa_id": "anthropic/claude-haiku-5.5",
93-
"intelligence": 43.4,
94-
"coding": null,
95-
"agentic": null,
96-
"out_price": 0.333333333,
97-
"in_price": 0.066666667,
98-
"monthly_limit_usd": 15.0,
99-
"provider": null,
100-
"price_basis": "promise",
101-
"rides": {
102-
"clean": 0,
103-
"judged": 0,
104-
"prior": 1.0
105-
}
106-
},
10791
"opencode-go/deepseek-v4-pro": {
10892
"aa_id": "deepseek/deepseek-v4-pro",
10993
"intelligence": 30.4,
@@ -125,9 +109,9 @@
125109
"intelligence": 24.7,
126110
"coding": null,
127111
"agentic": null,
128-
"out_price": 0.075,
129-
"in_price": 0.01875,
130-
"monthly_limit_usd": 80.0,
112+
"out_price": 0.06,
113+
"in_price": 0.015,
114+
"monthly_limit_usd": 100.0,
131115
"provider": null,
132116
"price_basis": "promise",
133117
"rides": {
@@ -387,8 +371,8 @@
387371
"provider": null,
388372
"price_basis": "promise",
389373
"rides": {
390-
"clean": 0,
391-
"judged": 0,
374+
"clean": 1,
375+
"judged": 6,
392376
"prior": 1.0
393377
}
394378
},
@@ -511,8 +495,8 @@
511495
"intelligence": 24.4,
512496
"coding": 52.0,
513497
"agentic": 26.3,
514-
"out_price": 0.14,
515-
"in_price": 0.07,
498+
"out_price": 0.0798,
499+
"in_price": 0.0399,
516500
"monthly_limit_usd": null,
517501
"provider": "streamlake",
518502
"price_basis": "endpoint",
@@ -570,22 +554,6 @@
570554
"prior": 1.0
571555
}
572556
},
573-
"minimax/minimax-m3": {
574-
"aa_id": "minimax/minimax-m3",
575-
"intelligence": 29.2,
576-
"coding": 58.6,
577-
"agentic": 29.5,
578-
"out_price": null,
579-
"in_price": null,
580-
"monthly_limit_usd": null,
581-
"provider": null,
582-
"price_basis": null,
583-
"rides": {
584-
"clean": 0,
585-
"judged": 0,
586-
"prior": 1.0
587-
}
588-
},
589557
"minimax/minimax-m3.1-flash": {
590558
"aa_id": "minimax/minimax-m3.1-flash",
591559
"intelligence": 42.7,
@@ -607,15 +575,15 @@
607575
"intelligence": 43.6,
608576
"coding": 76.2,
609577
"agentic": 50.0,
610-
"out_price": 14.626,
578+
"out_price": 12.0,
611579
"in_price": 1.278,
612580
"monthly_limit_usd": null,
613581
"provider": "morph",
614582
"price_basis": "endpoint",
615583
"rides": {
616584
"clean": 1,
617585
"judged": 1,
618-
"prior": 0.999291
586+
"prior": 0.998594
619587
}
620588
},
621589
"moonshotai/kimi-k3.1-pro": {
@@ -730,6 +698,22 @@
730698
"prior": 1.0
731699
}
732700
},
701+
"openai/gpt-6.1-terra": {
702+
"aa_id": null,
703+
"intelligence": null,
704+
"coding": null,
705+
"agentic": null,
706+
"out_price": null,
707+
"in_price": null,
708+
"monthly_limit_usd": null,
709+
"provider": null,
710+
"price_basis": null,
711+
"rides": {
712+
"clean": 0,
713+
"judged": 0,
714+
"prior": 1.0
715+
}
716+
},
733717
"stepfun/step-5-preview": {
734718
"aa_id": "stepfun/step-5-preview",
735719
"intelligence": 43.7,
@@ -791,7 +775,7 @@
791775
"rides": {
792776
"clean": 1,
793777
"judged": 1,
794-
"prior": 0.963794
778+
"prior": 0.979167
795779
}
796780
},
797781
"xiaomi/mimo-v2.6-pro": {
@@ -855,7 +839,7 @@
855839
"rides": {
856840
"clean": 1,
857841
"judged": 4,
858-
"prior": 0.991667
842+
"prior": 0.995139
859843
}
860844
}
861845
},

‎argocd/resources/agent-gateway/policy.json‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@
2222
}
2323
},
2424
"roles": {
25-
"worker": {"rails": ["opencode", "codex", "anthropic", "openrouter"], "tier": "standard", "harness": "opencode"},
25+
"worker": {"rails": ["anthropic", "codex", "opencode", "openrouter"], "tier": "standard", "harness": "opencode"},
2626
"reviewer": {"rails": ["anthropic", "opencode", "codex"], "tier": "heavy", "harness": "claude"},
2727
"coordinator": {"rails": ["anthropic", "opencode", "codex"], "tier": "standard", "harness": "claude"},
2828
"responder": {"rails": ["anthropic", "opencode", "codex"], "tier": "standard", "harness": "claude"},
29-
"retro": {"rails": ["opencode", "codex", "anthropic", "openrouter"], "tier": "heavy", "harness": "opencode"},
30-
"researcher": {"rails": ["opencode", "codex", "anthropic", "openrouter"], "tier": "heavy", "harness": "opencode"},
29+
"retro": {"rails": ["anthropic", "codex", "opencode", "openrouter"], "tier": "heavy", "harness": "opencode"},
30+
"researcher": {"rails": ["anthropic", "codex", "opencode", "openrouter"], "tier": "heavy", "harness": "opencode"},
3131
"prober": {"rails": ["openrouter", "opencode", "codex", "anthropic"], "tier": "light", "harness": "opencode"}
3232
},
3333
"rails": {
@@ -51,9 +51,9 @@
5151
"user_agent": "fixed",
5252
"credential_probe": {"method": "POST", "path": "/v1/chat/completions", "body": {"model": "deepseek-v4.1-flash", "max_tokens": 1, "messages": [{"role": "user", "content": "."}]}, "backoff_s": [60, 3600]},
5353
"admission": {
54-
"_comment": "Rules only (GW-CATALOG-GO, operator ruling 5, 2026-10-17): prices, peak rows and hours, per-model monthly limits and the window shares come from the Go catalog snapshot, never from here. latch_429_hold_s = openrouter-proxy.py GO_CAPACITY_HOLD_S 900: the hold a Go 429 that names no reset cools its CELL for; latch_scope model = a Go 429 never latches the whole rail (ruling 3: each model has its own limits). windows: the anchors are gometer _GO_WINDOW_DEFAULTS (chain / weekly mon 00:00 / monthly 13 11:30 — self-measured, no vendor source; GO_WINDOW_ANCHORS unset in deployment.yaml), threshold = OPENCODE_UTIL_THRESHOLD's code default 0.80 (unset in deployment.yaml).",
54+
"_comment": "Rules only (GW-CATALOG-GO, operator ruling 5, 2026-10-17): prices, peak rows and hours, per-model monthly limits and the window shares come from the Go catalog snapshot, never from here. latch_429_hold_s = openrouter-proxy.py GO_CAPACITY_HOLD_S 900: the hold a Go 429 that names no reset latches the RAIL for; latch_scope account = a Go 429 latches the whole rail for its retry-after, because every paid Go model draws ONE account allowance and the per-model limits only weight the draw (vendor support, anomalyco/opencode#54875; supersedes the spike's ruling 3 — 2026-11-01, sessions.md §Capacity). windows: the anchors are gometer _GO_WINDOW_DEFAULTS (chain / weekly mon 00:00 / monthly 13 11:30 — self-measured, no vendor source; GO_WINDOW_ANCHORS unset in deployment.yaml), threshold = OPENCODE_UTIL_THRESHOLD's code default 0.80 (unset in deployment.yaml).",
5555
"latch_429_hold_s": 900,
56-
"latch_scope": "model",
56+
"latch_scope": "account",
5757
"window_draw": {
5858
"windows": {
5959
"5h": {"threshold": 0.80, "anchor": "chain", "span_s": 18000, "chain_lookback_s": 604800},
@@ -65,8 +65,8 @@
6565
"plan": "go",
6666
"max_sessions": 3,
6767
"models": {
68-
"light": ["opencode-go/mimo-v2.6-flash", "opencode-go/minimax-m3", "opencode-go/minimax-m3.1-flash"],
69-
"standard": ["opencode-go/minimax-m3.1-flash", "opencode-go/claude-haiku-5-5", "opencode-go/mimo-v2.6-pro"],
68+
"light": ["opencode-go/mimo-v2.6-flash", "opencode-go/minimax-m3", "opencode-go/mimo-v2.6-pro"],
69+
"standard": ["opencode-go/mimo-v2.6-pro", "opencode-go/minimax-m3.1-flash", "opencode-go/step-5-preview"],
7070
"heavy": ["opencode-go/kimi-k3.1-pro"]
7171
}
7272
},

‎docs/spikes/opencode-go-catalog.md‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,10 @@ fetched 19:32:58Z–19:33:13Z):
168168
200 with `spent_micro_cents "0"` and `resets_at 2026-11-01T00:00:00Z`.
169169
- **No endpoint** for Go usage per window or per model, remaining allowance, or window anchors.
170170
The docs only say *"track your current usage in the console"* (a UI).
171+
*Stale as of 2026-11-01:* `GET /zen/go/v1/usage` (also under `/inference/go/v1/`) answers the
172+
Go key `{usage: {rolling, weekly, monthly: {status, percent, resetsAt}}}` — account-level, no
173+
per-model split, no absolute amounts; probed 200 from the jail. Not in the API index, found via
174+
the community `cmd-usage` client.
171175
- **No endpoint** for key metadata such as expiry. Expiry is set when the key is created in the
172176
UI. *"Automations using a revoked or expired key get HTTP 401 immediately."*
173177
- **Service accounts and scopes.** Keys are `oc_sk_…` and belong to a service account. Two
@@ -310,6 +314,12 @@ means prose or a TypeScript literal, open to format drift.
310314
while `go-models.ts` keys them by family (`deepseek-flash`), which ruling 3 rules out.
311315
3. **Limits are keyed PER MODEL** — RULED: each model's windows are 20% / 50% / 100% of its own
312316
monthly limit; one model's 429 or latch never blocks another Go model.
317+
**Superseded 2026-11-01 by the wire:** every paid Go model draws ONE account allowance; the
318+
per-model limits only weight a request's cost against it (OpenCode support's statement,
319+
anomalyco/opencode#54875; the docs still read per model, anomalyco/opencode#60311). Three Go
320+
cells 429'd within eight minutes against one reset, two admitted fresh after the first. The
321+
gateway's opencode rail declares `latch_scope: account` since (sessions.md §Capacity); the
322+
account reading is F5's usage endpoint.
313323
4. **An id missing from the live catalog is REFUSED** — RULED: a typed defer `not-in-catalog`,
314324
never the fallback price. The policy declares the plan (`plan: "go"`), since no API says.
315325
5. **The policy keeps only RULES** (model per tier, thresholds, latch hold, max sessions, anchors,

‎gateway/specs/README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ Start here: **[use-cases/uc-1-worker-ride.md](use-cases/uc-1-worker-ride.md)** (
7878

7979
| Requirement | Page | What it pins |
8080
|---|---|---|
81-
| [GW-SESSIONS-ADMIT](endpoints/sessions.md#gw-sessions-admit) | sessions | may this unit run now, on which rail |
81+
| [GW-SESSIONS-ADMIT](endpoints/sessions.md#gw-sessions-admit) | sessions | may this unit run now, on which rail · `⚑ gap (2026-11-01, PR #3105 → work #3108)`: Go account headroom unread |
8282
| [GW-SESSIONS-ENV](endpoints/sessions.md#gw-sessions-env) | sessions | the pod's complete LLM env per harness |
8383
| [GW-SESSIONS-TOKEN](endpoints/sessions.md#gw-sessions-token) | sessions | the session token's shape, storage, lifetime |
8484
| [GW-SESSIONS-RELEASE](endpoints/sessions.md#gw-sessions-release) | sessions | release and expiry refuse the token |

‎gateway/specs/endpoints/catalog.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -671,7 +671,7 @@ the ⚖ rows of *The deployed policy* below.
671671
| "a tier is a band of the rail's best ⚖" | within a rail, a benched candidate is `heavy` when its score ≥ 0.90 × the rail's top score, `standard` when ≥ 0.75 ×, `light` when ≥ 0.50 ×; a model can sit in several tiers || `tiers.bands` `{heavy: 0.9, standard: 0.75, light: 0.5}` in the deployed policy; every id in a deployed list scores ≥ its band × its rail's top |
672672
| "each list is cheapest per clean ride first, capped at 3 ⚖" | order = cost per clean ride ascending, then input price, then score descending, then id (the last three break ties — the gateway's own choice); the list keeps the first `cap` || `tiers.cap: 3`; every deployed DECIDED priced-rail list has ≤ 3 ids with non-decreasing cost per clean ride (`row_cost` over the snapshot row under the deployed `tiers.cost`) |
673673
| "the subscription rail has no price: score ascending is its cost proxy ⚖" | a subscription rail's candidates carry no per-token price (one flat subscription): the `anthropic` rail and, since 2026-10-22 (FU-270), the `codex` rail (the ChatGPT subscription); their lists are ordered by score ascending — the cheapest-capable first || `PRICELESS_RAILS = (anthropic, codex)` in `agent_gateway.tiers`; every anthropic and codex snapshot row has no price and each deployed anthropic and codex list is strictly score-ascending; the gap row below |
674-
| "the candidates per rail ⚖" | opencode = the Go catalog's `listed` models with a `monthly_limit_usd` under the deployed plan (`opencode-go/<id>`), each at the Go price (`promise` / `measured` / `unlimited`, or unpriced before the fee is read); openrouter = the OpenRouter catalog's models ([GW-CATALOG-OR](#gw-catalog-or): the weekly ranking ∩ AA-benched), each at its SELECTED endpoint's price (`endpoint`, with the provider) or unpriced — never the headline, never the old proxy's table; anthropic = the policy's three aliases `claude/haiku`, `claude/sonnet`, `claude/opus` (an argument of the snapshot script, never code), unpriced; codex = the `codex/<id>` ids the snapshot script is handed (`CODEX_CANDIDATES` — the ENROLLED account's model evidence: its catalog plus one completed turn per id, never a bundled catalog; 2026-10-29 the newest of each family, `gpt-6-luna`, `gpt-6.1-terra`, `gpt-6.1-sol`, `gpt-6-astra`, [the spike §Account model evidence](../../../docs/spikes/codex-subscription-rail.md#account-model-evidence--2026-10-29-homelab3016)), unpriced, joined to the AA row by tail (`codex/gpt-6-astra` ↔ `openai/gpt-6-astra`) || `build_snapshot`; in the snapshot every opencode key is `opencode-go/<id>` with `price_basis` in {promise, measured, unlimited, null}, every openrouter key is a `vendor/model` id with `price_basis` in {endpoint, null} and a `provider` exactly when priced, the anthropic keys = the deployed rail's `claude/` aliases, unpriced, every deployed codex id is a codex key and a codex key on no list is unbenched or below every band, unpriced; `sources.capability.source` = `artificial-analysis`, `sources.openrouter_catalog.fetched_at` present |
674+
| "the candidates per rail ⚖" | opencode = the Go catalog's `listed` models with a `monthly_limit_usd` under the deployed plan (`opencode-go/<id>`) **minus any model a subscription rail already serves** — a Go id whose [twin](../glossary.md#twin) is an anthropic alias's or a codex id's AA row (`opencode-go/claude-haiku-5-5` ↔ `anthropic/claude-haiku-5.5`; operator ruling 2026-11-01: Go is the cheaper door to the priced catalog with the plan's spend limits built in, never a second door to a model the subscription already pays for) — each at the Go price (`promise` / `measured` / `unlimited`, or unpriced before the fee is read); openrouter = the OpenRouter catalog's models ([GW-CATALOG-OR](#gw-catalog-or): the weekly ranking ∩ AA-benched), each at its SELECTED endpoint's price (`endpoint`, with the provider) or unpriced — never the headline, never the old proxy's table; anthropic = the policy's three aliases `claude/haiku`, `claude/sonnet`, `claude/opus` (an argument of the snapshot script, never code), unpriced; codex = the `codex/<id>` ids the snapshot script is handed (`CODEX_CANDIDATES` — the ENROLLED account's model evidence: its catalog plus one completed turn per id, never a bundled catalog; 2026-10-29 the newest of each family, `gpt-6-luna`, `gpt-6.1-terra`, `gpt-6.1-sol`, `gpt-6-astra`, [the spike §Account model evidence](../../../docs/spikes/codex-subscription-rail.md#account-model-evidence--2026-10-29-homelab3016)), unpriced, joined to the AA row by tail (`codex/gpt-6-astra` ↔ `openai/gpt-6-astra`) || `build_snapshot`; in the snapshot every opencode key is `opencode-go/<id>`, none the twin of a subscription candidate's AA row, with `price_basis` in {promise, measured, unlimited, null}, every openrouter key is a `vendor/model` id with `price_basis` in {endpoint, null} and a `provider` exactly when priced, the anthropic keys = the deployed rail's `claude/` aliases, unpriced, every deployed codex id is a codex key and a codex key on no list is unbenched or below every band, unpriced; `sources.capability.source` = `artificial-analysis`, `sources.openrouter_catalog.fetched_at` present |
675675
| "the join to the AA row is a rule, not a table ⚖" | AA ids are `vendor/model` with dotted versions; Go ids are bare: join on the part after the vendor `/` with `-N-N` ↔ `-N.N` normalisation, a `:variant` suffix dropped, the vendor kept when the policy id names one; the three aliases join the NEWEST `anthropic/claude-<alias>-<version>` row by version; no match, or more than one, = unbenched || `join_aa_id`; every snapshot row's `aa_id` is what `join_aa_id` returns over the snapshot's AA ids (no row is a hand-written pair); the rows below |
676676
| "unbenched never tiers ⚖" | a candidate with no AA row is in no list, whatever its price (the free `beam-free` and `longcat-2.5-preview-free` stay out); so does an unpriced candidate on a priced rail (every openrouter model until a cell passed the entry canary) || `derive`; no id in a deployed list has a null `aa_id`, nor a null `out_price` on a priced rail |
677677

0 commit comments

Comments
 (0)