summaryrefslogtreecommitdiffhomepage
path: root/packages
diff options
context:
space:
mode:
authorDax Raad <[email protected]>2025-07-25 18:27:51 -0400
committerDax Raad <[email protected]>2025-07-25 18:31:08 -0400
commit6b7058fe1c12a635723ecc3768f848edca947518 (patch)
tree308dae101df220e3c0f0322981799c9eb426c797 /packages
parent1149b984d981f54af3f7f3bb529a05fe69c6c22c (diff)
downloadopencode-6b7058fe1c12a635723ecc3768f848edca947518.tar.gz
opencode-6b7058fe1c12a635723ecc3768f848edca947518.zip
qwen optimizations it works good now
Diffstat (limited to 'packages')
-rw-r--r--packages/opencode/src/provider/transform.ts9
-rw-r--r--packages/opencode/src/tool/registry.ts4
2 files changed, 7 insertions, 6 deletions
diff --git a/packages/opencode/src/provider/transform.ts b/packages/opencode/src/provider/transform.ts
index dde36d7b5..844fccbb2 100644
--- a/packages/opencode/src/provider/transform.ts
+++ b/packages/opencode/src/provider/transform.ts
@@ -23,8 +23,9 @@ export namespace ProviderTransform {
}
for (const msg of unique([...system, ...final])) {
- const shouldUseContentOptions = providerID !== "anthropic" && Array.isArray(msg.content) && msg.content.length > 0
-
+ const shouldUseContentOptions =
+ providerID !== "anthropic" && Array.isArray(msg.content) && msg.content.length > 0
+
if (shouldUseContentOptions) {
const lastContent = msg.content[msg.content.length - 1]
if (lastContent && typeof lastContent === "object") {
@@ -35,7 +36,7 @@ export namespace ProviderTransform {
continue
}
}
-
+
msg.providerOptions = {
...msg.providerOptions,
...providerOptions,
@@ -46,7 +47,7 @@ export namespace ProviderTransform {
}
export function temperature(_providerID: string, modelID: string) {
- if (modelID.includes("qwen")) return 0.55
+ if (modelID.toLowerCase().includes("qwen")) return 0.55
return 0
}
}
diff --git a/packages/opencode/src/tool/registry.ts b/packages/opencode/src/tool/registry.ts
index 56391a58c..09581def6 100644
--- a/packages/opencode/src/tool/registry.ts
+++ b/packages/opencode/src/tool/registry.ts
@@ -64,12 +64,12 @@ export namespace ToolRegistry {
}
export function enabled(_providerID: string, modelID: string): Record<string, boolean> {
- if (modelID.includes("claude")) {
+ if (modelID.toLowerCase().includes("claude")) {
return {
patch: false,
}
}
- if (modelID.includes("qwen")) {
+ if (modelID.toLowerCase().includes("qwen")) {
return {
patch: false,
todowrite: false,