Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.
JavaScript 3d-generationai-agentsanimationavatardigital-humangenerative-aiglbgltfimage-to-3dllmmcpmcp-servermodel-context-protocolsolanatext-to-3dthreejsweb-componentswebglwebxrx402
test(llm): derive the NVIDIA model expectations from the pins instead of restating them
ni3a5839e7cdb7d3
diff --git a/api/_lib/llm.js b/api/_lib/llm.jsindex 8a43cfe45..f7bd538f4 100644--- a/api/_lib/llm.js+++ b/api/_lib/llm.js@@ -110,7 +110,10 @@ const NVIDIA_MODEL = 'nvidia/nemotron-3-super-120b-a12b';// backs it up if the NIM lane is down.// Re-pinned 2026-09-10: nemotron-3-nano-30b-a3b is no longer in the NIM// catalog and answered every call with a 410, so this opt-in lane was dead.-const NVIDIA_NEMOTRON_MODEL = 'nvidia/nemotron-3.5-lightning-30b-a3b';+// Exported so tests assert against the pin itself: this id has been re-pinned+// twice as NVIDIA retired catalog entries, and each time a test restating it by+// hand went red for a reason that had nothing to do with the code.+export const NVIDIA_NEMOTRON_MODEL = 'nvidia/nemotron-3.5-lightning-30b-a3b';// nemotron-3 puts its reasoning in a separate field only when thinking is off;// with it on, the chain of thought leaks into `content` (verified 2026-08-27).const NVIDIA_NO_THINK = Object.freeze({ chat_template_kwargs: { enable_thinking: false } });diff --git a/tests/api/agents-embed.test.js b/tests/api/agents-embed.test.jsindex de530459f..5b7b3d700 100644--- a/tests/api/agents-embed.test.js+++ b/tests/api/agents-embed.test.js@@ -12,6 +12,12 @@// spaces would return plausible-looking garbage to a caller storing the result.import { describe, it, expect, beforeEach, afterEach, vi } from 'vitest';+import { NIM_EMBED_TAG } from '../../api/_lib/embeddings.js';++// The free NIM embedder has been re-pinned as NVIDIA retired catalog entries+// (nv-embedqa-e5-v5 to nemotron-3-embed-1b, 1024 to 2048 dimensions). Derive the+// expectations from the pin so the next re-pin moves this test with the code.+const [NIM_MODEL, NIM_DIM] = [NIM_EMBED_TAG.split('@')[0], Number(NIM_EMBED_TAG.split('@')[1])];const sqlMock = vi.fn();vi.mock('../../api/_lib/db.js', () => ({ sql: (...a) => sqlMock(...a), isDbUnavailableError: () => false, isDbCapacityError: () => false }));@@ -114,10 +120,10 @@ describe('POST /api/agents/:id/embed: free-first embedder registry', () => {expect(res.statusCode).toBe(200);expect(json.embedding).toEqual(VECTOR);expect(json.provider).toBe('nim');- expect(json.model).toBe('nvidia/nv-embedqa-e5-v5');+ expect(json.model).toBe(NIM_MODEL);// The tag is what callers persist beside a stored vector.- expect(json.embedder).toBe('nvidia/nv-embedqa-e5-v5@1024');- expect(json.dim).toBe(1024);+ expect(json.embedder).toBe(NIM_EMBED_TAG);+ expect(json.dim).toBe(NIM_DIM);expect(json.inputType).toBe('query');// The paid backstop was never touched while the free lane could serve.expect(calls).toHaveLength(1);diff --git a/tests/api/llm.test.js b/tests/api/llm.test.jsindex 43eae0985..e754e3a55 100644--- a/tests/api/llm.test.js+++ b/tests/api/llm.test.js@@ -5,6 +5,7 @@// their own key, and a failing provider falls over to the next.import { describe, it, expect, beforeEach, afterEach, vi } from 'vitest';+import { NVIDIA_NEMOTRON_MODEL } from '../../api/_lib/llm.js';// env.js reads process.env lazily through getters, so setting/clearing keys// here is reflected on the next llmComplete() call without re-importing.@@ -138,7 +139,7 @@ describe('llmComplete — free platform providers', () => {const out = await llm.llmComplete({ system: 's', user: 'u', preferNvidia: true });expect(out.provider).toBe('nvidia');expect(out.text).toBe('from nemotron');- expect(out.model).toBe('nvidia/nemotron-3-nano-30b-a3b');+ expect(out.model).toBe(NVIDIA_NEMOTRON_MODEL);// NVIDIA was hit first; Groq never needed.expect(calls[0].url).toContain(NVIDIA_HOST);expect(calls.some((c) => c.url.includes(GROQ_HOST))).toBe(false);