Free Web accounts 429 when duration exceeds 6s, which then rotates
accounts without changing the payload. Add a Grok Web setting
(freeVideoDurationCap, default 6) and clamp duration for free-tier
accounts at the Web adapter so retries are not wasted.
Non-empty ciphertext is not proof of reasoning. HasThinking now requires
encrypted_content / Anthropic signature to meet max(256B, 4 bytes per
usage reasoning token). A hold-expired short greeting billed as heavy
thinking, or a barely-over-floor flush in under a second, is withheld.
Recommended requestRetry values stay 30s / minOutput 8 / 6 attempts /
fail_closed / 12h / 15m idle, plus the new floor knobs. enabled remains
false so stock installs do not intercept.
Empty SSE idle timeouts currently write a hardcoded 24h cooldown via
qualityIdleAccountCooldown. Toggling enabled does not reset health, so a
single-account pool stays on 429 upstream_cooling until the operator
edits sqlite and restarts.
Add POST /api/admin/v1/accounts/:id/clear-cooldown (API + UI) which
zeros failure_count/cooldown_until/last_error. UpdateHealth already
publishes InvalidationAccountHealthChanged, so runtimeStore=memory
selector overlays are replaced.
Expose qualityGuard.requestRetry.idleAccountCooldown (1m–168h, default
24h) independently of missing-thinking accountCooldown. PATCH enabled
while cooling returns enabledDoesNotClearCooldown so the UI can warn.
Closes#976
First no-thinking withhold puts the account on a 24h scheduling
cooldown without disabling it. A later miss after that cooldown
expires disables the account. Quality-guard degrade-accounts now
includes quality_degraded retries as missing_thinking so operators
can see the rotated accounts.
Hold thinking-model SSE until reasoning appears or enough visible
output arrives with none. Do not deliver that first body; switch
accounts up to five more times. After six misses, fail closed with
503 instead of sending a no-thinking reply. Default off.
Add optional routing.autoAssignMaxNodeShare and
autoAssignMaxMigrationShare. Default 0 keeps the historical unbounded
first-pass evacuation and the existing 200-move repair ceiling. Values
in [0.05, 1] cap how many active accounts one healthy node may absorb
and how many already-bound accounts may move in one cycle.
Video generation often runs long, and frequent 429s during create make a dedicated retry/switch budget more valuable than waiting on a single limited account. Add routing.videoMaxAttempts as a number-or-unlimited setting used only for video create-phase account failover, keep poll pinned after create succeeds, surface real upstream statuses such as 429 in video audits, and mark provider create/poll stages so retries stay safe.
Move video 1.5 onto the Console catalog/media path instead of Build free
capability injection. Gateway now forwards the selected upstream video
model, and Console GenerateVideo sends grok-imagine-video-1.5 upstream.
Build free accounts again follow the original Super-only 1.5 rule.
When excludeBuildBotFlaggedFromScheduling is on, account summary
available for grok_build subtracts currently schedulable bot-flagged
accounts so the accounts page routable count matches scheduling.
Add an Account maintenance toggle that removes Build accounts with
bot_flag_source/bfs in {1,2} from ProviderBuild candidate selection only.
Linked Web/Console scheduling is unchanged; accounts stay in the pool.
Add a streamIdleTimeout setting (default 2m, range 30s–10m) to the Grok
Build runtime settings. When a streaming response goes silent for the
configured duration, the request context is cancelled and the read aborts
with a new upstream_stream_idle_timeout error code — instead of hanging
for ~10 minutes until the caller's context deadline fires.
The idle deadline is enforced via an idleTimeoutReadCloser body wrapper
injected at the egress transport layer, covering both the managed-client
and direct-fallback paths. Each successful Read resets the timer, so a
slow-but-steady stream is never interrupted. The wrapper uses
context.WithCancelCause so the Go transport unblocks the in-flight body
read on timeout.
Idle-timeout aborts do not degrade account health (the new error code is
excluded from isUpstreamStreamFailure) and are exempt from egress-node
cooldown, matching the existing treatment of response-header timeouts.
Mirrors the full responseHeaderTimeout pipeline: domain constants, config
struct/validation/default, settings service conversions, HTTP DTO, DB
backfill migration, egress manager atomic field + hot-reload + cache-key
fold, CLI adapter Config field, app assembly wiring, and frontend
types/model/UI/i18n.
Add a hot-reloadable routing switch so different accounts no longer share
the same upstream HTTP/TCP client pool, while the same account keeps
connection reuse. This helps upstream egress load balancers spread
traffic by connection across Build/Web/Console outbound calls.