Skip to content

feat(web): chart each quota window as its own line, drop drain rate and 5-hour charts - #39

Merged
rune-gh merged 21 commits into
mainfrom
feat/quota-window-lines
Dec 3, 2026
Merged

rune-gh merged 21 commits into
mainfrom
feat/quota-window-lines

Conversation

@rune-gh

@rune-gh rune-gh commented Dec 3, 2026

Copy link
Copy Markdown
Owner

The quota panel had a toggle between remaining and drain-rate charts and a window picker that included the 5-hour windows. This removes both: every quota window a provider reports is now its own coloured line on one chart.

  • Drain-rate mode is gone.
  • The 5-hour windows of Claude and Codex are not charted, and neither are other windows under 24 h when a longer one exists.
  • With several lines, a table above the chart lists each window's remaining amount, estimated empty time, first account to run dry, next reset and burn. With one line, the large headline stays.
  • The hover tooltip lists every line.

Depends on #37.

Testing: bun run verify passes, with new poolChartWindows tests; checked against the hub's real 14-day history.

🤖 Generated with Claude Code

rune-gh and others added 21 commits November 29, 2026 04:35
Configured OpenAI-compatible models without a thinking block all got
low/medium/high. For Mistral that is wrong for most models: GLM-5.3 takes
low/high/max and rejects medium, Magistral and Mistral Small take
none/high, and Codestral, Ministral and Large 2512 reject reasoning_effort
entirely. The hub then rewrote "none" to "low" (rejected upstream or
silently run with reasoning on), passed "medium" through to a 400, and
advertised the wrong levels in the OpenCode catalog.

Models on a mistral.ai base URL now take their levels from a table probed
against the API. Known models without reasoning get no thinking support,
so the hub strips reasoning_effort for them. An explicit thinking block in
the config still wins, and unknown models keep the old default.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 566ac95)
…ling

A file-backed OAuth credential with a proxy_url built a fresh transport on
every request, so each request paid a new TCP, SOCKS and TLS handshake to
the proxy. Only credentials defined in config could carry the
connection-pool block that enables reuse.

Auth files now accept the same block as proxy_connection_pool (true, false,
or an object with enabled, idle-conn-timeout and max-idle-conns-per-host).
Both file loaders, the plugin auth path and PATCH auth-files/fields apply it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Anthropic answers not_found_error "model: <id>" for a model the
subscription cannot use. The hub suspends that model on the account for
12 hours, so the first request returned the upstream 404 and every later
one returned 503 auth_unavailable "no auth available". Claude Code shows
that as a temporary server problem and keeps retrying (seen with
claude-mythos-5-2, including during context compaction).

When every enabled candidate is suspended for the model by a 404, the
selector now returns a non-retryable 404 model_not_found that keeps the
upstream error as its cause. If any candidate is blocked for another
reason, the retryable error stays.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A Codex usage_limit_reached rejection cools the account down until the reset
time it carries. When OpenAI renewed both accounts early, the hub kept refusing
every Codex model for up to four more days, because no request reaches a cooling
account and the quota-history poll that read 0% used only fed routing order.

When a Claude or Codex usage poll shows allowance in every window, the recorder
now clears quota cooldowns recorded before that poll, the same local reset as
POST /v0/management/reset-quota. Cooldowns that are not about quota, such as a
model the account rejects, stay in place, and nothing is sent upstream.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ta blocks

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex limit_reached now blocks recovery even when the parsed windows have
room, a lapsed quota left on a model's own live failure no longer hides it,
and the account-level quota is only judged on its own when no model state
carries it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…oll time

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts:
#	internal/quotahistory/recorder.go
# Conflicts:
#	config.example.yaml
#	docs/t3code.md
#	internal/api/opencode_catalog.go
#	internal/api/opencode_catalog_test.go
#	internal/api/opencode_upstream.go
…d 5-hour charts

Pool cards no longer switch between windows. Every window a provider reports
(Claude weekly and Fable weekly, Antigravity's model groups, Mistral's two
budgets, ...) is a separately coloured line on one chart, with a compact
per-window table for remaining, pool-empty, first-empty, next reset and burn.
Single-window providers keep the large headline. Sub-day windows (5-hour) no
longer get a chart line unless a provider reports nothing longer; the account
table still shows each account's 5-hour meter. The Remaining/Drain rate toggle
is gone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@rune-gh
rune-gh merged commit b25dab5 into main Dec 3, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant