Files
opencode2api/internal/httpx/client.go
T
58 8185202382 fix: use canonical OpenCode session IDs for Zen free tier
Upstream began rejecting anonymous free-tier requests whose
x-opencode-session does not match ses_[0-9a-f]{12}[0-9A-Za-z]{14}
with 403 FreeTierError. Map every downstream identity into that
shape deterministically (preserving native sessions), and bump
the impersonated client version to 1.18.31.
2026-09-17 14:07:36 +08:00

11 lines
174 B
Go

package httpx
import (
"fmt"
"runtime"
)
func UserAgent() string {
return fmt.Sprintf("opencode/1.18.31 (%s %s; %s)", runtime.GOOS, runtime.GOARCH, runtime.Version())
}