From 524a7cce3213acdd5db5a39ba596db26ca78ff59 Mon Sep 17 00:00:00 2001 From: Lily Shen <115414357+lilyshen0722@users.noreply.github.com> Date: Tue, 27 Oct 2026 04:19:22 -0700 Subject: [PATCH] fix(native-agents): move summarizer, welcomer and clerk off the expired nemotron route The free OpenRouter nemotron key expired on 2026-10-25. LiteLLM still declares the name, so nothing failed at boot, but every model call returns HTTP 404: pod-summarizer failed 6 of 8 runs in the 48h before 2026-10-27, dying on its first model call. pod-welcomer and task-clerk carry the same string and fail on their next trigger. Point all three at deepseek-v4-flash, the model Scout and Recorder already run on (Scout: 44 of 47 runs succeeded in the same window). The boot seed $sets the demo-pod installs; other installs need refresh-native-agent-configs after deploy. The new test pins that every first-party app names a model LiteLLM declares and does not route through the OpenRouter free tier, since a declared name was not enough to catch this. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01MDs9DS3E4dzoHKdxtgQqyz --- .../config/nativeAgents.modelRoute.test.js | 35 +++++++++++++++++++ .../config/native-agents/pod-summarizer.ts | 2 +- backend/config/native-agents/pod-welcomer.ts | 2 +- backend/config/native-agents/task-clerk.ts | 2 +- 4 files changed, 38 insertions(+), 3 deletions(-) create mode 100644 backend/__tests__/unit/config/nativeAgents.modelRoute.test.js diff --git a/backend/__tests__/unit/config/nativeAgents.modelRoute.test.js b/backend/__tests__/unit/config/nativeAgents.modelRoute.test.js new file mode 100644 index 0000000000..21fa97c755 --- /dev/null +++ b/backend/__tests__/unit/config/nativeAgents.modelRoute.test.js @@ -0,0 +1,35 @@ +/** + * First-party native apps must name a model the deployment can actually serve. + * + * pod-summarizer, pod-welcomer and task-clerk kept the free OpenRouter + * nemotron route after its key expired on 2026-10-25. LiteLLM still declares + * that name, so nothing failed at boot; every run died on its first model call + * with HTTP 404 (6 of 8 pod-summarizer runs in the 48h before 2026-10-27). + * Declared is not the same as servable, so this pins both. + */ +const fs = require('fs'); +const path = require('path'); +const { FIRST_PARTY_APPS } = require('../../../config/native-agents/apps'); + +const litellmConfig = fs.readFileSync(path.join(__dirname, + '../../../../k8s/helm/commonly/templates/configmaps/litellm-config.yaml'), 'utf8'); +const declaredModels = new Set( + [...litellmConfig.matchAll(/model_name:\s*(\S+)/g)].map((m) => m[1]), +); + +describe('first-party native app model routes', () => { + test.each(FIRST_PARTY_APPS.map((app) => [app.agentName, app.model]))( + '%s names a model LiteLLM declares', + (_name, model) => { + expect(declaredModels.has(model)).toBe(true); + }, + ); + + test.each(FIRST_PARTY_APPS.map((app) => [app.agentName, app.model]))( + '%s does not route through the expired OpenRouter free tier', + (_name, model) => { + expect(model).not.toMatch(/^openrouter\//); + expect(model).not.toMatch(/:free$/); + }, + ); +}); diff --git a/backend/config/native-agents/pod-summarizer.ts b/backend/config/native-agents/pod-summarizer.ts index 2ea2e75d56..eb57d3a020 100644 --- a/backend/config/native-agents/pod-summarizer.ts +++ b/backend/config/native-agents/pod-summarizer.ts @@ -61,7 +61,7 @@ export const podSummarizerApp = { + '- DO NOT call commonly_create_task. You are not here to create work.', // See pod-welcomer.ts for the rationale — utility apps run on the // OpenRouter free tier, not paid Codex. - model: 'openrouter/nvidia/nemotron-3-super-120b-a12b:free', + model: 'deepseek-v4-flash', triggers: ['heartbeat'], heartbeatIntervalMinutes: 360, tools: [ diff --git a/backend/config/native-agents/pod-welcomer.ts b/backend/config/native-agents/pod-welcomer.ts index 9f657cd9d4..6049451265 100644 --- a/backend/config/native-agents/pod-welcomer.ts +++ b/backend/config/native-agents/pod-welcomer.ts @@ -56,7 +56,7 @@ export const podWelcomerApp = { // burning it for these heavy-traffic event handlers exhausts dev agents' // accounts. Same default community agents use; if quality drops, reach for // gemini-2.5-flash (paid but cheap) before paid Codex. - model: 'openrouter/nvidia/nemotron-3-super-120b-a12b:free', + model: 'deepseek-v4-flash', triggers: ['pod.join'], tools: ['commonly_read_context', 'commonly_post_message'], iconUrl: '', diff --git a/backend/config/native-agents/task-clerk.ts b/backend/config/native-agents/task-clerk.ts index 69782f1332..d8c916c3fe 100644 --- a/backend/config/native-agents/task-clerk.ts +++ b/backend/config/native-agents/task-clerk.ts @@ -56,7 +56,7 @@ export const taskClerkApp = { + '- Keep all replies under 2 lines. You are a clerk, not a conversationalist.', // See pod-welcomer.ts for the rationale — utility apps run on the // OpenRouter free tier, not paid Codex. - model: 'openrouter/nvidia/nemotron-3-super-120b-a12b:free', + model: 'deepseek-v4-flash', triggers: ['mention'], tools: [ 'commonly_read_context',