Free profile: when every router model refuses mid-step, the step fails instead of waiting for quota #196

Closed
opened 2026-10-18 02:43:54 -04:00 by cmoriarty · 3 comments
Owner

Seen in run 76 (production 97242c8, Free profile), openspec.apply[5], 2026-10-18 ~06:41Z. The step's session hopped between models turn by turn (Gemini 3.5 and 3.1 Flash-Lite, OVH Qwen3.5) until every model the router could reach refused at once:

  • Kilo reflection/beam-free: its 200 requests an hour (per IP) were used, back at 07:00Z.
  • Gemini 3.5 Flash-Lite: 429 You exceeded your current quota … Quota exceeded for metric: …, limit: 250000, model: gemini-3.5-flash-lite. That is a 250,000-tokens-per-minute limit, at about 45K input tokens a turn. The catalog has no token-per-minute limit for Gemini (operator task 1.6 of free-profile is still open), so the quota view showed the model as breaker_open, not spent.
  • Cloudflare (Gemma 4, glm-4.7-flash): 429 … used up your daily free allocation of 10,000 neurons (code 4006). Most of that day had gone to the probes earlier the same night. Braid's ledger counts only what Braid sends, so it believed most of the day was left.

GoModel returned the last refusal to opencode. Opencode treats a quota 429 (provider.quota) as final, so the turn ended. The attempt closed completed with 0 of 6 tasks done, and the step failed its predicate (group 5: 0/6 done (from tasks.md)). Braid's mediation then retried it (1 of 2). Braid holds a step for spent quota before it starts, but nothing waits when the chain runs dry part way through one. A longer crunch would use up both retries and fail the run.

To do

  1. When a Free step's turn ends on a quota refusal (or every router model is spent), hold the step until the earliest reset, then continue it in the same session ("Paused until …"), instead of failing it and spending a mediation retry.
  2. Learn a limit a refusal names: Gemini's message carries limit: 250000 per model per minute in tokens. Record it as a learned window so the ledger stops sending into it.
  3. Take the provider's own count where it reports one, so spending outside Braid (probes, other tools on the same account) is seen: Cloudflare's cf-ai-neurons header and usage.neurons, or its refusal code 4006/3036 read as "spent until 00:00 UTC".
  4. A simulated-run scenario: the chain runs dry mid-step, and the step pauses and finishes after the reset without a failed attempt.
Seen in run 76 (production 97242c8, Free profile), `openspec.apply[5]`, 2026-10-18 ~06:41Z. The step's session hopped between models turn by turn (Gemini 3.5 and 3.1 Flash-Lite, OVH Qwen3.5) until every model the router could reach refused at once: - **Kilo `reflection/beam-free`:** its 200 requests an hour (per IP) were used, back at 07:00Z. - **Gemini 3.5 Flash-Lite:** `429 You exceeded your current quota … Quota exceeded for metric: …, limit: 250000, model: gemini-3.5-flash-lite`. That is a 250,000-tokens-per-minute limit, at about 45K input tokens a turn. The catalog has no token-per-minute limit for Gemini (operator task 1.6 of free-profile is still open), so the quota view showed the model as `breaker_open`, not spent. - **Cloudflare (Gemma 4, glm-4.7-flash):** `429 … used up your daily free allocation of 10,000 neurons` (code 4006). Most of that day had gone to the probes earlier the same night. Braid's ledger counts only what Braid sends, so it believed most of the day was left. GoModel returned the last refusal to opencode. Opencode treats a quota 429 (`provider.quota`) as final, so the turn ended. The attempt closed `completed` with 0 of 6 tasks done, and the step failed its predicate (`group 5: 0/6 done (from tasks.md)`). Braid's mediation then retried it (1 of 2). Braid holds a step for spent quota before it starts, but nothing waits when the chain runs dry part way through one. A longer crunch would use up both retries and fail the run. **To do** 1. When a Free step's turn ends on a quota refusal (or every router model is spent), hold the step until the earliest reset, then continue it in the same session ("Paused until …"), instead of failing it and spending a mediation retry. 2. Learn a limit a refusal names: Gemini's message carries `limit: 250000` per model per minute in tokens. Record it as a learned window so the ledger stops sending into it. 3. Take the provider's own count where it reports one, so spending outside Braid (probes, other tools on the same account) is seen: Cloudflare's `cf-ai-neurons` header and `usage.neurons`, or its refusal code 4006/3036 read as "spent until 00:00 UTC". 4. A simulated-run scenario: the chain runs dry mid-step, and the step pauses and finishes after the reset without a failed attempt.
Author
Owner

Shipped in ead9f7e (change free-steps-ride-out-refusals). Seen on production in run 78: when every router model refused (Gemini's "exceeded your current quota"), the step parked (osf.free.parked, free_quota, "every model refused the step's turn") until OVH's minute reset, and continued the same session, with no failed attempt. Gemini's 250,000-token-per-minute limit is learned from its refusal. Run 78's failed attempts came from #202, not from this.

Left open: the OpenSpec change is not archived yet, and its tasks are not ticked against production. Deferred when the session wrapped up (2026-10-18).

Shipped in ead9f7e (change `free-steps-ride-out-refusals`). Seen on production in run 78: when every router model refused (Gemini's "exceeded your current quota"), the step parked (`osf.free.parked`, `free_quota`, "every model refused the step's turn") until OVH's minute reset, and continued the same session, with no failed attempt. Gemini's 250,000-token-per-minute limit is learned from its refusal. Run 78's failed attempts came from #202, not from this. Left open: the OpenSpec change is not archived yet, and its tasks are not ticked against production. Deferred when the session wrapped up (2026-10-18).
Author
Owner

Closing: verified on production (run 78, c1228b4): a dry chain parked the step and it continued the same session, with no failed attempt (see above). The OpenSpec change free-steps-ride-out-refusals (shared with #195) archives after free-profile (#164), whose requirements it modifies.

Closing: verified on production (run 78, c1228b4): a dry chain parked the step and it continued the same session, with no failed attempt (see above). The OpenSpec change `free-steps-ride-out-refusals` (shared with #195) archives after `free-profile` (#164), whose requirements it modifies.
Author
Owner

Archived in OpenSpec as free-steps-ride-out-refusals (5a953a0).

Archived in OpenSpec as `free-steps-ride-out-refusals` (5a953a0).
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
cmoriarty/braid#196
No description provided.