add qwen3-ollama support in autocomplete

This commit is contained in:
NGC13009 2025-07-13 00:48:34 +08:00
parent 9f1448983b
commit dc7caf9411
6 changed files with 21 additions and 9 deletions

View file

@ -103,6 +103,16 @@ export function postprocessCompletion({
}
}
if (llm.model.includes("qwen3")) {
// Qwen3 always starts from special thinking markers, and we don't want them to output these contents
// Remove all content from "
completion = completion.replace(/<think>.*?<\/think>/s, "");
completion = completion.replace(/<\/think>/, "");
// Remove any number of newline characters at the beginning and end
completion = completion.replace(/^\n+|\n+$/g, "");
}
if (llm.model.includes("mercury") || llm.model.includes("granite")) {
// Granite tends to repeat the start of the line in the completion output
let prefixEnd = prefix.split("\n").pop();

View file

@ -142,7 +142,7 @@
},
"../packages/config-yaml": {
"name": "@continuedev/config-yaml",
"version": "1.0.95",
"version": "1.0.96",
"license": "Apache-2.0",
"dependencies": {
"@continuedev/config-types": "^1.0.14",
@ -169,9 +169,11 @@
},
"../packages/openai-adapters": {
"name": "@continuedev/openai-adapters",
"version": "1.0.44",
"version": "1.0.45",
"license": "Apache-2.0",
"dependencies": {
"@aws-sdk/client-bedrock-runtime": "^3.842.0",
"@aws-sdk/credential-providers": "^3.840.0",
"@continuedev/config-types": "^1.0.5",
"@continuedev/config-yaml": "^1.0.51",
"@continuedev/fetch": "^1.0.15",

View file

@ -1,12 +1,12 @@
{
"name": "continue",
"version": "1.1.59",
"version": "1.1.60",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "continue",
"version": "1.1.59",
"version": "1.1.60",
"license": "Apache-2.0",
"dependencies": {
"@continuedev/config-types": "^1.0.14",

2
gui/package-lock.json generated
View file

@ -220,7 +220,7 @@
},
"../packages/config-yaml": {
"name": "@continuedev/config-yaml",
"version": "1.0.95",
"version": "1.0.96",
"license": "Apache-2.0",
"dependencies": {
"@continuedev/config-types": "^1.0.14",

View file

@ -1,12 +1,12 @@
{
"name": "@continuedev/config-yaml",
"version": "1.0.95",
"version": "1.0.96",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@continuedev/config-yaml",
"version": "1.0.95",
"version": "1.0.96",
"license": "Apache-2.0",
"dependencies": {
"@continuedev/config-types": "^1.0.14",

View file

@ -1,12 +1,12 @@
{
"name": "@continuedev/openai-adapters",
"version": "1.0.44",
"version": "1.0.45",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@continuedev/openai-adapters",
"version": "1.0.44",
"version": "1.0.45",
"license": "Apache-2.0",
"dependencies": {
"@aws-sdk/client-bedrock-runtime": "^3.842.0",