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
Garfield1985
pushed a commit
to Garfield1985/DeepSeek-TUI
that referenced
this pull request
Sep 5, 2026
The OpenCode Go and Zen gateways ask clients for a stable `x-opencode-session` header so the service can optimize prompt caching and attribute traffic to one conversation. One UUID v4 per process gives every request from a session the same id; a user-configured header of the same name still wins, because the extra-header loop runs after this insert. Harvested rather than merged: the submitted branch had `client.rs` saved with CRLF line endings, so a 98-line change arrived as a 24,000-line whole-file rewrite that would have flipped the file's line endings for every other contributor. This is the author's exact change and their test, applied to the LF file. `client.rs` was untouched on main since their branch point, so the normalized content is theirs line for line. Their test `opencode_go_and_zen_requests_carry_stable_session_header` passes (1/1), asserting both that the header is present for each gateway and that a second request from the same process reuses the id. Gates: cargo fmt --all --check CLEAN · nextest -p codewhale-tui test(opencode) 18 passed / 0 failed. Co-authored-by: huangxianzhan <264075734+huangxianzhan@users.noreply.github.com> Harvested-from: PR Hmbown#5868 by @huangxianzhan Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QCLLenseqfQdVaZUBqn9yG
Garfield1985
pushed a commit
to Garfield1985/DeepSeek-TUI
that referenced
this pull request
Sep 5, 2026
0.9.12 had no `### Contributors` section, `web/lib/release-credits.ts` still held the 0.9.11 cohort, and the contributor doc band was missing five people whose work landed. Three surfaces that must agree, disagreeing three ways. Everyone whose work reached main this cycle is now named in all three, derived from `Co-authored-by` and `Harvested-from` trailers on v0.9.11..HEAD rather than from memory. The five who were missing: - @qiuYliangM (秋月凉梦) — co-author on Hmbown#5621, Hmbown#5622, Hmbown#5623 - @whp233 — Hmbown#5716, landed as Hmbown#5719 - @Gabriel-Degret — Hmbown#5867 - @huangxianzhan — Hmbown#5868 - @zhuowp — Hmbown#5869 @aboimpinto's entry gained Hmbown#5825 and Hmbown#5865, @M-Maciej's gained Hmbown#5533/Hmbown#5831. `requiredCandidateCredits` in public-surface-facts.json moves from the 0.9.11 cohort to this one — that guard is meant to hold the *current* release's credits in every surface, and it had been pinning the previous release's. `RELEASE_HELPERS` is deliberately empty. Every credited contribution this cycle arrived as code that landed; a name there that no landed change can point at would be a nicer-looking ledger and a less true one. AUTHOR_MAP gains canonical numeric-noreply identities for all five, since the trailers on their harvest commits used raw emails and old-style noreply addresses. web: 386 tests, 386 passed. check:facts, check:docs, check:tokens, check:locales all PASS. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QCLLenseqfQdVaZUBqn9yG
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