Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 11 additions & 9 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -597,17 +597,19 @@ NEXT_PUBLIC_CLOUD_URL=
#OPENCODE_GO_AUTH_COOKIE=auth=...
#OMNIROUTE_OPENCODE_GO_AUTH_COOKIE=auth=...

# OpenCode Go/Zen VPS egress (#5997): on a datacenter VPS, Cloudflare in front of
# opencode.ai/zen/go 403s chat requests that lack OpenCode CLI identity headers.
# When your clients don't already send them, set this to synthesize the CLI headers
# (User-Agent, x-opencode-client, x-opencode-project, fresh request/session UUIDs) on
# absent keys. OFF by default — forward-only is safer when clients already send them.
# OpenCode Go/Zen VPS egress (#5997): on a datacenter VPS, opencode.ai's free tier
# returns FreeUsageLimitError (429) for server-side requests lacking OpenCode CLI
# identity headers. The CLI headers are now synthesized ON by default — sending the
# official fingerprint (User-Agent, x-opencode-client, x-opencode-project, fresh
# request/session UUIDs) turns the 429 into a 200 on the same egress IP. Set
# OPENCODE_SYNTHESIZE_CLI_HEADERS=false to keep the forward-only behavior when your
# clients already send the CLI headers themselves.
# Values are overridable via OPENCODE_GO_USER_AGENT / OPENCODE_USER_AGENT / OPENCODE_CLIENT /
# OPENCODE_PROJECT (defaults: opencode-cli/1.0.0 / cli / default).
# OPENCODE_PROJECT (defaults: opencode/latest/1.18.18/cli / desktop / /opencode).
#OPENCODE_SYNTHESIZE_CLI_HEADERS=true
#OPENCODE_USER_AGENT=opencode-cli/1.0.0
#OPENCODE_CLIENT=cli
#OPENCODE_PROJECT=default
#OPENCODE_USER_AGENT=opencode/latest/1.18.18/cli
#OPENCODE_CLIENT=desktop
#OPENCODE_PROJECT=/opencode

# Ollama Cloud quota scraping. Prefer configuring this per connection in
# Dashboard → Providers → Ollama Cloud. The cookie is sensitive.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- **fix(providers):** OpenCode CLI identity-header synthesis is now ON by default for opencode/opencode-zen/opencode-go — sending the official fingerprint (`User-Agent: opencode/latest/1.18.18/cli`, `x-opencode-client: desktop`, `x-opencode-project: /opencode`, fresh request/session UUIDs) turns opencode.ai's free-tier `FreeUsageLimitError` 429 into a 200 on the same datacenter egress IP (live-verified: raw VPS trace attached at `docs/live-validation/opencode-free-tier-429-200-2026-08-18.log`). Previously opt-in via `OPENCODE_SYNTHESIZE_CLI_HEADERS=true`, the default now synthesizes unless explicitly disabled with `OPENCODE_SYNTHESIZE_CLI_HEADERS=false`. Client-supplied `x-opencode-*` headers still win, EXCEPT User-Agent — a non-CLI client UA (e.g. curl, SDKs) is still replaced with the CLI UA because the free tier rejects generic client UAs from datacenter IPs. All values remain env-overridable (`OPENCODE_USER_AGENT` / `OPENCODE_CLIENT` / `OPENCODE_PROJECT`, or `<PROVIDER>_USER_AGENT`). Docs: `.env.example` updated to match. (#5997 follow-up)
Loading