Skip to content

Commit 6be01c4

Browse files
rekram1-nodeopencode-agent[bot]
authored andcommitted
fix: rm ai sdk middleware that was preventing <think> blocks from being sent back as assistant message content (anomalyco#11270)
Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
1 parent e1e356c commit 6be01c4

3 files changed

Lines changed: 4 additions & 5 deletions

File tree

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
"prepare": "husky",
1212
"random": "echo 'Random script'",
1313
"hello": "echo 'Hello World!'",
14-
"test": "echo 'do not run tests from root' && exit 1"
14+
"test": "echo 'do not run tests from root' && exit 1",
15+
"preinstall": "node preinstall.js"
1516
},
1617
"workspaces": {
1718
"packages": [
@@ -101,4 +102,4 @@
101102
"patchedDependencies": {
102103
"ghostty-web@0.3.0": "patches/ghostty-web@0.3.0.patch"
103104
}
104-
}
105+
}

packages/opencode/src/session/llm.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import os from "os"
21
import { Installation } from "@/installation"
32
import { Provider } from "@/provider/provider"
43
import { Log } from "@/util/log"
@@ -9,7 +8,6 @@ import {
98
type StreamTextResult,
109
type Tool,
1110
type ToolSet,
12-
extractReasoningMiddleware,
1311
tool,
1412
jsonSchema,
1513
} from "ai"
@@ -261,7 +259,6 @@ export namespace LLM {
261259
return args.params
262260
},
263261
},
264-
extractReasoningMiddleware({ tagName: "think", startWithReasoning: false }),
265262
],
266263
}),
267264
experimental_telemetry: {

0 commit comments

Comments
 (0)