diff --git a/nemoclaw-blueprint/model-specific-setup/openclaw/nemotron-3-super-120b-managed-inference.json b/nemoclaw-blueprint/model-specific-setup/openclaw/nemotron-3-super-120b-managed-inference.json new file mode 100644 index 00000000000..dfc0c4f7ff6 --- /dev/null +++ b/nemoclaw-blueprint/model-specific-setup/openclaw/nemotron-3-super-120b-managed-inference.json @@ -0,0 +1,17 @@ +{ + "$schema": "../schema.json", + "id": "nemotron-3-super-120b-managed-inference", + "agent": "openclaw", + "description": "Disables OpenClaw's native code-based tool search for nvidia/nemotron-3-super-120b-a12b on the NemoClaw managed inference.local route. The model emits invalid JavaScript for the tool_search_code surface (CommonJS require, openclaw.tools.search called with an object, bad describe/call ids), flooding successful runs with '[tools] tool_search_code failed' errors (#4780); routing it back to the structured tool-calling surface avoids the noise.", + "match": { + "modelIds": ["nvidia/nemotron-3-super-120b-a12b"], + "providerKey": "inference", + "inferenceApi": "openai-completions", + "baseUrl": "https://inference.local/v1" + }, + "effects": { + "openclawTools": { + "toolSearch": false + } + } +} diff --git a/test/generate-openclaw-config.test.ts b/test/generate-openclaw-config.test.ts index c610fc56b43..31a47b17e15 100644 --- a/test/generate-openclaw-config.test.ts +++ b/test/generate-openclaw-config.test.ts @@ -1477,6 +1477,47 @@ describe("generate-openclaw-config.mts: config generation", () => { } }, 20_000); + // #4780: Nemotron generates invalid JS for OpenClaw's native code-based tool + // search (`tool_search_code`): CommonJS `require`, `openclaw.tools.search` + // called with an object instead of a string, `tool_describe`/`tool_call` + // invoked with bad ids. The run still succeeds via fallback, but the logs are + // flooded with `[tools] tool_search_code failed` errors. Disabling native + // tool search for this managed-inference route routes the model back to the + // structured tool-calling surface it handles correctly. + it("disables native OpenClaw Tool Search for Nemotron managed inference (#4780)", () => { + const config = runConfigScript({ + NEMOCLAW_MODEL: "nvidia/nemotron-3-super-120b-a12b", + NEMOCLAW_PROVIDER_KEY: "inference", + NEMOCLAW_PRIMARY_MODEL_REF: "inference/nvidia/nemotron-3-super-120b-a12b", + NEMOCLAW_INFERENCE_BASE_URL: "https://inference.local/v1", + NEMOCLAW_INFERENCE_API: "openai-completions", + }); + + expect(config.tools?.toolSearch).toBe(false); + }); + + it("does not disable native Tool Search for Nemotron on non-matching routes (#4780)", () => { + const cases = [ + { NEMOCLAW_MODEL: "nvidia/nemotron-3-nano:30b" }, + { NEMOCLAW_PROVIDER_KEY: "nvidia" }, + { NEMOCLAW_INFERENCE_API: "responses" }, + { NEMOCLAW_INFERENCE_BASE_URL: "https://integrate.api.nvidia.com/v1" }, + ]; + + for (const envCase of cases) { + const config = runConfigScript({ + NEMOCLAW_MODEL: "nvidia/nemotron-3-super-120b-a12b", + NEMOCLAW_PROVIDER_KEY: "inference", + NEMOCLAW_PRIMARY_MODEL_REF: "inference/nvidia/nemotron-3-super-120b-a12b", + NEMOCLAW_INFERENCE_BASE_URL: "https://inference.local/v1", + NEMOCLAW_INFERENCE_API: "openai-completions", + ...envCase, + }); + + expect(config.tools?.toolSearch).toBe(true); + } + }, 20_000); + it("rejects model-specific setup manifests without a known agent", () => { const blueprintDir = path.join(tmpDir, "fixture-blueprint"); const registryDir = writeRegistryManifest(