feat: send x-opencode-session header for OpenCode Go/Zen providers - #5868
Open
huangxianzhan wants to merge 1 commit into
Open
feat: send x-opencode-session header for OpenCode Go/Zen providers#5868huangxianzhan wants to merge 1 commit into
huangxianzhan wants to merge 1 commit into
Conversation
Contributor
|
Thanks @huangxianzhan for taking the time to contribute. This repository is observing a maintainer-managed PR intake gate in dry-run mode, so this pull request is staying open. This note helps maintainers prepare the allowlist before any enforcement is considered. Please read |
Replaces the earlier commit whose blob carried CRLF line endings, producing a noisy full-file diff. Same code: process-stable x-opencode-session UUID v4 for OpencodeGo/OpencodeZen in build_default_headers, user-configured header wins, three unit tests.
huangxianzhan
force-pushed
the
feat/opencode-session-header
branch
from
September 4, 2026 02:45
7faf58e to
4a2d296
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
OpenCode Go (https://opencode.ai/docs/go/) asks clients to send a stable \x-opencode-session\ header so it can optimize prompt caching and attribute traffic to a conversation. Codewhale requests were missing it, and the client UA (Mozilla/5.0 compatible codewhale/...) gets classified as a plain browser on the gateway; traffic without the header may error starting 2026-09-06.
Changes
Verification