You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 4890c1c
Browse filesBrowse the repository at this point in the historyBrowse files
fix(providers): identify opencode-free with the client User-Agent it claims
opencode-free sent no User-Agent, so Zen saw the bare runtime default
(Bun/x.y.z) and rate-limited it harder than a client that identifies
itself. Adds "User-Agent: opencode" alongside the existing
x-opencode-client: desktop marker.
The value is deliberately unversioned. OmniRoute, an independent
open-source broker against the same Zen upstream, defaults to exactly
this pair and reached it by retreating from its own earlier
opencode-cli/1.0.0 pin: a pinned version is a claim about an install we
do not have, and it goes stale on the vendor's schedule.
The registry edit alone would have shipped to nobody. staticHeaders is
documented as merged into every upstream request, but it was only ever
copied at seed time, so any config written before a header existed --
or carrying any header of its own -- never received it.
routedProviderConfig and buildModelsRequest now fill registry static
headers beneath user headers, matched case-insensitively so an override
replaces rather than duplicates: spreading "User-Agent" over a user's
"user-agent" leaves both keys, which Headers serializes as one
comma-joined value.
Model discovery gets the same treatment because a provider identified
as opencode when it completes but anonymous when it lists its own
models reads as two different clients to a rate limiter.
note: "No key needed — public desktop tier. OpenCode currently advertises about 200 Big Pickle/free-model requests per 5 hours. The same Zen gateway can also short-window rate-limit free models at roughly 15-20 requests/minute, and may return generic 429s without Retry-After (opencodex synthesizes backoff only when that header is omitted). Free models are discovered live from Zen. Data use: per OpenCode's Zen docs (https://opencode.ai/docs/zen/), prompts sent to free models may be retained and used for training/improvement — do not send confidential material through this provider.",
0 commit comments