Skip to content

LLM Wiki is a cross-platform desktop application that turns your documents into an organized, interlinked knowledge base — automatically. Instead of traditional RAG (retrieve-and-answer from scratch every time), the LLM incrementally builds and maintains a persistent wiki from your sources。

TypeScript

test: switch real-LLM default to local llama-server + Qwen3 no-think

nash_sua932a41a34e7
diff --git a/src/lib/enrich-wikilinks.real-llm.test.ts b/src/lib/enrich-wikilinks.real-llm.test.ts
index 41bb2cb2..d432faa7 100644
--- a/src/lib/enrich-wikilinks.real-llm.test.ts
+++ b/src/lib/enrich-wikilinks.real-llm.test.ts
@@ -22,8 +22,8 @@ import { useWikiStore } from "@/stores/wiki-store"
import { enrichScenarios } from "@/test-helpers/scenarios/enrich-scenarios"
const LLM_PROVIDER = (process.env.LLM_PROVIDER ?? "ollama") as "ollama" | "minimax"
-const OLLAMA_URL = process.env.OLLAMA_URL ?? "http://192.168.1.50:11434"
-const OLLAMA_MODEL = process.env.OLLAMA_MODEL ?? "qwen3.5:9b"
+const OLLAMA_URL = process.env.OLLAMA_URL ?? "http://192.168.1.50:8080"
+const OLLAMA_MODEL = process.env.OLLAMA_MODEL ?? "Qwen3.6-35B-A3B-UD-Q4_K_M.gguf"
const MINIMAX_API_KEY = process.env.MINIMAX_API_KEY ?? ""
const MINIMAX_MODEL = process.env.MINIMAX_MODEL ?? "MiniMax-M2.7-highspeed"
const MINIMAX_ENDPOINT = process.env.MINIMAX_ENDPOINT ?? "https://api.minimaxi.com/v1"
@@ -70,7 +70,7 @@ async function setup(scenario: typeof enrichScenarios[number]): Promise<Ctx> {
model: MINIMAX_MODEL,
ollamaUrl: "",
customEndpoint: MINIMAX_ENDPOINT,
- maxContextSize: 128000,
+ maxContextSize: 110000,
}
: {
provider: "ollama",
@@ -78,7 +78,7 @@ async function setup(scenario: typeof enrichScenarios[number]): Promise<Ctx> {
model: OLLAMA_MODEL,
ollamaUrl: OLLAMA_URL,
customEndpoint: "",
- maxContextSize: 128000,
+ maxContextSize: 110000,
},
)
diff --git a/src/lib/ingest.real-llm.test.ts b/src/lib/ingest.real-llm.test.ts
index 0dc6d717..13eafe50 100644
--- a/src/lib/ingest.real-llm.test.ts
+++ b/src/lib/ingest.real-llm.test.ts
@@ -30,8 +30,12 @@ import { materializeRealContent } from "@/test-helpers/real-content"
// ── Provider / model configuration ──────────────────────────────────────────
const LLM_PROVIDER = (process.env.LLM_PROVIDER ?? "ollama") as "ollama" | "minimax"
-const OLLAMA_URL = process.env.OLLAMA_URL ?? "http://192.168.1.50:11434"
-const OLLAMA_MODEL = process.env.OLLAMA_MODEL ?? "qwen3.5:9b"
+// Local llama.cpp server (OpenAI-compatible). Default port 8080; launch with
+// `--jinja` so chat_template_kwargs.enable_thinking=false actually disables
+// Qwen3 thinking. Works via the `ollama` provider (same /v1/chat/completions
+// endpoint shape).
+const OLLAMA_URL = process.env.OLLAMA_URL ?? "http://192.168.1.50:8080"
+const OLLAMA_MODEL = process.env.OLLAMA_MODEL ?? "Qwen3.6-35B-A3B-UD-Q4_K_M.gguf"
const MINIMAX_API_KEY = process.env.MINIMAX_API_KEY ?? ""
const MINIMAX_MODEL = process.env.MINIMAX_MODEL ?? "MiniMax-M2.7-highspeed"
const MINIMAX_ENDPOINT = process.env.MINIMAX_ENDPOINT ?? "https://api.minimaxi.com/v1"
@@ -402,7 +406,7 @@ async function setupScenario(scenario: RealIngestScenario): Promise<Ctx> {
model: MINIMAX_MODEL,
ollamaUrl: "",
customEndpoint: MINIMAX_ENDPOINT,
- maxContextSize: 128000,
+ maxContextSize: 110000,
}
: {
provider: "ollama",
@@ -410,7 +414,7 @@ async function setupScenario(scenario: RealIngestScenario): Promise<Ctx> {
model: OLLAMA_MODEL,
ollamaUrl: OLLAMA_URL,
customEndpoint: "",
- maxContextSize: 128000,
+ maxContextSize: 110000,
},
)
useWikiStore.getState().setOutputLanguage(scenario.targetLanguage)
diff --git a/src/lib/lint.real-llm.test.ts b/src/lib/lint.real-llm.test.ts
index 15ab08be..128244ae 100644
--- a/src/lib/lint.real-llm.test.ts
+++ b/src/lib/lint.real-llm.test.ts
@@ -19,8 +19,8 @@ import { useActivityStore } from "@/stores/activity-store"
import { lintScenarios } from "@/test-helpers/scenarios/lint-scenarios"
const LLM_PROVIDER = (process.env.LLM_PROVIDER ?? "ollama") as "ollama" | "minimax"
-const OLLAMA_URL = process.env.OLLAMA_URL ?? "http://192.168.1.50:11434"
-const OLLAMA_MODEL = process.env.OLLAMA_MODEL ?? "qwen3.5:9b"
+const OLLAMA_URL = process.env.OLLAMA_URL ?? "http://192.168.1.50:8080"
+const OLLAMA_MODEL = process.env.OLLAMA_MODEL ?? "Qwen3.6-35B-A3B-UD-Q4_K_M.gguf"
const MINIMAX_API_KEY = process.env.MINIMAX_API_KEY ?? ""
const MINIMAX_MODEL = process.env.MINIMAX_MODEL ?? "MiniMax-M2.7-highspeed"
const MINIMAX_ENDPOINT = process.env.MINIMAX_ENDPOINT ?? "https://api.minimaxi.com/v1"
@@ -73,7 +73,7 @@ async function setup(scenario: typeof lintScenarios[number]): Promise<Ctx> {
model: MINIMAX_MODEL,
ollamaUrl: "",
customEndpoint: MINIMAX_ENDPOINT,
- maxContextSize: 128000,
+ maxContextSize: 110000,
}
: {
provider: "ollama",
@@ -81,7 +81,7 @@ async function setup(scenario: typeof lintScenarios[number]): Promise<Ctx> {
model: OLLAMA_MODEL,
ollamaUrl: OLLAMA_URL,
customEndpoint: "",
- maxContextSize: 128000,
+ maxContextSize: 110000,
},
)
diff --git a/src/lib/llm-providers.ts b/src/lib/llm-providers.ts
index 14c018dd..339c68f2 100644
--- a/src/lib/llm-providers.ts
+++ b/src/lib/llm-providers.ts
@@ -153,10 +153,21 @@ export function getProviderConfig(config: LlmConfig): ProviderConfig {
headers: {
"Content-Type": JSON_CONTENT_TYPE,
},
- buildBody: (messages) => ({
- ...buildOpenAiBody(messages),
- model,
- }),
+ buildBody: (messages) => {
+ const body: Record<string, unknown> = {
+ ...buildOpenAiBody(messages),
+ model,
+ }
+ // Qwen3 thinking mode disable. Recognized by llama.cpp server
+ // launched with `--jinja` (reads chat_template_kwargs from the
+ // OpenAI body and forwards to the Jinja chat template). Real
+ // Ollama silently ignores unknown fields, so this is safe.
+ // Requires llama-server --jinja; without it, thinking stays on.
+ if (/qwen[-_]?3/i.test(model)) {
+ body.chat_template_kwargs = { enable_thinking: false }
+ }
+ return body
+ },
parseStream: parseOpenAiLine,
}
diff --git a/src/lib/sweep-chained.real-llm.test.ts b/src/lib/sweep-chained.real-llm.test.ts
index 1298f175..0413b598 100644
--- a/src/lib/sweep-chained.real-llm.test.ts
+++ b/src/lib/sweep-chained.real-llm.test.ts
@@ -31,8 +31,8 @@ import { useChatStore } from "@/stores/chat-store"
import { materializeRealContent } from "@/test-helpers/real-content"
const LLM_PROVIDER = (process.env.LLM_PROVIDER ?? "ollama") as "ollama" | "minimax"
-const OLLAMA_URL = process.env.OLLAMA_URL ?? "http://192.168.1.50:11434"
-const OLLAMA_MODEL = process.env.OLLAMA_MODEL ?? "qwen3.5:9b"
+const OLLAMA_URL = process.env.OLLAMA_URL ?? "http://192.168.1.50:8080"
+const OLLAMA_MODEL = process.env.OLLAMA_MODEL ?? "Qwen3.6-35B-A3B-UD-Q4_K_M.gguf"
const MINIMAX_API_KEY = process.env.MINIMAX_API_KEY ?? ""
const MINIMAX_MODEL = process.env.MINIMAX_MODEL ?? "MiniMax-M2.7-highspeed"
const MINIMAX_ENDPOINT = process.env.MINIMAX_ENDPOINT ?? "https://api.minimaxi.com/v1"
@@ -113,7 +113,7 @@ async function setup(): Promise<Ctx> {
model: MINIMAX_MODEL,
ollamaUrl: "",
customEndpoint: MINIMAX_ENDPOINT,
- maxContextSize: 128000,
+ maxContextSize: 110000,
}
: {
provider: "ollama",
@@ -121,7 +121,7 @@ async function setup(): Promise<Ctx> {
model: OLLAMA_MODEL,
ollamaUrl: OLLAMA_URL,
customEndpoint: "",
- maxContextSize: 128000,
+ maxContextSize: 110000,
},
)
useWikiStore.getState().setOutputLanguage("English")
diff --git a/src/lib/sweep-reviews.real-llm.test.ts b/src/lib/sweep-reviews.real-llm.test.ts
index dfe6a82c..ffffce19 100644
--- a/src/lib/sweep-reviews.real-llm.test.ts
+++ b/src/lib/sweep-reviews.real-llm.test.ts
@@ -22,8 +22,8 @@ import { useActivityStore } from "@/stores/activity-store"
import { sweepScenarios } from "@/test-helpers/scenarios/sweep-scenarios"
const LLM_PROVIDER = (process.env.LLM_PROVIDER ?? "ollama") as "ollama" | "minimax"
-const OLLAMA_URL = process.env.OLLAMA_URL ?? "http://192.168.1.50:11434"
-const OLLAMA_MODEL = process.env.OLLAMA_MODEL ?? "qwen3.5:9b"
+const OLLAMA_URL = process.env.OLLAMA_URL ?? "http://192.168.1.50:8080"
+const OLLAMA_MODEL = process.env.OLLAMA_MODEL ?? "Qwen3.6-35B-A3B-UD-Q4_K_M.gguf"
const MINIMAX_API_KEY = process.env.MINIMAX_API_KEY ?? ""
const MINIMAX_MODEL = process.env.MINIMAX_MODEL ?? "MiniMax-M2.7-highspeed"
const MINIMAX_ENDPOINT = process.env.MINIMAX_ENDPOINT ?? "https://api.minimaxi.com/v1"
@@ -98,7 +98,7 @@ async function setup(scenario: typeof sweepScenarios[number]): Promise<Ctx> {
model: MINIMAX_MODEL,
ollamaUrl: "",
customEndpoint: MINIMAX_ENDPOINT,
- maxContextSize: 128000,
+ maxContextSize: 110000,
}
: {
provider: "ollama",
@@ -106,7 +106,7 @@ async function setup(scenario: typeof sweepScenarios[number]): Promise<Ctx> {
model: OLLAMA_MODEL,
ollamaUrl: OLLAMA_URL,
customEndpoint: "",
- maxContextSize: 128000,
+ maxContextSize: 110000,
},
)