This repository was archived by the owner on Sep 23, 2026. It is now read-only.
fix(llm): send x-opencode-session for OpenCode Go hosts - #2656
Open
FOWEPJF255 wants to merge 2 commits into
Open
FOWEPJF255 wants to merge 2 commits into
FOWEPJF255 wants to merge 2 commits into
Conversation
Contributor
There was a problem hiding this comment.
🔍 Devin Review: 1 flag
Not posted on this PR by your GitHub settings — view it in Devin Review. (Configure)
OpenCode Go returns HTTP 400 when coding agents omit the stable x-opencode-session header. Bind it to the Kimi session id for *.opencode.ai openai-compatible providers, and leave explicit custom headers untouched. Also pass session_id from web title generation. Fixes MoonshotAI#2653
Record the x-opencode-session behavior for users and mention it next to the openai_legacy provider example.
FOWEPJF255
force-pushed
the
fix/opencode-session-header-2653
branch
from
September 22, 2026 13:33
b727520 to
9ec4e64
Compare
This branch has not been deployed
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Related Issue
Resolve #2653
Description
OpenCode Go returns HTTP 400 when coding agents omit a stable
x-opencode-sessionheader.This change:
opencode.ai/*.opencode.ai)x-opencode-sessionto the current Kimi session id foropenai_legacyandopenai_responsescustom_headersvalue untouchedsession_idinto web title-generation LLM creation so that path stays consistentChecklist
make gen-changelogto update the changelog.make gen-docsto update the user documentation.Test plan
pytest tests/core/test_create_llm.py -k opencode-- 5 passed