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
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
feat: retire shipped NVIDIA Kimi provider
[._.]/ Adam Eivyf7b61fde18c3
diff --git a/client/src/components/cos/TaskAddForm.jsx b/client/src/components/cos/TaskAddForm.jsxindex c4960aa36b..0857a1cef6 100644--- a/client/src/components/cos/TaskAddForm.jsx+++ b/client/src/components/cos/TaskAddForm.jsx@@ -278,7 +278,7 @@ export default function TaskAddForm({ providers, providersLoaded = true, apps, o// Memoize enabled providers for the dropdown — restricted to CODING providers// (CLI/TUI agents with a file-writing harness). HTTP `api` providers (raw- // Ollama / LM Studio / nvidia-kimi) return plain text and can't write files, so+ // Ollama / LM Studio / NVIDIA NIM) return plain text and can't write files, so// they're not valid task runners; a user who only has those should use a local// coding preset: Claude Ollama or OpenCode MTPLX for a separately running// MTPLX server.diff --git a/client/src/utils/providers.test.js b/client/src/utils/providers.test.jsindex 4555eaffe0..589a5f3927 100644--- a/client/src/utils/providers.test.js+++ b/client/src/utils/providers.test.js@@ -1360,7 +1360,7 @@ describe('supportsModelRefresh', () => {'claude-sglang', 'claude-sglang-tui', 'codex', 'codex-lmstudio','codex-ollama', 'codex-tui','cursor-cli',- 'cursor-tui', 'grok', 'lmstudio', 'mtplx', 'nvidia-kimi', 'nvidia-nim', 'ollama',+ 'cursor-tui', 'grok', 'lmstudio', 'mtplx', 'nvidia-nim', 'ollama','opencode-llama-tui','opencode-lmstudio', 'opencode-lmstudio-tui','opencode-mtplx', 'opencode-mtplx-tui',diff --git a/data.reference/model-comparison.json b/data.reference/model-comparison.jsonindex 3226b7f02f..f5338f7002 100644--- a/data.reference/model-comparison.json+++ b/data.reference/model-comparison.json@@ -1626,59 +1626,6 @@"quota": null,"notes": "Sourced from Artificial Analysis (Claude Opus 4.6 (Non-reasoning, High Effort))."},- {- "id": "aa-v4.2-kimi-kimi-k2-unspecified",- "provider": "Kimi",- "model": "kimi-k2",- "effort": "unspecified",- "configuration": "Published API model",- "billing": "api",- "benchmark": "Artificial Analysis Intelligence Index v4.2",- "quality": {- "value": 13.3,- "source": {- "url": "https://artificialanalysis.ai/models/kimi-k2",- "retrievedAt": "2026-09-05T00:00:00Z",- "methodology": "Artificial Analysis Intelligence Index v4.2 composite score."- }- },- "costPerTask": null,- "inputPerMillion": {- "value": 0.57,- "source": {- "url": "https://artificialanalysis.ai/models/kimi-k2",- "retrievedAt": "2026-09-05T00:00:00Z",- "methodology": "Published USD per million uncached input tokens."- }- },- "outputPerMillion": {- "value": 2.3,- "source": {- "url": "https://artificialanalysis.ai/models/kimi-k2",- "retrievedAt": "2026-09-05T00:00:00Z",- "methodology": "Published USD per million output tokens."- }- },- "reasoningPerMillion": null,- "responseSeconds": {- "value": 14.2,- "source": {- "url": "https://artificialanalysis.ai/models/kimi-k2",- "retrievedAt": "2026-09-05T00:00:00Z",- "methodology": "Artificial Analysis median end-to-end response time (500 answer tokens)."- }- },- "tokensPerSecond": {- "value": 40,- "source": {- "url": "https://artificialanalysis.ai/models/kimi-k2",- "retrievedAt": "2026-09-05T00:00:00Z",- "methodology": "Artificial Analysis median output tokens per second."- }- },- "quota": null,- "notes": "Sourced from Artificial Analysis (Kimi K2)."- },{"id": "aa-v4.2-openai-gpt-5.4-non-reasoning","provider": "OpenAI",@@ -3499,45 +3446,6 @@"quota": null,"notes": "Sourced from Artificial Analysis (GPT-6 Astra (low))."},- {- "id": "aa-v4.2-kimi-kimi-k2.5-reasoning",- "provider": "Kimi",- "model": "kimi-k2.5",- "effort": "reasoning",- "configuration": "Published API model; Reasoning",- "billing": "api",- "benchmark": "Artificial Analysis Intelligence Index v4.2",- "quality": {- "value": 27.6,- "source": {- "url": "https://artificialanalysis.ai/models/kimi-k2-5",- "retrievedAt": "2026-09-05T00:00:00Z",- "methodology": "Artificial Analysis Intelligence Index v4.2 composite score."- }- },- "costPerTask": null,- "inputPerMillion": {- "value": 0.6,- "source": {- "url": "https://artificialanalysis.ai/models/kimi-k2-5",- "retrievedAt": "2026-09-05T00:00:00Z",- "methodology": "Published USD per million uncached input tokens."- }- },- "outputPerMillion": {- "value": 2.75,- "source": {- "url": "https://artificialanalysis.ai/models/kimi-k2-5",- "retrievedAt": "2026-09-05T00:00:00Z",- "methodology": "Published USD per million output tokens."- }- },- "reasoningPerMillion": null,- "responseSeconds": null,- "tokensPerSecond": null,- "quota": null,- "notes": "Sourced from Artificial Analysis (Kimi K2.5 (Reasoning))."- },{"id": "aa-v4.2-anthropic-claude-4.5-haiku-reasoning","provider": "Anthropic",@@ -4075,45 +3983,6 @@"quota": null,"notes": "Sourced from Artificial Analysis (Claude Sonnet 5 (Adaptive Reasoning, High Effort))."},- {- "id": "aa-v4.2-kimi-kimi-k2.5-non-reasoning",- "provider": "Kimi",- "model": "kimi-k2.5",- "effort": "non-reasoning",- "configuration": "Published API model; Non-reasoning",- "billing": "api",- "benchmark": "Artificial Analysis Intelligence Index v4.2",- "quality": {- "value": 22.8,- "source": {- "url": "https://artificialanalysis.ai/models/kimi-k2-5-non-reasoning",- "retrievedAt": "2026-09-05T00:00:00Z",- "methodology": "Artificial Analysis Intelligence Index v4.2 composite score."- }- },- "costPerTask": null,- "inputPerMillion": {- "value": 0.6,- "source": {- "url": "https://artificialanalysis.ai/models/kimi-k2-5-non-reasoning",- "retrievedAt": "2026-09-05T00:00:00Z",- "methodology": "Published USD per million uncached input tokens."- }- },- "outputPerMillion": {- "value": 3,- "source": {- "url": "https://artificialanalysis.ai/models/kimi-k2-5-non-reasoning",- "retrievedAt": "2026-09-05T00:00:00Z",- "methodology": "Published USD per million output tokens."- }- },- "reasoningPerMillion": null,- "responseSeconds": null,- "tokensPerSecond": null,- "quota": null,- "notes": "Sourced from Artificial Analysis (Kimi K2.5 (Non-reasoning))."- },{"id": "aa-v4.2-openai-gpt-5.4-mini-xhigh","provider": "OpenAI",@@ -7934,59 +7803,6 @@"quota": null,"notes": "Sourced from Artificial Analysis (Claude Opus 4.6 (Non-reasoning, High Effort))."},- {- "id": "aa-v4.3-kimi-kimi-k2-unspecified",- "provider": "Kimi",- "model": "kimi-k2",- "effort": "unspecified",- "configuration": "Published API model",- "billing": "api",- "benchmark": "Artificial Analysis Intelligence Index v4.3",- "quality": {- "value": 12.7,- "source": {- "url": "https://artificialanalysis.ai/models/kimi-k2",- "retrievedAt": "2026-09-10T03:11:17.127Z",- "methodology": "Artificial Analysis Intelligence Index v4.3 composite score."- }- },- "costPerTask": null,- "inputPerMillion": {- "value": 0.57,- "source": {- "url": "https://artificialanalysis.ai/models/kimi-k2",- "retrievedAt": "2026-09-10T03:11:17.127Z",- "methodology": "Published USD per million uncached input tokens."- }- },- "outputPerMillion": {- "value": 2.3,- "source": {- "url": "https://artificialanalysis.ai/models/kimi-k2",- "retrievedAt": "2026-09-10T03:11:17.127Z",- "methodology": "Published USD per million output tokens."- }- },- "reasoningPerMillion": null,- "responseSeconds": {- "value": 13.8,- "source": {- "url": "https://artificialanalysis.ai/models/kimi-k2",- "retrievedAt": "2026-09-10T03:11:17.127Z",- "methodology": "Artificial Analysis median end-to-end response time (500 answer tokens)."- }- },- "tokensPerSecond": {- "value": 40.5,- "source": {- "url": "https://artificialanalysis.ai/models/kimi-k2",- "retrievedAt": "2026-09-10T03:11:17.127Z",- "methodology": "Artificial Analysis median output tokens per second."- }- },- "quota": null,- "notes": "Sourced from Artificial Analysis (Kimi K2)."- },{"id": "aa-v4.3-openai-gpt-5.4-non-reasoning","provider": "OpenAI",@@ -9884,45 +9700,6 @@"quota": null,"notes": "Sourced from Artificial Analysis (GPT-6 Astra (low))."},- {- "id": "aa-v4.3-kimi-kimi-k2.5-reasoning",- "provider": "Kimi",- "model": "kimi-k2.5",- "effort": "reasoning",- "configuration": "Published API model; Reasoning",- "billing": "api",- "benchmark": "Artificial Analysis Intelligence Index v4.3",- "quality": {- "value": 23.5,- "source": {- "url": "https://artificialanalysis.ai/models/kimi-k2-5",- "retrievedAt": "2026-09-10T03:11:17.127Z",- "methodology": "Artificial Analysis Intelligence Index v4.3 composite score."- }- },- "costPerTask": null,- "inputPerMillion": {- "value": 0.6,- "source": {- "url": "https://artificialanalysis.ai/models/kimi-k2-5",- "retrievedAt": "2026-09-10T03:11:17.127Z",- "methodology": "Published USD per million uncached input tokens."- }- },- "outputPerMillion": {- "value": 2.75,- "source": {- "url": "https://artificialanalysis.ai/models/kimi-k2-5",- "retrievedAt": "2026-09-10T03:11:17.127Z",- "methodology": "Published USD per million output tokens."- }- },- "reasoningPerMillion": null,- "responseSeconds": null,- "tokensPerSecond": null,- "quota": null,- "notes": "Sourced from Artificial Analysis (Kimi K2.5 (Reasoning))."- },{"id": "aa-v4.3-anthropic-claude-4.5-haiku-reasoning","provider": "Anthropic",@@ -10467,45 +10244,6 @@"quota": null,"notes": "Sourced from Artificial Analysis (Claude Sonnet 5 (Adaptive Reasoning, High Effort))."},- {- "id": "aa-v4.3-kimi-kimi-k2.5-non-reasoning",- "provider": "Kimi",- "model": "kimi-k2.5",- "effort": "non-reasoning",- "configuration": "Published API model; Non-reasoning",- "billing": "api",- "benchmark": "Artificial Analysis Intelligence Index v4.3",- "quality": {- "value": 19.4,- "source": {- "url": "https://artificialanalysis.ai/models/kimi-k2-5-non-reasoning",- "retrievedAt": "2026-09-10T03:11:17.127Z",- "methodology": "Artificial Analysis Intelligence Index v4.3 composite score."- }- },- "costPerTask": null,- "inputPerMillion": {- "value": 0.6,- "source": {- "url": "https://artificialanalysis.ai/models/kimi-k2-5-non-reasoning",- "retrievedAt": "2026-09-10T03:11:17.127Z",- "methodology": "Published USD per million uncached input tokens."- }- },- "outputPerMillion": {- "value": 3,- "source": {- "url": "https://artificialanalysis.ai/models/kimi-k2-5-non-reasoning",- "retrievedAt": "2026-09-10T03:11:17.127Z",- "methodology": "Published USD per million output tokens."- }- },- "reasoningPerMillion": null,- "responseSeconds": null,- "tokensPerSecond": null,- "quota": null,- "notes": "Sourced from Artificial Analysis (Kimi K2.5 (Non-reasoning))."- },{"id": "aa-v4.3-openai-gpt-5.4-mini-xhigh","provider": "OpenAI",diff --git a/data.reference/providers.json b/data.reference/providers.jsonindex e138e3bc96..b0ff988f42 100644--- a/data.reference/providers.json+++ b/data.reference/providers.json@@ -1009,27 +1009,6 @@"envVars": {},"secretEnvVars": []},- "nvidia-kimi": {- "id": "nvidia-kimi",- "name": "NVIDIA Kimi K2.5",- "type": "api",- "endpoint": "https://integrate.api.nvidia.com/v1",- "apiKey": "",- "models": [- "moonshotai/kimi-k2.5",- "moonshotai/kimi-k2-instruct",- "moonshotai/kimi-k2-thinking"- ],- "defaultModel": "moonshotai/kimi-k2.5",- "lightModel": "moonshotai/kimi-k2-instruct",- "mediumModel": "moonshotai/kimi-k2.5",- "heavyModel": "moonshotai/kimi-k2-thinking",- "fallbackProvider": null,- "timeout": 300000,- "enabled": false,- "envVars": {},- "secretEnvVars": []- },"cerebras": {"id": "cerebras","name": "Cerebras",diff --git a/docs/features/claude-ollama.md b/docs/features/claude-ollama.mdindex 52595e3379..6f241d7cb5 100644--- a/docs/features/claude-ollama.md+++ b/docs/features/claude-ollama.md@@ -26,7 +26,7 @@ PortOS has two provider classes:- **`cli` / `tui`** (claude, codex, agy) — spawned as a child process in the agentworktree. The CLI owns the Read/Write/Edit/Bash **tool harness**, so it can writefiles. CoS agent tasks run only on these.-- **`api`** (Ollama, LM Studio, nvidia-nim, nvidia-kimi) — an HTTP request that returns **plain+- **`api`** (Ollama, LM Studio, NVIDIA NIM) — an HTTP request that returns **plaintext**. No harness, no file writes. Great for planning/vision/ask, but a task thatneeds to edit files produces a transcript and writes nothing.diff --git a/scripts/generate-provider-samples.js b/scripts/generate-provider-samples.jsindex 528f39f704..fe1d5558f2 100644--- a/scripts/generate-provider-samples.js+++ b/scripts/generate-provider-samples.js@@ -580,17 +580,6 @@ const TUPLES = [},},- // --- Direct API definitions (no harness program) ------------------------------ {- id: 'nvidia-kimi', harnessId: 'direct', method: 'api', service: { definitionId: 'nvidia-nim', slug: 'nvidia-kimi', credentials: { apiKey: '' } },- overrides: {- name: 'NVIDIA Kimi K2.5', enabled: false,- models: ['moonshotai/kimi-k2.5', 'moonshotai/kimi-k2-instruct', 'moonshotai/kimi-k2-thinking'],- defaultModel: 'moonshotai/kimi-k2.5', lightModel: 'moonshotai/kimi-k2-instruct', mediumModel: 'moonshotai/kimi-k2.5', heavyModel: 'moonshotai/kimi-k2-thinking',- fallbackProvider: null, timeout: 300000,- envVars: {}, apiKey: '',- },- },{id: 'cerebras', harnessId: 'direct', method: 'api', service: { definitionId: 'cerebras', credentials: { apiKey: '' } },overrides: {@@ -671,7 +660,7 @@ export const PROVIDER_ORDER = ['codex', 'codex-tui', 'codex-ollama', 'codex-lmstudio','claude-code-tui', 'claude-code-tui-bedrock','antigravity-tui', 'antigravity-cli',- 'nvidia-kimi', 'cerebras', 'lmstudio', 'ollama', 'mtplx', 'slotstream',+ 'cerebras', 'lmstudio', 'ollama', 'mtplx', 'slotstream','grok', 'grok-cli', 'grok-tui', 'kimi-cli', 'kimi-tui', 'cursor-cli', 'cursor-tui',];diff --git a/scripts/generate-provider-samples.test.js b/scripts/generate-provider-samples.test.jsindex 33b05de5ff..8ce34311f9 100644--- a/scripts/generate-provider-samples.test.js+++ b/scripts/generate-provider-samples.test.js@@ -62,12 +62,18 @@ describe('provider sample generator', () => {'codex', 'codex-tui', 'codex-ollama', 'codex-lmstudio','claude-code-tui', 'claude-code-tui-bedrock','antigravity-tui', 'antigravity-cli',- 'nvidia-kimi', 'cerebras', 'lmstudio', 'ollama', 'mtplx', 'slotstream',+ 'cerebras', 'lmstudio', 'ollama', 'mtplx', 'slotstream','grok', 'grok-cli', 'grok-tui', 'kimi-cli', 'kimi-tui', 'cursor-cli', 'cursor-tui',];expect([...PROVIDER_ORDER].sort()).toEqual([...SHIPPED_IDS].sort());});+ it('does not ship the retired NVIDIA Kimi preset', () => {+ for (const variant of ['sample', 'reference']) {+ expect(buildProviders(variant)).not.toHaveProperty('nvidia-kimi');+ }+ });+it('deliberately leaves every structural key (harnessId/method/serviceId) off a shipped sample', () => {// See the generator's module docstring and DROP_STRUCTURAL_KEYS: a shipped// sample carries no graph connection, so stamping these would make a freshdiff --git a/scripts/migrations/375-aa-comparison-v43.test.js b/scripts/migrations/375-aa-comparison-v43.test.jsindex 13412244c1..f7043ccf15 100644--- a/scripts/migrations/375-aa-comparison-v43.test.js+++ b/scripts/migrations/375-aa-comparison-v43.test.js@@ -14,12 +14,12 @@ it('upgrades an existing catalog without losing researched evidence and fails clawait writeFile(join(rootDir, 'data.reference/model-comparison.json'), JSON.stringify(seed));expect(await migration.up({ rootDir })).toEqual({ added: 0 });const refreshed = seed.observations.filter(row => row.id.startsWith('aa-v4.3-'));- expect(refreshed).toHaveLength(111);+ expect(refreshed).toHaveLength(108);const researched = { ...refreshed[0], notes: 'Example locally researched evidence' };const prior = { schemaVersion: 1, observations: [seed.observations[0], researched] };const path = join(rootDir, 'data/model-comparison.json');await writeFile(path, JSON.stringify(prior));- expect(await migration.up({ rootDir })).toEqual({ added: 110 });+ expect(await migration.up({ rootDir })).toEqual({ added: 107 });const result = JSON.parse(await readFile(path, 'utf8'));expect(result.observations.slice(0, 2)).toEqual(prior.observations);expect(await migration.up({ rootDir })).toEqual({ added: 0 });diff --git a/scripts/migrations/402-retire-nvidia-kimi-provider.js b/scripts/migrations/402-retire-nvidia-kimi-provider.jsnew file mode 100644index 0000000000..176e703ded--- /dev/null+++ b/scripts/migrations/402-retire-nvidia-kimi-provider.js@@ -0,0 +1,82 @@+/**+ * Retire the shipped NVIDIA Kimi K2.5 preset now that NVIDIA NIM is the+ * general provider for that endpoint and its broader catalog.+ *+ * Fresh installs no longer receive this record from data.reference. Existing+ * installs are handled conservatively: remove only the untouched shipped+ * preset, while preserving a record the user enabled, keyed, renamed,+ * selected as active, customized, or referenced as a fallback.+ *+ * The graph reconciliation that follows migration removes the deleted route;+ * it deliberately keeps an emptied connection available for explicit service+ * cleanup, matching the provider-graph contract for user-owned connections.+ */++import { isDeepStrictEqual } from 'node:util';+import { readProvidersDoc, writeJsonAtomic } from './_lib.js';++const PROVIDERS_REL_PATH = 'data/providers.json';+const PROVIDER_ID = 'nvidia-kimi';+const GRAPH_FIELDS = new Set(['harnessId', 'method', 'serviceId', 'servicePlan']);++// The provider existed in two equivalent shipped shapes: older reference+// seeds omitted fallbackProvider and secretEnvVars, while the normalized+// generator emitted both. Normalize only those known default omissions before+// comparing; any other extra or changed field is user-owned and blocks removal.+const SHIPPED_PROVIDER = {+ id: PROVIDER_ID,+ name: 'NVIDIA Kimi K2.5',+ type: 'api',+ endpoint: 'https://integrate.api.nvidia.com/v1',+ apiKey: '',+ models: ['moonshotai/kimi-k2.5', 'moonshotai/kimi-k2-instruct', 'moonshotai/kimi-k2-thinking'],+ defaultModel: 'moonshotai/kimi-k2.5',+ lightModel: 'moonshotai/kimi-k2-instruct',+ mediumModel: 'moonshotai/kimi-k2.5',+ heavyModel: 'moonshotai/kimi-k2-thinking',+ fallbackProvider: null,+ timeout: 300000,+ enabled: false,+ envVars: {},+ secretEnvVars: [],+};++const comparableProvider = (provider) => {+ const comparable = Object.fromEntries(Object.entries(provider).filter(([key]) => !GRAPH_FIELDS.has(key)));+ if (!Object.hasOwn(comparable, 'fallbackProvider')) comparable.fallbackProvider = null;+ if (!Object.hasOwn(comparable, 'secretEnvVars')) comparable.secretEnvVars = [];+ return comparable;+};++export const isUntouchedShippedNvidiaKimi = (provider) => (+ provider && typeof provider === 'object' && !Array.isArray(provider)+ && isDeepStrictEqual(comparableProvider(provider), SHIPPED_PROVIDER)+);++const isReferenced = (config, providers) => (+ config?.activeProvider === PROVIDER_ID+ || Object.values(providers).some((provider) => provider?.fallbackProvider === PROVIDER_ID)+);++export default {+ async up({ rootDir }) {+ const doc = await readProvidersDoc({ rootDir });+ if (!doc.ok) {+ if (doc.reason === 'no-file') console.log(`📄 ${PROVIDERS_REL_PATH} not present — skipping NVIDIA Kimi retirement`);+ else if (doc.reason === 'unreadable') console.log(`⚠️ ${PROVIDERS_REL_PATH}: invalid JSON, skipping (${doc.err.message})`);+ else console.log(`⚠️ ${PROVIDERS_REL_PATH}: unexpected shape, skipping`);+ return { ok: false, reason: doc.reason, removed: false };+ }++ if (!Object.hasOwn(doc.providers, PROVIDER_ID)) return { ok: true, reason: 'absent', removed: false };+ const provider = doc.providers[PROVIDER_ID];+ if (!isUntouchedShippedNvidiaKimi(provider) || isReferenced(doc.config, doc.providers)) {+ return { ok: true, reason: 'customized', removed: false };+ }++ delete doc.providers[PROVIDER_ID];+ await writeJsonAtomic(doc.path, doc.config);+ console.log(`🧹 ${PROVIDERS_REL_PATH}: removed retired NVIDIA Kimi K2.5 preset`);+ return { ok: true, reason: 'removed', removed: true };+ },+};diff --git a/scripts/migrations/402-retire-nvidia-kimi-provider.test.js b/scripts/migrations/402-retire-nvidia-kimi-provider.test.jsnew file mode 100644index 0000000000..ec4c6fc168--- /dev/null+++ b/scripts/migrations/402-retire-nvidia-kimi-provider.test.js@@ -0,0 +1,99 @@+import { afterEach, beforeEach, describe, expect, it } from 'vitest';+import { mkdirSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from 'fs';+import { tmpdir } from 'os';+import { join } from 'path';++import migration, { isUntouchedShippedNvidiaKimi } from './402-retire-nvidia-kimi-provider.js';++const writeJson = (path, value) => writeFileSync(path, `${JSON.stringify(value, null, 2)}\n`);+const readJson = (path) => JSON.parse(readFileSync(path, 'utf8'));++const shippedProvider = () => ({+ id: 'nvidia-kimi',+ name: 'NVIDIA Kimi K2.5',+ type: 'api',+ endpoint: 'https://integrate.api.nvidia.com/v1',+ apiKey: '',+ models: ['moonshotai/kimi-k2.5', 'moonshotai/kimi-k2-instruct', 'moonshotai/kimi-k2-thinking'],+ defaultModel: 'moonshotai/kimi-k2.5',+ lightModel: 'moonshotai/kimi-k2-instruct',+ mediumModel: 'moonshotai/kimi-k2.5',+ heavyModel: 'moonshotai/kimi-k2-thinking',+ fallbackProvider: null,+ timeout: 300000,+ enabled: false,+ envVars: {},+ secretEnvVars: [],+});++describe('migration 402 — retire NVIDIA Kimi provider', () => {+ let rootDir;+ let providersPath;++ beforeEach(() => {+ rootDir = mkdtempSync(join(tmpdir(), 'migration-402-nvidia-kimi-'));+ mkdirSync(join(rootDir, 'data'), { recursive: true });+ providersPath = join(rootDir, 'data/providers.json');+ });++ afterEach(() => rmSync(rootDir, { recursive: true, force: true }));++ it('removes the untouched normalized seed and preserves other providers', async () => {+ writeJson(providersPath, {+ activeProvider: 'nvidia-nim',+ providers: { 'nvidia-kimi': shippedProvider(), 'nvidia-nim': { id: 'nvidia-nim', enabled: false } },+ });++ await expect(migration.up({ rootDir })).resolves.toEqual({ ok: true, reason: 'removed', removed: true });+ expect(readJson(providersPath)).toEqual({+ activeProvider: 'nvidia-nim',+ providers: { 'nvidia-nim': { id: 'nvidia-nim', enabled: false } },+ });+ });++ it('removes the older seed shape and ignores graph-owned fields', async () => {+ const provider = shippedProvider();+ delete provider.fallbackProvider;+ delete provider.secretEnvVars;+ Object.assign(provider, { harnessId: 'direct', method: 'api', serviceId: 'nvidia-kimi', servicePlan: 'paid' });+ writeJson(providersPath, { providers: { 'nvidia-kimi': provider } });++ expect(isUntouchedShippedNvidiaKimi(provider)).toBe(true);+ await migration.up({ rootDir });+ expect(readJson(providersPath).providers).toEqual({});+ });++ it('preserves enabled, keyed, renamed, selected, customized, or referenced records', async () => {+ const cases = [+ { enabled: true },+ { apiKey: 'nvapi-example' },+ { name: 'My NVIDIA Kimi' },+ { defaultModel: 'moonshotai/kimi-k2-thinking' },+ { models: ['custom/model'] },+ ];+ for (const change of cases) {+ const provider = { ...shippedProvider(), ...change };+ writeJson(providersPath, { providers: { 'nvidia-kimi': provider } });+ await expect(migration.up({ rootDir })).resolves.toMatchObject({ reason: 'customized', removed: false });+ expect(readJson(providersPath).providers['nvidia-kimi']).toEqual(provider);+ }++ const provider = shippedProvider();+ writeJson(providersPath, {+ activeProvider: 'nvidia-kimi',+ providers: { 'nvidia-kimi': provider, primary: { fallbackProvider: 'nvidia-kimi' } },+ });+ await expect(migration.up({ rootDir })).resolves.toMatchObject({ reason: 'customized', removed: false });+ expect(readJson(providersPath).providers['nvidia-kimi']).toEqual(provider);+ });++ it('is a no-op when absent and does not create a fresh providers file', async () => {+ await expect(migration.up({ rootDir })).resolves.toEqual({ ok: false, reason: 'no-file', removed: false });+ expect(() => readFileSync(providersPath, 'utf8')).toThrow();++ writeJson(providersPath, { providers: {} });+ const before = readFileSync(providersPath, 'utf8');+ await expect(migration.up({ rootDir })).resolves.toEqual({ ok: true, reason: 'absent', removed: false });+ expect(readFileSync(providersPath, 'utf8')).toBe(before);+ });+});diff --git a/server/lib/aiToolkit/defaults/providers.sample.json b/server/lib/aiToolkit/defaults/providers.sample.jsonindex 70caa839f9..887bd17e1e 100644--- a/server/lib/aiToolkit/defaults/providers.sample.json+++ b/server/lib/aiToolkit/defaults/providers.sample.json@@ -1009,27 +1009,6 @@"envVars": {},"secretEnvVars": []},- "nvidia-kimi": {- "id": "nvidia-kimi",- "name": "NVIDIA Kimi K2.5",- "type": "api",- "endpoint": "https://integrate.api.nvidia.com/v1",- "apiKey": "",- "models": [- "moonshotai/kimi-k2.5",- "moonshotai/kimi-k2-instruct",- "moonshotai/kimi-k2-thinking"- ],- "defaultModel": "moonshotai/kimi-k2.5",- "lightModel": "moonshotai/kimi-k2-instruct",- "mediumModel": "moonshotai/kimi-k2.5",- "heavyModel": "moonshotai/kimi-k2-thinking",- "fallbackProvider": null,- "timeout": 300000,- "enabled": false,- "envVars": {},- "secretEnvVars": []- },"cerebras": {"id": "cerebras","name": "Cerebras",diff --git a/server/lib/aiToolkit/endpointGuard.js b/server/lib/aiToolkit/endpointGuard.jsindex d9499c1b33..6291210c12 100644--- a/server/lib/aiToolkit/endpointGuard.js+++ b/server/lib/aiToolkit/endpointGuard.js@@ -67,7 +67,7 @@ const ALLOWED_PROVIDER_HOSTS = new Set(['api.fireworks.ai','api.cerebras.ai','api.orcarouter.ai',- 'integrate.api.nvidia.com', // NVIDIA NIM (bundled `nvidia-nim` / `nvidia-kimi` providers)+ 'integrate.api.nvidia.com', // NVIDIA NIM]);const IPV4_RE = /^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/;diff --git a/server/lib/aiToolkit/index.js b/server/lib/aiToolkit/index.jsindex 8c0cc2c5e1..7f0f1896b9 100644--- a/server/lib/aiToolkit/index.js+++ b/server/lib/aiToolkit/index.js@@ -59,7 +59,7 @@ export function createAIToolkit(config = {}) {hooks = {},maxConcurrentRuns = 5,enableProviderStatus = true,- defaultFallbackPriority = ['claude-code', 'codex', 'nvidia-kimi', 'lmstudio', 'ollama', 'antigravity-cli', 'gemini-cli'],+ defaultFallbackPriority = ['claude-code', 'codex', 'lmstudio', 'ollama', 'antigravity-cli', 'gemini-cli'],// Host gate for "can this provider run at all?" — see providerStatus.js.// Unset standalone, so the toolkit routes on enabled + availability alone.prerequisitesMet = null,diff --git a/server/lib/aiToolkit/internal/modelFetchers.test.js b/server/lib/aiToolkit/internal/modelFetchers.test.jsindex c46b5dc5e0..16880a8843 100644--- a/server/lib/aiToolkit/internal/modelFetchers.test.js+++ b/server/lib/aiToolkit/internal/modelFetchers.test.js@@ -18,7 +18,7 @@ const SHIPPED_REFRESHABLE = ['pi-cli', 'pi-tui','antigravity-cli', 'antigravity-tui', 'cerebras', 'claude-code','claude-code-bedrock', 'claude-ollama', 'claude-ollama-tui', 'cursor-cli',- 'cursor-tui', 'grok', 'lmstudio', 'mtplx', 'nvidia-kimi', 'nvidia-nim', 'ollama',+ 'cursor-tui', 'grok', 'lmstudio', 'mtplx', 'nvidia-nim', 'ollama','slotstream','opencode-llama-tui','opencode-mtplx', 'opencode-mtplx-tui', 'opencode-ollama', 'opencode-ollama-tui',diff --git a/server/lib/aiToolkit/runner.test.js b/server/lib/aiToolkit/runner.test.jsindex cf0fed8d2f..8400d694b2 100644--- a/server/lib/aiToolkit/runner.test.js+++ b/server/lib/aiToolkit/runner.test.js@@ -181,10 +181,10 @@ describe('AI Toolkit runner service', () => {const dataDir = await mkdtemp(join(tmpdir(), 'ai-toolkit-runner-'));tempDirs.push(dataDir);const provider = {- id: 'nvidia-kimi',- name: 'NVIDIA Kimi K2.5',+ id: 'nvidia-nim',+ name: 'NVIDIA NIM',endpoint: 'https://integrate.api.nvidia.com/v1',- defaultModel: 'moonshotai/kimi-k2.5',+ defaultModel: 'poolside/laguna-xs-2.1',};const fetch = vi.fn();vi.stubGlobal('fetch', fetch);@@ -193,7 +193,7 @@ describe('AI Toolkit runner service', () => {hooks: {ensureProviderReady: async () => ({success: false,- error: 'Authentication unavailable for NVIDIA Kimi K2.5: API key is not set.',+ error: 'Authentication unavailable for NVIDIA NIM: API key is not set.',}),},});diff --git a/server/lib/kimi.js b/server/lib/kimi.jsindex b4a77a2e6a..5296a8fd55 100644--- a/server/lib/kimi.js+++ b/server/lib/kimi.js@@ -2,7 +2,7 @@* Per-CLI conventions for Moonshot AI's "Kimi Code" coding agent (binary: `kimi`).** Kimi Code (MoonshotAI/kimi-cli, MIT-licensed) ships two PortOS process-provider- * shapes (the plain HTTP API entry already exists separately as `nvidia-kimi`):+ * shapes, distinct from the hosted NVIDIA NIM API gateway:* - `kimi-cli` (type `cli`) — headless one-shot via `kimi --prompt <value>`.* - `kimi-tui` (type `tui`) — the interactive Kimi Code TUI driven over a PTY.*diff --git a/server/lib/providerPresets.test.js b/server/lib/providerPresets.test.jsindex 23d7e874fb..c8612b12f4 100644--- a/server/lib/providerPresets.test.js+++ b/server/lib/providerPresets.test.js@@ -171,10 +171,11 @@ describe('planPresetBackfill over the shipped samples', () => {expect(patches.slotstream).toMatchObject({ harnessId: 'direct', method: 'api' });});- it('turns two records sharing one endpoint into two narrowings of one instance', () => {- expect(patches['nvidia-nim'].serviceId).toBe(patches['nvidia-kimi'].serviceId);- expect(patches['nvidia-nim'].catalogNarrowing).toEqual(SAMPLES['nvidia-nim'].models);- expect(patches['nvidia-kimi'].catalogNarrowing).toEqual(SAMPLES['nvidia-kimi'].models);+ it('keeps the NIM OpenCode pair on one gateway instance', () => {+ expect(patches['opencode-nvidia-nim'].serviceId).toBe(patches['opencode-nvidia-nim-tui'].serviceId);+ expect(patches['opencode-nvidia-nim']).toMatchObject({ harnessId: 'opencode', method: 'cli' });+ expect(patches['opencode-nvidia-nim-tui']).toMatchObject({ harnessId: 'opencode', method: 'tui' });+ expect(patches['nvidia-nim']).toMatchObject({ harnessId: 'direct', method: 'api' });});it('leaves each unmappable or drifting record legacy with a reason, never a guess', () => {diff --git a/server/services/persistentMindMaintenance.test.js b/server/services/persistentMindMaintenance.test.jsindex 9803166e55..49b029e9d9 100644--- a/server/services/persistentMindMaintenance.test.js+++ b/server/services/persistentMindMaintenance.test.js@@ -5,6 +5,7 @@ const mocks = vi.hoisted(() => ({clearHistory: vi.fn(async () => ({ cleared: 12, preserved: 3 })),archiveMemories: vi.fn(async () => ({ archived: 4, preserved: 2 })),clearRollups: vi.fn(async () => ({ cleared: 2 })),+ clearJournal: vi.fn(async () => ({ cleared: 0 })),resetRuntime: vi.fn(async () => ({ status: 'thinking' })),}));@@ -16,6 +17,9 @@ vi.mock('./persistentMindContext.js', () => ({archivePersistentMindMemories: (...args) => mocks.archiveMemories(...args),clearPersistentMindRollups: (...args) => mocks.clearRollups(...args),}));+vi.mock('./persistentMindJournal.js', () => ({+ clearPersistentMindJournal: (...args) => mocks.clearJournal(...args),+}));vi.mock('./persistentMindSupervisor.js', () => ({resetPersistentMindRuntimeResidue: (...args) => mocks.resetRuntime(...args),}));@@ -36,6 +40,7 @@ describe('persistent mind maintenance', () => {expect(mocks.archiveMemories).toHaveBeenCalledWith('cos-persistent-mind');expect(mocks.clearRollups).toHaveBeenCalledWith('cos-persistent-mind');+ expect(mocks.clearJournal).toHaveBeenCalledWith('cos-persistent-mind');expect(mocks.clearHistory).toHaveBeenCalledWith({mindId: 'cos-persistent-mind',preserveTurnId: 'turn-current',diff --git a/server/services/providerExecutionReadiness.test.js b/server/services/providerExecutionReadiness.test.jsindex e1e4fef825..b7649c704e 100644--- a/server/services/providerExecutionReadiness.test.js+++ b/server/services/providerExecutionReadiness.test.js@@ -47,8 +47,8 @@ describe('provider execution readiness', () => {it('rejects a public API provider without its required key before fetch', async () => {const provider = {- id: 'nvidia-kimi',- name: 'NVIDIA Kimi K2.5',+ id: 'nvidia-nim',+ name: 'NVIDIA NIM',type: 'api',endpoint: 'https://integrate.api.nvidia.com/v1',apiKey: '',@@ -56,7 +56,7 @@ describe('provider execution readiness', () => {await expect(ensureProviderReadyForExecution(provider)).resolves.toEqual({success: false,- error: 'Authentication unavailable for NVIDIA Kimi K2.5: API key is not set. Add it in Settings > AI Providers.',+ error: 'Authentication unavailable for NVIDIA NIM: API key is not set. Add it in Settings > AI Providers.',});expect(mocks.ensureOllama).not.toHaveBeenCalled();expect(mocks.ensureMtplx).not.toHaveBeenCalled();diff --git a/server/services/voice/llm.test.js b/server/services/voice/llm.test.jsindex 4f8d68162b..9cf326a3a0 100644--- a/server/services/voice/llm.test.js+++ b/server/services/voice/llm.test.js@@ -201,14 +201,14 @@ describe('resolveLlmEndpoint', () => {it('uses an API provider endpoint, apiKey, and default model', async () => {getProviderById.mockResolvedValue({- id: 'nvidia-kimi', type: 'api', endpoint: 'https://integrate.api.nvidia.com/v1',- apiKey: 'secret', defaultModel: 'moonshotai/kimi-k2-5', name: 'NVIDIA Kimi',+ id: 'nvidia-nim', type: 'api', endpoint: 'https://integrate.api.nvidia.com/v1',+ apiKey: 'secret', defaultModel: 'poolside/laguna-xs-2.1', name: 'NVIDIA NIM',});- const ep = await resolveLlmEndpoint('nvidia-kimi');+ const ep = await resolveLlmEndpoint('nvidia-nim');expect(ep.apiBase).toBe('https://integrate.api.nvidia.com/v1');expect(ep.apiKey).toBe('secret');- expect(ep.defaultModel).toBe('moonshotai/kimi-k2-5');- expect(ep.providerName).toBe('NVIDIA Kimi');+ expect(ep.defaultModel).toBe('poolside/laguna-xs-2.1');+ expect(ep.providerName).toBe('NVIDIA NIM');});it('strips trailing slashes from the provider endpoint', async () => {