Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

use the shared Qwen parser table for the guided install's EXTRA_ARGS (#4767)

[._.]/ Adam Eivy5579eafe8b22
diff --git a/server/lib/vllmQwenProvision.js b/server/lib/vllmQwenProvision.js
index 90a4e7d649..36874e42e2 100644
--- a/server/lib/vllmQwenProvision.js
+++ b/server/lib/vllmQwenProvision.js
@@ -11,10 +11,11 @@
* its cause** (`docs/research/2026-08-21-qwen38-rtx3090-vllm.md` is the record
* of finding each by hitting it):
*
- * - `EXTRA_ARGS=--enable-auto-tool-choice --tool-call-parser qwen3_xml` —
- * without it vLLM rejects the agent's very first turn; with `hermes` instead
- * of `qwen3_xml` the server starts, answers, and silently never emits a tool
- * call, because Qwen3.8 writes XML where that parser expects Hermes JSON.
+ * - `EXTRA_ARGS` — vLLM rejects the agent's very first turn without a tool-call
+ * parser, and with the WRONG parser it starts, answers, and silently never
+ * emits a tool call — Qwen3.8 writes XML where the plausible-looking choice
+ * expects JSON. The spelling comes from `qwenAgentParsers.js`, which owns it
+ * for every runtime and explains why; this module must not re-type it.
* - `VLLM_WSL2_ENABLE_PIN_MEMORY=1` — vLLM disables pinned host memory on WSL,
* its GPU model runner needs UVA buffers that require it, and compose's
* `unless-stopped` turns the resulting `RuntimeError: UVA is not available`
@@ -35,6 +36,8 @@
import { randomBytes } from 'crypto';
+import { vllmExtraArgs } from './qwenAgentParsers.js';
+
/** Bytes of entropy in a generated key — matches the doc's `openssl rand -hex 24`. */
const API_KEY_BYTES = 24;
@@ -79,7 +82,10 @@ export function vllmEnvDefaults({ apiKey, wsl2 = false }) {
[VLLM_API_KEY_VAR, apiKey],
['SPEC', 'dflash2'],
['PREFIX_CACHE', '1'],
- ['EXTRA_ARGS', '--enable-auto-tool-choice --tool-call-parser qwen3_xml'],
+ // The parser spelling is NOT re-typed here. `qwenAgentParsers.js` (#4778)
+ // owns it precisely because two runtimes need two different spellings for
+ // the same model family, and copying the wrong one fails silently.
+ ['EXTRA_ARGS', vllmExtraArgs()],
...(wsl2
? [
['VLLM_WSL2_ENABLE_PIN_MEMORY', '1'],
diff --git a/server/lib/vllmQwenProvision.test.js b/server/lib/vllmQwenProvision.test.js
index 944e4b500d..cae886076d 100644
--- a/server/lib/vllmQwenProvision.test.js
+++ b/server/lib/vllmQwenProvision.test.js
@@ -8,6 +8,7 @@ import {
vllmEnvDefaults,
VLLM_API_KEY_VAR,
} from './vllmQwenProvision.js';
+import { vllmExtraArgs } from './qwenAgentParsers.js';
const defaults = (wsl2 = false) => vllmEnvDefaults({ apiKey: 'generated-key', wsl2 });
@@ -43,7 +44,10 @@ describe('isWsl2Engine', () => {
describe('vllmEnvDefaults', () => {
it('always carries the tool-parser line, which is the setting agents die without', () => {
const keys = Object.fromEntries(defaults());
- expect(keys.EXTRA_ARGS).toBe('--enable-auto-tool-choice --tool-call-parser qwen3_xml');
+ // Asserted against the owning table, so a corrected spelling there reaches
+ // the guided install without a second edit here.
+ expect(keys.EXTRA_ARGS).toBe(vllmExtraArgs());
+ expect(keys.EXTRA_ARGS).toContain('--tool-call-parser');
expect(keys.SPEC).toBe('dflash2');
expect(keys.PREFIX_CACHE).toBe('1');
expect(keys[VLLM_API_KEY_VAR]).toBe('generated-key');
@@ -104,7 +108,7 @@ describe('mergeEnvFileContents', () => {
'VLLM_API_KEY=generated-key',
'SPEC=dflash2',
'PREFIX_CACHE=1',
- 'EXTRA_ARGS=--enable-auto-tool-choice --tool-call-parser qwen3_xml',
+ `EXTRA_ARGS=${vllmExtraArgs()}`,
'VLLM_WSL2_ENABLE_PIN_MEMORY=1',
'PYTORCH_CUDA_ALLOC_CONF=expandable_segments:False',
'',
diff --git a/server/services/vllmQwenManager.test.js b/server/services/vllmQwenManager.test.js
index 80b86d8579..6eba550971 100644
--- a/server/services/vllmQwenManager.test.js
+++ b/server/services/vllmQwenManager.test.js
@@ -1,5 +1,6 @@
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
import { pinPlatform } from '../lib/testHelper.js';
+import { vllmExtraArgs } from '../lib/qwenAgentParsers.js';
const pathLookup = vi.hoisted(() => ({
findCommandOnPath: vi.fn(() => null),
@@ -131,7 +132,7 @@ describe('provisionVllmQwenProject', () => {
expect(String(envPath)).toMatch(/[\\/]\.env$/);
// Without this the agent's first turn is rejected; with `hermes` instead it
// silently never emits a tool call at all.
- expect(contents).toContain('EXTRA_ARGS=--enable-auto-tool-choice --tool-call-parser qwen3_xml');
+ expect(contents).toContain(`EXTRA_ARGS=${vllmExtraArgs()}`);
expect(contents).toContain('SPEC=dflash2');
expect(contents).toContain('PREFIX_CACHE=1');
// Native Linux does not need — and must not be given — the WSL2 pair.