Skip to content

Commit 8858b7b

Browse files
authored
Merge branch 'main' into codex/issue-3123-model-audit-matrix
2 parents 874ef31 + 539d0dd commit 8858b7b

2 files changed

Lines changed: 158 additions & 0 deletions

File tree

docs/inference/inference-options.mdx

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,36 @@ The managed install/start vLLM entry appears by default on DGX Spark and DGX Sta
7474
| Local Ollama | Routes to a local Ollama instance on `localhost:11434`. NemoClaw detects installed models, offers starter models if none are present, pulls and warms the selected model, and validates it. | Selected during onboarding. For more information, refer to [Use a Local Inference Server](use-local-inference). |
7575
| Model Router | Starts a host-side router on port `4000`, registers it as an OpenAI-compatible provider, and keeps the sandbox pointed at `inference.local`. Set `NEMOCLAW_PROVIDER=routed` for non-interactive setup. | The router pool defines the model names. |
7676

77+
## Model Task-Fit Guide
78+
79+
Use this table as starter guidance when selecting a curated cloud model during onboarding.
80+
The provider catalog remains authoritative for exact context-window limits, availability, and current pricing.
81+
The relative labels below are qualitative and compare models within the curated onboarding choices, not across every model a provider offers.
82+
83+
| Model | Best-for task type | Relative latency | Tool-use quality | Context-window fit | Relative cost |
84+
|---|---|---|---|---|---|
85+
| `nvidia/nemotron-3-super-120b-a12b` | Default hosted agent work, multi-step planning, and tool-heavy shell workflows | Medium | Strong default for OpenClaw tool loops | Large agent context | Medium |
86+
| `nvidia/nemotron-3-ultra-550b-a55b` | Quality-sensitive reasoning, careful synthesis, and complex reviews | Higher | Strong for complex tool plans | Large agent context | Higher |
87+
| `nvidia/nemotron-3-nano-omni-30b-a3b-reasoning` | Reasoning-first and multimodal experiments where a compact hosted model is enough | Medium | Good after the smoke probe confirms final-answer content | Large agent context | Medium |
88+
| `z-ai/glm-5.1` | General chat, multilingual text work, and fast iteration | Low-to-medium | Good for straightforward tool loops | Large agent context | Low-to-medium |
89+
| `minimaxai/minimax-m2.7` | Long-form writing, multi-turn assistant work, and broad instruction following | Medium | Good for structured assistant turns | Large agent context | Medium |
90+
| `moonshotai/kimi-k2.6` | Coding tasks and shell-heavy agent trajectories | Medium | Strong with NemoClaw's Kimi tool-call compatibility path | Large-context friendly | Medium |
91+
| `openai/gpt-oss-120b` | Hosted open-weight style experimentation and cost-aware general agents | Medium | Good when provider-side tool calling is enabled | Large agent context | Medium |
92+
| `deepseek-ai/deepseek-v4-pro` | Code, math, and reasoning-heavy problem solving | Medium-to-high | Strong when the endpoint supports tool calls | Large agent context | Medium-to-high |
93+
| `gpt-5.4` | Default OpenAI-backed agent work and general high-quality reasoning | Medium | Strong | Large agent context | Medium-to-high |
94+
| `gpt-5.4-mini` | Latency-sensitive routine automation and repeated helper calls | Low | Good | Medium-to-large context | Low |
95+
| `gpt-5.4-nano` | Very low-latency classification, routing, extraction, and small helper tasks | Very low | Basic to good for simple tool loops | Medium context | Very low |
96+
| `gpt-5.4-pro-2026-03-05` | Quality-first complex reasoning where latency and cost are secondary | Highest | Validate Responses API support before relying on long tool loops | Large agent context | Highest |
97+
| `claude-sonnet-4-6` | Balanced coding, writing, analysis, and multi-step tool work | Medium | Strong | Large agent context | Medium-to-high |
98+
| `claude-haiku-4-5` | Fast summarization, routing, extraction, and lightweight assistant turns | Low | Good for simple tool loops | Medium-to-large context | Low |
99+
| `claude-opus-4-6` | Deep analysis, careful writing, and quality-first planning | Higher | Strong | Large agent context | Higher |
100+
| `gemini-3.1-pro-preview` | Large-context analysis, synthesis, and preview-feature evaluation | Medium-to-high | Good; validate tool continuation for the selected provider path | Extensive context | Medium-to-high |
101+
| `gemini-3.1-flash-lite-preview` | Low-cost extraction, classification, and simple helper calls | Low | Basic to good for simple tool loops | Medium-to-large context | Low |
102+
| `gemini-3-flash-preview` | Fast general assistant tasks and preview-feature evaluation | Low | Good for simple tool loops | Large context | Low |
103+
| `gemini-2.5-pro` | Large-context analysis, long-document synthesis, and complex reasoning | Medium-to-high | Good | Extensive context | Medium-to-high |
104+
| `gemini-2.5-flash` | Latency-sensitive general assistant and multimodal tasks | Low | Good for simple tool loops | Large context | Low |
105+
| `gemini-2.5-flash-lite` | Lowest-cost helper calls, extraction, and classification | Very low | Basic to good for simple tool loops | Medium-to-large context | Very low |
106+
77107
## Choosing the Right Option for Nemotron
78108

79109
NVIDIA Nemotron models expose OpenAI-compatible APIs across every supported deployment surface, so two onboarding options can route to Nemotron.
Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2+
// SPDX-License-Identifier: Apache-2.0
3+
4+
import fs from "node:fs";
5+
import { createRequire } from "node:module";
6+
import path from "node:path";
7+
import { fileURLToPath } from "node:url";
8+
import type * as TypeScript from "typescript";
9+
import { describe, expect, it } from "vitest";
10+
11+
const require = createRequire(import.meta.url);
12+
const ts = require("typescript") as typeof TypeScript;
13+
const repoRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..");
14+
const inferenceOptionsPath = path.join(repoRoot, "docs", "inference", "inference-options.mdx");
15+
const inferenceConfigPath = path.join(repoRoot, "src", "lib", "inference", "config.ts");
16+
const modelPromptsPath = path.join(repoRoot, "src", "lib", "inference", "model-prompts.ts");
17+
18+
/**
19+
* Removes TypeScript `as const` wrappers before inspecting literal AST nodes.
20+
*/
21+
function unwrapConstAssertion(expression: TypeScript.Expression): TypeScript.Expression {
22+
return ts.isAsExpression(expression) ? unwrapConstAssertion(expression.expression) : expression;
23+
}
24+
25+
function readExportedConstInitializer(
26+
sourcePath: string,
27+
exportName: string,
28+
): { sourceFile: TypeScript.SourceFile; initializer: TypeScript.Expression } {
29+
const source = fs.readFileSync(sourcePath, "utf8");
30+
const sourceFile = ts.createSourceFile(sourcePath, source, ts.ScriptTarget.Latest, true);
31+
32+
const declaration = sourceFile.statements
33+
.filter(
34+
(statement): statement is TypeScript.VariableStatement =>
35+
ts.isVariableStatement(statement) &&
36+
(statement.modifiers?.some((modifier) => modifier.kind === ts.SyntaxKind.ExportKeyword) ??
37+
false),
38+
)
39+
.flatMap((statement) => Array.from(statement.declarationList.declarations))
40+
.find((candidate) => candidate.name.getText(sourceFile) === exportName);
41+
expect(declaration).toBeTruthy();
42+
43+
const initializer = declaration?.initializer && unwrapConstAssertion(declaration.initializer);
44+
expect(initializer).toBeTruthy();
45+
46+
return { sourceFile, initializer: initializer as TypeScript.Expression };
47+
}
48+
49+
function readCuratedCloudModelIds(): string[] {
50+
const { sourceFile, initializer } = readExportedConstInitializer(
51+
inferenceConfigPath,
52+
"CLOUD_MODEL_OPTIONS",
53+
);
54+
expect(ts.isArrayLiteralExpression(initializer)).toBe(true);
55+
56+
return (initializer as TypeScript.ArrayLiteralExpression).elements.map((element) => {
57+
expect(ts.isObjectLiteralExpression(element)).toBe(true);
58+
const idProperty = (element as TypeScript.ObjectLiteralExpression).properties.find(
59+
(property) =>
60+
ts.isPropertyAssignment(property) &&
61+
property.name.getText(sourceFile) === "id" &&
62+
ts.isStringLiteralLike(unwrapConstAssertion(property.initializer)),
63+
);
64+
expect(idProperty).toBeTruthy();
65+
const idInitializer = unwrapConstAssertion(
66+
(idProperty as TypeScript.PropertyAssignment).initializer,
67+
);
68+
return (idInitializer as TypeScript.StringLiteral).text;
69+
});
70+
}
71+
72+
function readRemoteModelIds(providerKey: string): string[] {
73+
const { sourceFile, initializer } = readExportedConstInitializer(
74+
modelPromptsPath,
75+
"REMOTE_MODEL_OPTIONS",
76+
);
77+
expect(ts.isObjectLiteralExpression(initializer)).toBe(true);
78+
79+
const providerProperty = (initializer as TypeScript.ObjectLiteralExpression).properties.find(
80+
(property) =>
81+
ts.isPropertyAssignment(property) && property.name.getText(sourceFile) === providerKey,
82+
);
83+
expect(providerProperty).toBeTruthy();
84+
85+
const providerInitializer = unwrapConstAssertion(
86+
(providerProperty as TypeScript.PropertyAssignment).initializer,
87+
);
88+
expect(ts.isArrayLiteralExpression(providerInitializer)).toBe(true);
89+
90+
return (providerInitializer as TypeScript.ArrayLiteralExpression).elements.map((element) => {
91+
expect(ts.isStringLiteralLike(unwrapConstAssertion(element))).toBe(true);
92+
return (unwrapConstAssertion(element) as TypeScript.StringLiteral).text;
93+
});
94+
}
95+
96+
/**
97+
* Reads curated onboarding model IDs from source config instead of duplicating them in docs tests.
98+
*/
99+
function readCuratedOnboardingModelIds(): string[] {
100+
return [
101+
...readCuratedCloudModelIds(),
102+
...readRemoteModelIds("openai"),
103+
...readRemoteModelIds("anthropic"),
104+
...readRemoteModelIds("gemini"),
105+
];
106+
}
107+
108+
describe("inference options model task-fit docs (#4755)", () => {
109+
it("keeps a per-model task-fit comparison table for curated onboarding models", () => {
110+
const markdown = fs.readFileSync(inferenceOptionsPath, "utf8");
111+
const start = markdown.indexOf("## Model Task-Fit Guide");
112+
const end = markdown.indexOf("## Choosing the Right Option for Nemotron", start);
113+
expect(start).toBeGreaterThanOrEqual(0);
114+
expect(end).toBeGreaterThan(start);
115+
const section = markdown.slice(start, end);
116+
117+
expect(section).toContain(
118+
"| Model | Best-for task type | Relative latency | Tool-use quality | Context-window fit | Relative cost |",
119+
);
120+
expect(section).toContain("provider catalog remains authoritative");
121+
expect(section).not.toMatch(/\bTBD\b|\bTODO\b/i);
122+
expect(section).not.toContain("Very large context");
123+
124+
for (const modelId of readCuratedOnboardingModelIds()) {
125+
expect(section).toContain(`| \`${modelId}\` |`);
126+
}
127+
});
128+
});

0 commit comments

Comments
 (0)