opencode-thinking-fix 3.3.3 → 3.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +21 -14
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -28,15 +28,27 @@ The drop happens in SDK serializers and client transforms (truthy checks, missin
28
28
 
29
29
  **With the fix:** "Now add password reset." → AI reads its notes: "I used React Hook Form for login, I'll extend that." → works.
30
30
 
31
- ## See it happen in 5 minutes
31
+ ## See it happen
32
32
 
33
- You need OpenCode and any reasoning model. No proxy, no plugin — this reproduces the drop on a stock install.
33
+ You don't need a specific free-tier model. Use any reasoning model on your own API key (DeepSeek V4, Kimi K2.7, GLM-5, MiMo) or any reasoning-capable model from the routing table below.
34
34
 
35
- 1. Start a session with a reasoning model (free tier works, e.g. `opencode/hy3-free`) and give it a real task. It thinks, answers, and emits `reasoning_content`.
36
- 2. Ask a follow-up that depends on the first answer, then capture the outgoing request. Every `reasoning_content` field from turn 1 arrives empty or missing.
37
- 3. The same request through the SDK alone keeps the field. The client is the difference.
35
+ ### 1. The 4-step reproduction
38
36
 
39
- Captured evidence for exactly this sequence: [`proof/free-models/`](proof/free-models/). The A/B controls that isolate the field as the only variable: [`proof/curl-control-results.txt`](proof/curl-control-results.txt).
37
+ 1. Start a session with a reasoning model and give it a task that requires a tool call ("List the files in this directory, then read the largest one").
38
+ 2. The model thinks, emits `reasoning_content`, and calls the tool.
39
+ 3. Ask a follow-up that depends on the first answer ("Now summarize what you just read").
40
+ 4. Capture the outgoing Turn-2 request. Every `reasoning_content` field from Turn 1 is missing or empty. The client dropped it.
41
+
42
+ ### 2. The dataset (the actual proof)
43
+
44
+ If you don't want to run it yourself, the `proof/` directory contains the raw data from a week-long passive tap of real production traffic, byte-for-byte unmodified across DeepSeek, OpenCode Go, OpenCode Zen, and OpenRouter:
45
+
46
+ - **1,968 drops captured** (turns that carried reasoning earlier in the session arrived at the API without it).
47
+ - **2.29 million characters** of reasoning erased.
48
+ - **22 of those drops were on OpenRouter** — proving it is not a direct-provider quirk.
49
+ - **68% of drops happened with zero model change** (same model, same session, drop mid-conversation).
50
+
51
+ Every number is recomputable from `proof/reasoning-drop/drops.csv`. The A/B controls isolating the client as the sole point of failure live in `proof/free-models/`. The headline is the dataset; the recipe is a courtesy.
40
52
 
41
53
  ## Why you've probably never seen it
42
54
 
@@ -50,15 +62,10 @@ If you run long sessions, heavy tool calls, model switching, or subagents, you h
50
62
 
51
63
  ## The evidence
52
64
 
53
- We ran four passive taps (DeepSeek, OpenCode Go, OpenCode Zen, OpenRouter) that forwarded traffic byte-for-byte untouched and logged only metadata. They ran for a week of real work, then were retired. Methodology and raw data: [`proof/` directory](proof/).
65
+ The numbers above come from four passive taps (DeepSeek, OpenCode Go, OpenCode Zen, OpenRouter) that forwarded traffic byte-for-byte untouched and logged only metadata. They ran for a week of real work, then were retired. Methodology and raw data: [`proof/` directory](proof/).
54
66
 
55
- - **1,968 drops captured** — a turn that carried reasoning earlier in the same session arrives at the API without it.
56
- - **2.29 million characters** of reasoning erased over a week of real traffic.
57
- - **68% of drops happened with zero model change** — same model, same session. Not a model-switch artifact.
58
- - **OpenRouter drops it too** — 22 drops with confirmed session identity on models served through openrouter.ai, plus the same pattern on DeepSeek and OpenCode Go lanes.
59
67
  - **The SDK is innocent.** `@ai-sdk/openai-compatible` round-trips the field correctly; the drop happens in the client's own transform. Captured side by side in [`proof/free-models/`](proof/free-models/).
60
-
61
- Every number is recomputable from [`proof/reasoning-drop/drops.csv`](proof/reasoning-drop/drops.csv) and [`proof/reasoning-drop/switches.csv`](proof/reasoning-drop/switches.csv).
68
+ - **Model-switch baseline** is in [`proof/reasoning-drop/switches.csv`](proof/reasoning-drop/switches.csv) so the 68% zero-model-change number is auditable independently of the drops file.
62
69
 
63
70
  ## For the skeptics
64
71
 
@@ -195,7 +202,7 @@ See also: [OpenCode plugin docs](https://opencode.ai/docs/plugins)
195
202
  ---
196
203
 
197
204
  - [The problem](#the-problem)
198
- - [See it happen in 5 minutes](#see-it-happen-in-5-minutes)
205
+ - [See it happen](#see-it-happen)
199
206
  - [Why you've probably never seen it](#why-youve-probably-never-seen-it)
200
207
  - [The evidence](#the-evidence)
201
208
  - [For the skeptics](#for-the-skeptics)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-thinking-fix",
3
- "version": "3.3.3",
3
+ "version": "3.3.4",
4
4
  "description": "Restores reasoning content dropped from multi-turn OpenCode conversations (DeepSeek, Kimi, GLM, MiMo, MiniMax, OpenCode Go, OpenRouter). Plugin + proxy + watchdog.",
5
5
  "type": "module",
6
6
  "license": "MIT",