fix(opencode): declare forceStream on transport for free-tier SSE aggregation

Declares forceStream: true so chatCore properly converts upstream
forced-stream responses to JSON for non-streaming callers.

Co-authored-by: anojndr <anojndr@gmail.com>
Co-authored-by: TEGAR-SRC <tegararrahman17@gmail.com>
Co-authored-by: yxxrn <yxxrn@users.noreply.github.com>
Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
decolua
2026-09-18 17:32:52 +07:00
parent d99bc8201d
commit 058ceace48
2 changed files with 6 additions and 0 deletions

View File

@@ -17,6 +17,7 @@ export default {
headers: {
"x-opencode-client": "desktop",
},
forceStream: true,
noAuth: true,
quirks: {
forceAutoToolChoiceModels: ["muse-spark-1.3-contributor-free"],

View File

@@ -311,4 +311,9 @@ describe("OpenCode Stable Session Reuse (429 follow-up)", () => {
expect(chatFull.tools.length).toBe(2);
expect(chatFull.tools[0].function.description).toBe("existing");
});
it("declares forceStream on the opencode transport so chatCore serves SSE upstream", async () => {
const { PROVIDERS } = await import("../../open-sse/config/providers.js");
expect(PROVIDERS.opencode?.forceStream).toBe(true);
});
});