Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions src/lib/inference/vllm-models.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ describe("vllm model registry", () => {
expect(cmd).not.toContain("--gpu-memory-utilization 0.7");
});

it("builds the Nemotron-3-Nano-4B FP8 serve command with auto tool-choice enabled (#6314)", () => {
it("builds the Nemotron-3-Nano-4B FP8 serve command with auto tool-choice and reasoning parser (#6314, #6915)", () => {
// #6314: the generic-Linux managed-vLLM default (`GENERIC_LINUX_PROFILE.defaultModel`)
// used to omit `--enable-auto-tool-choice` and `--tool-call-parser`, so every agent
// request with `tool_choice: "auto"` failed HTTP 400 out of the box on generic Linux.
Expand All @@ -239,11 +239,19 @@ describe("vllm model registry", () => {
expect(cmd).toContain("--load-format fastsafetensors");
expect(cmd).toContain("--enable-auto-tool-choice");
expect(cmd).toContain("--tool-call-parser qwen3_coder");
// The tool-call flags must appear paired: the parser value comes as a single
// shell token immediately after `--tool-call-parser`, and each switch is listed
// only once.
// #6915: Nemotron-3-Nano is a reasoning model, so the serve command must
// also pin the reasoning parser from the model card. Without it, vLLM
// leaves the `<think>…</think>` trace (and the orphan `</think>` marker the
// chat template does not pair with an opening tag) inline in `content`,
// which the agent's streaming parser mishandles into an empty turn that
// wedges the session. The Ultra-550B managed profile already pins the same
// `nemotron_v3` parser; this asserts the generic-Linux Nano default matches.
expect(cmd).toContain("--reasoning-parser nemotron_v3");
// The parser flags must appear paired and exactly once each: the value is a
// single shell token immediately after its switch.
expect(cmd.match(/--enable-auto-tool-choice/g)).toHaveLength(1);
expect(cmd.match(/--tool-call-parser/g)).toHaveLength(1);
expect(cmd.match(/--reasoning-parser/g)).toHaveLength(1);
});

it("registers the Qwen3.6-35B NVFP4 checkpoint for DGX Spark", () => {
Expand Down
13 changes: 13 additions & 0 deletions src/lib/inference/vllm-models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,22 @@ export const VLLM_MODELS: readonly VllmModelDef[] = [
// --tool-call-parser to be set" (#6314) — which blocks every agent
// tool-call flow on the generic-Linux managed vLLM default (Spark and
// Station defaults already pin their own tool-call parser).
//
// `--reasoning-parser nemotron_v3` is likewise part of that same model
// card launch recipe: Nemotron-3-Nano is a reasoning model that emits a
// `<think>…</think>` trace. Without a reasoning parser vLLM leaves the
// trace — including the bare `</think>` marker the chat template does not
// pair with an opening `<think>` — inline in `content`, and the agent's
// streaming parser mishandles that orphan marker into an empty turn that
// wedges the session (#6915). `nemotron_v3` is a built-in parser in the
// pinned NGC vLLM image (it subclasses the DeepSeek-R1 parser) and moves
// the trace out of `content`, so no plugin file is required. The Spark and
// Station defaults already pin their own reasoning parser.
modelArgs: [
"--gpu-memory-utilization",
"0.7",
"--reasoning-parser",
"nemotron_v3",
"--load-format",
"fastsafetensors",
"--enable-auto-tool-choice",
Expand Down
Loading