Description
muse-spark-1.3-contributor-free (provider opencode / Console / Zen) consistently fails mid-session when switching models, with:
Error from provider (Console): Upstream request failed: [invalid_request_error] reasoning `encrypted_content` was not issued to this caller
muse-spark-1.2-contributor-free does not trigger this in the same workflow.
Reproduction
- opencode
1.18.30 (both ~/.opencode/bin/opencode and ~/.npm-global/bin/opencode are 1.18.30, plugin @opencode-ai/plugin@1.18.30)
- Start a session with
muse-spark-1.2-contributor-free (provider opencode)
- Chat for a few turns (reasoning enabled by default:
transform.ts sets include: ["reasoning.encrypted_content"] for providerID.startsWith("opencode"))
- Switch model in the same session to
muse-spark-1.3-contributor-free and send next message
Result: every subsequent request fails (see logs below). Also reproducible in reverse (start with 1.3 then switch to 1.2/other models) — symmetric cross-model replay issue.
Fresh session starting directly with 1.3 works fine; failure only occurs when session history contains reasoning.encrypted_content issued by a different caller/model and is replayed.
Logs
~/.local/share/opencode/log/opencode.log (30+ occurrences, same session IDs):
timestamp=2026-09-13T08:22:14.112Z level=ERROR run=99d847df message="stream error" providerID=opencode modelID=muse-spark-1.3-contributor-free session.id=ses_f6c6b96a9ffePiDYbHphIWblIr small=false agent=build mode=primary error.error="AI_APICallError: Error from provider (Console): Upstream request failed: [invalid_request_error] reasoning `encrypted_content` was not issued to this caller"
timestamp=2026-09-13T08:46:43.962Z level=ERROR run=0ac5e92c message="stream error" providerID=opencode modelID=muse-spark-1.3-contributor-free session.id=ses_f66192d6bffe1g2Y9nnuRNruxP small=false agent=build mode=primary ...
# (full log has 30+ identical errors for ses_f6c6b96a9ffePiDYbHphIWblIr and ses_f66192d6bffe1g2Y9nnuRNruxP)
Root cause (suspected)
muse-spark-1.3 returns reasoning items with encrypted_content (opaque, caller-bound, see also #43584 where muse-spark-1.2 already returns encrypted_content with summary:[]). transform.ts:447 enables include: ["reasoning.encrypted_content"] for all opencode providers, so history replay includes that blob.
When switching models mid-session, opencode replays the previous model's encrypted_content to the new model. Upstream Console validates the caller and rejects (was not issued to this caller). Same class as recent Claude fix in v1.18.27 (thinking.blockBinding tolerance for stale blocks), but no equivalent tolerance for OpenAI-style reasoning.encrypted_content on the opencode provider path.
PRs #45050/#45032/#44997 fixed similar store:false replay for openai/azure providers, but native-runtime.ts allowlist and transform handling for opencode provider's muse-spark family does not yet strip/isolate encrypted_content on model switch.
Expected
Cross-model switch in same session should not fail. Similar to Claude fix, opencode should drop encrypted_content (keep only summary) when replaying reasoning across different models/callers, or isolate reasoning per model.
Environment
- opencode
1.18.30 (latest as of 2026-09-13), also tested after fresh curl -fsSL https://opencode.ai/install | bash
~/.opencode plugin 1.18.30
- OS: Linux (Ubuntu),
opencode web --port 4096 and TUI
Workaround
Start a new session (/new) when switching between muse-spark-1.2 and 1.3 (or any reasoning model). /clear before switch also avoids the replay.
Description
muse-spark-1.3-contributor-free(provideropencode/Console/Zen) consistently fails mid-session when switching models, with:muse-spark-1.2-contributor-freedoes not trigger this in the same workflow.Reproduction
1.18.30(both~/.opencode/bin/opencodeand~/.npm-global/bin/opencodeare1.18.30, plugin@opencode-ai/plugin@1.18.30)muse-spark-1.2-contributor-free(provideropencode)transform.tssetsinclude: ["reasoning.encrypted_content"]forproviderID.startsWith("opencode"))muse-spark-1.3-contributor-freeand send next messageResult: every subsequent request fails (see logs below). Also reproducible in reverse (start with
1.3then switch to1.2/other models) — symmetric cross-model replay issue.Fresh session starting directly with
1.3works fine; failure only occurs when session history containsreasoning.encrypted_contentissued by a different caller/model and is replayed.Logs
~/.local/share/opencode/log/opencode.log(30+ occurrences, same session IDs):Root cause (suspected)
muse-spark-1.3returnsreasoningitems withencrypted_content(opaque, caller-bound, see also #43584 wheremuse-spark-1.2already returnsencrypted_contentwithsummary:[]).transform.ts:447enablesinclude: ["reasoning.encrypted_content"]for allopencodeproviders, so history replay includes that blob.When switching models mid-session, opencode replays the previous model's
encrypted_contentto the new model. UpstreamConsolevalidates the caller and rejects (was not issued to this caller). Same class as recent Claude fix inv1.18.27(thinking.blockBindingtolerance for stale blocks), but no equivalent tolerance for OpenAI-stylereasoning.encrypted_contenton theopencodeprovider path.PRs #45050/#45032/#44997 fixed similar
store:falsereplay foropenai/azureproviders, butnative-runtime.tsallowlist and transform handling foropencodeprovider'smuse-sparkfamily does not yet strip/isolateencrypted_contenton model switch.Expected
Cross-model switch in same session should not fail. Similar to Claude fix, opencode should drop
encrypted_content(keep onlysummary) when replaying reasoning across different models/callers, or isolate reasoning per model.Environment
1.18.30(latest as of 2026-09-13), also tested after freshcurl -fsSL https://opencode.ai/install | bash~/.opencodeplugin1.18.30opencode web --port 4096and TUIWorkaround
Start a new session (
/new) when switching betweenmuse-spark-1.2and1.3(or any reasoning model)./clearbefore switch also avoids the replay.