Elffuss BraidHub

kikocis/continue public

add qwen3-ollama support in autocomplete
Changeset92186d63353be68c39375a3e9ced4345cb1b2afa98a01274c7a1feec646b5e3c
AuthorNGC13009 <ngc1300@126.com> · 2025-07-13 00:48 +08:00
CommitterNGC13009 <ngc1300@126.com> · 2025-07-13 00:48 +08:00
Parentsa2d235e8c1f1

Browse the files at this changeset

6 files changed

modified core/autocomplete/postprocessing/index.ts +10 −0
@@ -103,6 +103,16 @@
103103 }
104104 }
105105
106+ if (llm.model.includes("qwen3")) {
107+ // Qwen3 always starts from special thinking markers, and we don't want them to output these contents
108+ // Remove all content from "
109+ completion = completion.replace(/<think>.*?<\/think>/s, "");
110+ completion = completion.replace(/<\/think>/, "");
111+
112+ // Remove any number of newline characters at the beginning and end
113+ completion = completion.replace(/^\n+|\n+$/g, "");
114+ }
115+
106116 if (llm.model.includes("mercury") || llm.model.includes("granite")) {
107117 // Granite tends to repeat the start of the line in the completion output
108118 let prefixEnd = prefix.split("\n").pop();
modified core/package-lock.json +0 −0

Not shown: the file is larger than the hub shows, or this page holds as much as it shows. View the file.

modified extensions/vscode/package-lock.json +0 −0

Not shown: the file is larger than the hub shows, or this page holds as much as it shows. View the file.

modified gui/package-lock.json +0 −0

Not shown: the file is larger than the hub shows, or this page holds as much as it shows. View the file.

modified packages/config-yaml/package-lock.json +0 −0

Not shown: the file is larger than the hub shows, or this page holds as much as it shows. View the file.

modified packages/openai-adapters/package-lock.json +2 −2
@@ -1,12 +1,12 @@
11 {
22 "name": "@continuedev/openai-adapters",
3- "version": "1.0.44",
3+ "version": "1.0.45",
44 "lockfileVersion": 3,
55 "requires": true,
66 "packages": {
77 "": {
88 "name": "@continuedev/openai-adapters",
9- "version": "1.0.44",
9+ "version": "1.0.45",
1010 "license": "Apache-2.0",
1111 "dependencies": {
1212 "@aws-sdk/client-bedrock-runtime": "^3.842.0",