206 Commits
Author SHA1 Message Date
Jason Xu 58f56676ba feat(webui): theme toggle, paged ledger, working refresh status, and collapsed proxy chips
- Dark theme: an auto/light/dark cycle in the topbar, persisted per
  browser and applied before first paint by an inline head script; the
  dark palette moves behind data-theme so the runtime choice wins over
  the media query (#122).
- Request routing and upstream attempts tables are paged (50/100/200/500
  rows per page) instead of a hard last-100 cap, with translated pager
  controls (#122).
- Free-model refresh status now calls POST /api/models/probe, which
  marks every automatic model due and wakes the probe loop, then reloads
  the snapshot; the button re-probes instead of only rereading the cache
  (#122).
- The config page renders long key/proxy lists collapsed behind a
  100-chip cap with an expand toggle, so a large proxy pool no longer
  freezes the page (#146).
- New strings translated for en/vi/it; READMEs document the new
  admin endpoint.
v1.4.6
2026-10-30 04:16:18 +08:00
Jason Xu 2bf547c0d9 chore: drop _test.go files to keep the released tree test-free
Strips the tests that arrived with #152 and #139 after their squash
merges.
2026-10-29 21:59:15 +08:00
sri krishna d07ee0e23d fix(gateway): report client-actionable status codes (#139)
Two client-facing errors were uninformative, and a harness cannot recover
from either.

1. An unknown model was reported as 400 "the model uses an upstream protocol
   that opencode2api does not expose". That phrasing is accurate for a model
   the catalog KNOWS but cannot serve (a capability or routing problem), and
   wrong for a model the upstream has never offered. A model the upstream
   retired (it answers 410 Gone) produced this 400, so a harness kept
   retrying a model that no longer exists. The catalog can now tell the two
   cases apart (ModelCatalog.Known), and an unknown model returns 404 with
   code model_not_found.

2. A request whose every attempt failed while WRITING the body was reported
   as 504 "upstream request timed out". The upstream never finished reading
   the body, so the payload is too large, and a client that can shrink the
   request knows to shrink it. Harnesses that recover from an oversized
   payload generally key on HTTP 413 (and image rejection on 400), so a 504
   sent the same oversized payload around forever. A write-phase failure
   while the request budget is still alive now returns 413 with code
   payload_too_large; every other phase (headers, first_event) stays a 504,
   because a slow upstream or a thinking model is not the client's fault.

Both paths are applied to the chat, responses and messages endpoints as well as
to /v1/systemone.

Tests: the 404 vs 400 split, and the 413 vs 504 split. Both mutation-proved:
reverting either change fails the matching test.
2026-10-29 21:58:31 +08:00
daming 大铭 5371ada2eb fix(protocol): preserve whitespace in streamed reasoning deltas (#152) 2026-10-29 21:57:29 +08:00
Jason Xu d8bcebd8ea chore: drop _test.go files to keep the released tree test-free
The repository ships without test files; strips the tests that arrived
with #160, #161 and #162 after their squash merges.
2026-10-29 21:41:13 +08:00
CheerC 6bb3487f7f fix(probe): give probes and the Playground bench their own identity (#162)
The hourly free-model probe presented one pinned identity: project
"opencode2api:default-project" together with a session derived from the
model name. The free tier meters per project id and egress, so every
deployment running the same probe shared one bucket; once a popular exit
had charged that bucket, every probe answered 429 FreeUsageLimitError and
the model was cached as unavailable for an hour while live traffic on the
same process and egress succeeded.

The Playground bench pinned a session indirectly: it sent no session
signal, so DeriveRequestIDs fell back to conversationSeed — the system
prompt plus the first user turn — and every click replaying the same
prompt produced the same session.

Neither path is a conversation, so neither should present one. Each now
mints fresh identity per attempt: a canonical session and a random project
id for the probe, a canonical session per Playground click. Canonical ids
are forwarded verbatim, so the scope mixin does not apply and the shape the
free tier accepts is what goes out.

Verified end to end with the admin UI enabled on a temporary instance.
Three Playground clicks before the change logged the same upstream session
three times (ses_ea4eb1680ffe0B8cZBh0nKJ03A); two clicks after logged
ses_eb2c888f1ffe4Y0DodMQdwvu6c and ses_ed8748efdffe2ez6IH352OdMpV, both
200. Probes on this build measured 8/8 probe_succeeded with a fresh
availability cache — they already succeeded on this exit before the change,
so this is hardening for the charged-bucket case in the report, not a
reproduction of it.
2026-10-29 21:40:31 +08:00
CheerC 4a4db10387 fix(free-tier): hide client tool names from shaped requests (#161)
The free tier refuses a shaped body whose tool list still reads as another
client's session. A Claude Code request that declares both ReportFindings and
ScheduleWakeup is answered with FreeUsageLimitError — the same 429 a genuinely
exhausted IP receives — and the refusal is deterministic: rename either name
and the same request succeeds, and two empty placeholder tools carrying just
those two names reproduce it. Schema, size and tool count do not matter.

The gateway forwarded client tools as clint_<name>, so every Claude Code
session behind CLIProxyAPI was refused (14 tools, both markers present) while
the official CLI kept working and small requests through the gateway were
fine.

Client tools now get an opaque wire name: clint_ plus 12 hex characters of the
name's SHA-256, collision-suffixed like before. Descriptions and schemas are
untouched, so the model still knows what a tool does, and the response path
still restores the names the client declared, streaming included.

Verified against the captured Claude Code request (95 KB, 14 tools):
3/3 429 before the change, 3/3 200 after, and the same request replayed
through CLIProxyAPI (Anthropic /v1/messages -> chat -> /inference) returns
200. Session ids are unaffected: they are normalized by CanonicalSessionID,
and an implausible session timestamp is a separate 429 trigger documented
there.
2026-10-29 21:39:19 +08:00
CheerC 9946e66fa6 fix(identity): salt derived session ids per process (#160)
CanonicalSessionID re-encodes a conversation signal from the server key and
the seed alone, so the upstream `x-opencode-session` was identical in every
process on the same UTC day. The free tier keeps charging that session, so
after a 429 a gateway restart no longer changed anything upstream: the same
`ses_…` walked into the new exit's bucket and 429'd again.

Mix a 16-byte nonce, minted once per process, into the hash. A running
gateway still derives one stable session per conversation, while a restart
re-mints the ids and starts a fresh upstream identity. Official client
sessions are still forwarded verbatim.

Refs #159, #158
2026-10-29 21:38:45 +08:00
Jason Xu b13bf6989c docs: use the IPWO sponsor card in every README
Replace the remote banner and the prose line with the logo-plus-text card
that ships as assets/IPWO.png, translated per language.
2026-10-27 19:16:36 +08:00
Jason Xu a4ccac76b7 fix(warp): schedule pool timers under the pool lock
after() added to the pool wait group outside the lock, so a timer scheduled just as Close began Wait could be missed by the shutdown wait. Increment under the lock and refuse to schedule after Close, which removes the Add/Wait race.
2026-10-27 18:58:54 +08:00
Jason Xu 54fe16ebb7 feat(free-tier): use only the v2 lane and fold response tool names
The anonymous free tier now calls the configured v2 /inference origin only; the retired v1 /zen fallback is commented out rather than deleted, so the lane order can be restored in one edit. Catalog refresh and probes follow anonymousUpstreams, so they stop trying /zen too.

A request whose client names no project now gets a fresh 40-hex project id. The free tier ledges quota per project id and egress, and the old per-caller default was one shared bucket that popular exits had already burned.

Response tool names now resolve in the order exact wire name, clint_ prefix, case fold, separator fold. A fold two declared tools share is never guessed between. The stream and JSON rewriters share the resolver, and their fast path now recognizes unprefixed tool-call frames.
2026-10-27 18:58:54 +08:00
Jason Xu 1de0f3fa47 fix(warp): wait out a rate limit during the first registration
Startup registers the first exit synchronously and failed closed on any
error, including Cloudflare's rate limit — which a fresh process can still
receive because the limit follows the source address. Wait out the pause
inside the initialization deadline instead, and give WARP initialization
one full rate-limit window so a deploy does not fail on a limit that is
about to expire.
2026-10-27 18:58:54 +08:00
Jason Xu a8e2576171 fix(warp): pace registration from Cloudflare and stop probe churn
A Cloudflare 429 on /reg no longer sleeps inside the registration path:
the registrar records the Retry-After window and fails fast, and the pool
schedules its next attempt after that window. Registration can no longer
hold createMu for minutes while requests wait for an exit.

Refill backs off when the colo hands out fewer distinct egress blocks
than the preload: three consecutive duplicate registrations pause it for
1-5 minutes instead of registering into a saturated colo forever.

Automatic free-model probes skip a pool with fewer than two exits and
stop the sweep after one probe retires an exit, so they cannot drain the
warm bench. Diagnostics are unaffected.
2026-10-27 18:58:54 +08:00
Jason Xu 3136a5c4ab feat(warp): preload half the pool and register without a fixed gap
Registrations were paced by a fixed 12-second gap, which made a cold pool
and a 429 replacement wait minutes for capacity. Remove the gap: the
registrar now issues registrations back to back in the background,
serialized by the pool's create mutex, and only a rejected attempt backs
off (doJSON still honours Retry-After).

Keep half of warp.pool_size (at least one) hot as a preload: the first
exit still gates readiness, the rest register in the background, and
desiredLocked/scaleDown treat the preload as a floor so idle surplus is
still retired after 60 seconds but the warm bench survives. A 429 or 403
removes the exit from the ring and the next request uses a preloaded exit
immediately.

/healthz reports warp.preload, and the WebUI and all four READMEs
describe the behaviour.
2026-10-27 18:58:53 +08:00
Jason Xu 082cce2167 Change IPWO sponsor image to full width
Updated the image tag for IPWO sponsor in README.
2026-10-27 14:32:43 +08:00
Jason Xu d60b53137d Adjust sponsor image width in README.zh-CN.md
Updated sponsor image width in the Chinese README.
2026-10-27 14:30:22 +08:00
Jason Xu a28748ea1c Change IPWO sponsor image in README
Updated sponsor image for IPWO in the README.
2026-10-27 14:25:28 +08:00
Jason Xu 6797d2bf80 Update README.zh-CN.md 2026-10-27 14:25:01 +08:00
Jason Xu 48f208359b 更新 README.it.md 2026-10-27 12:02:46 +08:00
Jason Xu c02e3b805f 更新 README.vi.md 2026-10-27 12:00:47 +08:00
Jason Xu b6fb76ae3b 更新 README.zh-CN.md 2026-10-27 11:59:19 +08:00
Jason Xu cbd1f7bec5 更新 README.md 2026-10-27 11:58:40 +08:00
Jason Xu ded9a6c59c 更新 README.it.md 2026-10-27 11:55:35 +08:00
Jason Xu 3b2d75da21 更新 README.vi.md 2026-10-27 11:55:16 +08:00
Jason Xu b36ea8c8cd 更新 README.zh-CN.md 2026-10-27 11:54:38 +08:00
Jason Xu 0c3251c852 更新 README.md 2026-10-27 11:54:18 +08:00
Jason Xu b8b1454a0e fix(warp): rotate exits on a live pool and size it to concurrency
The WARP pool could never rotate: its lifetime context was derived from the
startup deadline, so every standby registration and replacement died with
"context canceled" and requests stayed on the first egress forever. Give the
first registration the caller's deadline and the pool a context that only
Close cancels.

- warp.pool_size is an upper bound. The active ring follows concurrency (one
  exit per lease, one per queued request, plus a spare) and trims idle surplus
  after 60 seconds, so a burst expands it and quiet periods shrink it.
- An IPv6 exit is deduplicated and cooled by its /64 for 30 minutes (IPv4 by
  its /32), since the free quota is scoped to that block.
- 429/403 retires an exit immediately and re-registers right away; a free
  model request keeps switching exits and only returns the last 429 after
  retry.max_attempts, on both the anonymous and the Zen-key lane. 429s no
  longer trip the anonymous breaker or cool the key.
- Pin HTTP/1.1 ALPN and TLSNextProto on the WARP transport: a clone of
  DefaultTransport made after its first dial negotiated h2 and fed SETTINGS
  frames to the HTTP/1.x reader, breaking catalog refresh.
- Default to the IPv6 stack and, with warp.source_ipv6, let each exit bind its
  own outer source from a routed prefix via IPV6_FREEBIND. Endpoints try IPv6
  first and fall back to IPv4, so IPv4-only hosts keep working.
- WebUI, config example and all READMEs describe the new pool and rotation
  behaviour.
v1.4.4
2026-10-25 06:49:00 +08:00
Jason Xu 953310117d fix(free-tier): keep ses_ session timestamps inside the upstream window
The upstream decodes ses_ as ~((ms << 12) | counter) and rejects an
implausible timestamp with the same 429 Free usage limit it returns for an
exhausted quota, so a hash-derived id made healthy egresses look blocked.
Anchor the timestamp to the current UTC day minus a hash-chosen offset of
at most 30 days, keeping the id deterministic for a given request signal
while staying inside the accepted window.
2026-10-25 06:48:54 +08:00
Jason Xu fd4c1c6d40 feat(free-tier): prefix client tools with clint_ and complete the official set
Shaped free-model requests now look like an official CLI session on every
lane. Each client tool is renamed to a sanitized, collision-free clint_ name
and the full official tool set for the lane is appended (11 tools on the 1.x
/zen lane, 13 on 2.x /inference and /zen/go). Requests without tools, with an
empty array, or with a legacy functions array receive the official set too,
and tool_choice, function_call and the tool-call history are rewritten to
match.

Responses, streaming and not, are restored to the names the client declared,
including a Chat in a stream split across chunks. Unmapped names pass through,
so an official tool the client never declared is never hidden or replayed.
2026-10-25 05:58:02 +08:00
Jason Xu 97cdb29713 feat(free-tier): inject the official OpenCode system prompt
The free tier only accepts agent-shaped traffic and checks it against the official CLI's prompt. Every shaped free-model body now carries that base prompt plus the <env> block (model, working directory, platform, UTC date) and the built-in skill listing.

- v1 /zen uses the 1.x tool names; /inference and /zen/go use the 2.x names.
- Chat folds system and developer messages into one leading system message, Anthropic prepends to system (string or text block), and Responses prepends instructions.
- A body whose system content already carries the marker is passed through, so the prompt is never duplicated. System One is untouched.
- Key-tier free models receive the same shaping; paid models and Go-tier paid traffic are unchanged.
2026-10-25 05:52:43 +08:00
Jason Xu 4438acb8e7 feat(egress): route free-model traffic through userspace WARP
Free-tier requests now optionally leave through a Cloudflare WARP tunnel that runs inside the gateway process: WireGuard over UDP plus a gVisor netstack, so no TUN device, root, NET_ADMIN, or route changes are needed. Adapted from github.com/sudogeeker/ai-route (MIT).

- warp.enabled/pool_size/stack in config, the WebUI, config.example.json and all READMEs; startup and hot reload fail closed when WARP cannot initialize.
- Anonymous lane, free-model Zen-key fallback, free-model probes and the anonymous catalog refresh send no proxy traffic while enabled; Go keys and paid models keep their proxies.
- Per-attempt leases feed 403/429 rotation and broken-tunnel failures back into the pool; /healthz and /api/monitor expose the pool state and readiness requires an active exit.
- errWARPUnavailable maps to a 503 warp_unavailable response.
2026-10-25 05:51:00 +08:00
Quheng DengandWengeLiu101 57b906b23f fix(proxy): treat any failed probe as a proxy failure, not just timeouts (#111)
checkClaimedProxy() only marked a proxy unhealthy when the probe error was a
timeout or ECONNREFUSED (isProxyFailure). A proxy that answers the CONNECT with
its own error -- e.g. a provider refusing because the plan's bandwidth is
exhausted -- produced an error matching none of those cases, so the probe was
reported as inconclusive and the proxy stayed healthy forever: never taken out
of rotation and never re-bound for key traffic.

A probe is a plain HTTP GET issued through the proxy; if it returns no response,
that proxy cannot serve traffic, whatever the reason. Count every
non-cancellation error as a failure. context.Canceled stays exempt because it
says the caller gave up, not that the proxy is down.

Scope: the probe path only. syncProxyResult() (real traffic) and the anonymous
attempt loop keep using isProxyFailure deliberately -- there an error may come
from the upstream rather than the proxy, so staying conservative is correct.

Co-authored-by: WengeLiu101 <233876084+WengeLiu101@users.noreply.github.com>
2026-10-23 09:25:00 +08:00
Quheng DengandWengeLiu101 05874a5bf0 fix(webui): stop browsers serving a stale embedded UI after upgrade (#112)
The management UI is embedded in the binary (//go:embed) and served through
http.FileServerFS. Those responses carry no Cache-Control, and the embed FS
reports a zero modification time, so there is no Last-Modified or ETag either.
Browsers are therefore free to apply heuristic caching and keep an old
index.html/app.js/styles.css for hours.

That is invisible until the operator upgrades the binary: the new backend then
serves requests that the cached old frontend does not know about, so newly
added pages never appear (or the UI breaks) until the cache expires or the user
hard-refreshes.

Set Cache-Control: no-cache on the embedded assets so the browser always
revalidates. Revalidation is cheap against a local server, and it makes the UI
version follow the binary version, which is the invariant the embed implies.

Co-authored-by: WengeLiu101 <233876084+WengeLiu101@users.noreply.github.com>
2026-10-23 09:24:48 +08:00
FLYFandAiFLYF 4e2edbf1e6 fix(upstream): let the runtime own Accept and Content-Length placement (#143)
A captured 2.1.1 request carries neither an Accept header nor a trailing
Content-Length: fetch fills Accept with */* and computes Content-Length as
part of the common-header block. The gateway set both itself, so the v2 lane
sent an Accept value the client never produces and put Content-Length last,
where no fetch request has it.

Header order and presence are part of what a fingerprint sees, so the v2 lane
now sets no Accept and the Bun head emits Content-Length among the common
headers instead of trailing the request.

The v1 lane keeps its own Accept, which is what that client sends.

Co-authored-by: AiFLYF <AiFLYF@users.noreply.github.com>
2026-10-23 09:24:37 +08:00
FLYFandAiFLYF 5c5100c470 feat(upstream): match the 2.x client's chat body byte for byte (#142)
The v2 gate fingerprints the body as well as the headers, and five details
still differed from a captured 2.1.1 request:

- The client sends max_completion_tokens: 32000 on every chat body. The
  gateway now adds it when the caller asked for no ceiling; an explicit
  max_tokens or max_completion_tokens still wins.
- Every client tool carries "strict": false, so a tool that omits the field
  is byte-different from the client's on every request that carries tools.
- The shell tool description names the shell the client actually has, so a
  Windows host advertises a different one than the captured Unix wording.
- Chat bodies keep the client's key order, model first. Go writes map keys
  alphabetically, which puts max_completion_tokens at the front where a real
  client starts with model.
- Bodies are encoded without HTML escaping. encoding/json writes \u003c,
  \u003e and \u0026 by default where JSON.stringify writes the characters,
  and tool descriptions are full of both.

The ordered encoder falls back to plain encoding/json for every lane except
the v2 chat one, and both re-encode points in the request path use it.

Co-authored-by: AiFLYF <AiFLYF@users.noreply.github.com>
2026-10-23 09:24:20 +08:00
FLYFandAiFLYF f9ef5693ab feat(upstream): follow the OpenCode 2.1 client's version and /inference routes (#141)
Captured a 2.1.1 CLI request with the plugin hook that produced the 2.0.32
capture. The body is byte-identical; what moved is the version string and the
route.

The 2.1 client groups /inference routes by provider family, so a chat request
goes to /inference/openai/v1/chat/completions, responses to
/inference/openai/v1/responses and messages to /inference/anthropic/v1/messages.
A 2.0.32 client posted the protocol path directly and that route still answers,
so this is fidelity rather than a fix.

The family segment is only inserted for the /inference origin: a custom base
URL and the /zen/go lane keep the flat route, because the grouping belongs to
/inference alone.

Co-authored-by: AiFLYF <AiFLYF@users.noreply.github.com>
2026-10-23 09:23:58 +08:00
Jason Xu ab55803cdc docs: document explicit reasoning disable in translations (#151) 2026-10-23 08:46:03 +08:00
Jason Xu 394acb5de3 fix(protocol): preserve explicit reasoning disable (#150) 2026-10-23 08:38:15 +08:00
Jason Xu 56a789d560 feat: add Italian WebUI localization
Repairs the Italian README documentation and includes all four README translations in release archives.
2026-10-23 07:02:00 +08:00
Jason Xu 189ef7e433 docs: repair Italian README and include it in releases 2026-10-23 07:01:21 +08:00
croccio fee095680f fix(webui): address PR #144 review — auto-detect Italian, wire API-key card, polish Italian copy 2026-10-22 13:57:48 +02:00
croccio 22d584f34c feat: add Italian localization for the WebUI
Extend the WebUI internationalization module with Italian (it) support,
including locale metadata (flag, label, date formats) and comprehensive
translation strings covering the operator manual, dashboard, configuration
center, diagnostics, quotas, and logs.
2026-10-21 10:23:41 +02:00
Jason Xu 0bb23c7a7f fix(upstream): stop retrying request-level rejections and cap anonymous exits
The anonymous walk now ends on a deterministic 4xx instead of replaying the same context-length rejection through every exit and tier. Static exits are capped by performance.max_anonymous_exits, and an IP-level abuse block marks only its exit; the lane breaker opens only when every exit is blocked, so a single 403 no longer pauses the lane. The Zen key tier is skipped after an IP block while the authenticated Go tier remains available. Add performance.free_tier_block_seconds, make the breaker half-open probe single-flight, and coordinate refreshes and availability probes with the breaker. Update the shipped example to start on the anonymous lane.
2026-10-21 02:52:52 +08:00
Jason Xu ddb5c14b3f Merge pull request #140 from tubimasky/pr-anon-breaker
Add an opt-in circuit breaker for the anonymous free-tier lane.
2026-10-21 02:28:20 +08:00
Jason Xu 07ba89af9f Merge pull request #127 from cuipengcx90/fix/anonymous-exit-cap
Cap the number of static anonymous exits walked per request.
2026-10-21 02:28:00 +08:00
Jason Xu 07aa4534b9 Merge pull request #132 from cheerc/fix/free-tier-ip-abuse
Handle free-tier IP blocks and stop retrying request-level rejections.

Test files from the PR are omitted: this repository does not keep _test.go
files, so they are removed in the merge commit.
2026-10-21 02:27:11 +08:00
rock 8cc5e96489 feat(gateway): pause the anonymous lane after repeated failures
A flagged free-tier exit keeps answering 403 (IP-level abuse detection)
and retrying only extends the penalty. Add an optional lane-level circuit
breaker, configured with models.anonymous_backoff:

- threshold consecutive failed anonymous attempts, or one 403/429, pause
  the whole lane for base_hours, doubling on every further trip up to
  max_hours;
- while paused, no proxy is drawn and no upstream request is made, so
  routing falls straight through to the authenticated tiers;
- a successful attempt closes the breaker and restores the free lane;
- absent config leaves behavior unchanged;
- availability probes honour the breaker instead of refreshing the block.
2026-10-20 23:02:10 +08:00
CheerCandClaude Code fa9a25577e fix(upstream): stop retrying request-level rejections and ignore placeholder keys
A free-tier 400 (context_length_exceeded, invalid_request_error) was
treated as retryable: the gateway walked the second anonymous lane, then
the keyed tier, and the client received whatever the last tier answered.
With the documented placeholder in zen_keys, a 941 KB request that only
needed compaction came back as "401 Invalid credential".

- classify request-level rejections (400/422 with invalid_request_error,
  context_length_exceeded, maximum context length, string_above_max_length
  or prompt is too long) and end the request after the first attempt on
  both the anonymous and keyed lanes, forwarding the original status and
  body; 401/403/429 stay retryable because they can be key-specific;
- read the body once with peekResponseBody so classification does not
  consume what the client eventually receives;
- drop documented placeholder keys (sk-your-zen-key, change-this-local-key)
  during config normalization: they never authenticate, and keeping them
  turns every free-tier fallback into a 401 that hides the real error.

Verified end to end by replaying the recorded request against the built
binary with the original configuration: 400 with the upstream message,
one upstream attempt, an anonymous key_id, and zen/go pools of 0.

Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-10-20 21:22:25 +08:00
CheerCandClaude Code 3e8318578d fix(upstream): treat the free-tier IP block as terminal for the exit
The free tier answers an egress IP it flagged with 403 "abusive traffic".
The gateway read that as an ordinary rejection: it tried the second
anonymous lane on the same IP, then the keyed tiers from the same IP, and
remembered nothing, so every later request and every probe repeated the
walk. A single client request produced four upstream 403s on an instance
with one exit.

- classify the three known IP-block wordings (abuse.go) without consuming
  the body, so the upstream response stays intact for the caller;
- cool only that exit (proxyTransport.blockedUntil) and leave the lane:
  another lane on the same IP cannot help, and neither can a keyed tier;
- keep blocked exits out of anonymousCursor.Next, including its cooldown
  fallback, and bring them back after a 15 minute TTL;
- skip the keyed tiers once the anonymous phase reports the block;
- answer clients with 503 free_tier_ip_blocked instead of forwarding the
  upstream "turn off your VPN" text;
- record probes as network_abuse_blocked instead of http_403;
- count anonymous attempts, which stayed at zero and broke the telemetry
  attempt numbers and the request budget.

Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-10-20 21:22:09 +08:00
Jason Xu f0f064f31d fix: align the v2 free-tier shape with OpenCode 2.0.32
- Use the genuine patchText description and keep the Linux/bash shell sentence.
- Preserve the client's child session id separately from the affinity.
- Scope the anonymous parent session id like every other derived identity.
- Append beta=true only on v2 Anthropic lanes and parse the query safely.
- Remove the redundant v1 project renderer and duplicate anthropic-version.
- Revert the formatting-only churn in opencode_tools.json and update lane docs.
v1.4.3
2026-10-20 18:13:56 +08:00