Skip to content

fix: merge the runtime fixes already live on the hub - #37

Merged
rune-gh merged 20 commits into
mainfrom
fix/hub-live-runtime-fixes
Dec 3, 2026
Merged

rune-gh merged 20 commits into
mainfrom
fix/hub-live-runtime-fixes

Conversation

@rune-gh

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

Copy link
Copy Markdown
Owner

Brings main up to the build the Windows hub has been running. These 20 commits were deployed but never merged, and the PRs stacked after this one start from them.

  • Session affinity persists across restarts, survives tier and transport changes, and keeps observed credential epochs during failover.
  • Quota cooldowns lift when a usage poll shows allowance again, judged from every reported window, without letting traffic on other models delay recovery.
  • Auth files can opt proxied transports into connection pooling (used for the xAI SOCKS route).
  • Smaller fixes: 404 when every account rejects a model, Mistral reasoning levels, Claude Fast error status, replay after interrupted responses, Codex SSE quota events, request-log finalization.

Merges cleanly with main (#35's OpenCode change was already here as 2411ed3).

Testing: go test ./... passes; running on the hub since late November.

🤖 Generated with Claude Code

rune-gh and others added 20 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
@rune-gh
rune-gh merged commit 3eb2170 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