Skip to content

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.

fix(llm): retire the dead OpenRouter free routes across the platform

nirholase1948661b325
diff --git a/api/_lib/chat-models.js b/api/_lib/chat-models.js
index 76cdb013b..60de09eb7 100644
--- a/api/_lib/chat-models.js
+++ b/api/_lib/chat-models.js
@@ -58,21 +58,23 @@ export const MODEL_CATALOG = {
'llama-3.1-8b-instant': { provider: 'groq', tools: true },
// ── OpenRouter free tier — rate-limited per model; tool support varies ────
- 'meta-llama/llama-3.3-70b-instruct:free': { provider: 'openrouter', tools: true },
- 'nousresearch/hermes-3-llama-3.1-405b:free': { provider: 'openrouter', tools: true },
- // GPT-OSS 120B is the historical platform default, but its free OpenRouter
- // endpoint is intermittently moderation-gated (403 "requires moderation on
- // OpenInference"). Kept usable for explicit callers (e.g. the /chat app), but
- // never auto-selected for the primary path or auto-built fallback chains.
//
- // T4.2 (anon moderation pre-filter) evaluated re-promoting this route and
- // DECLINED: OpenRouter's "requires moderation" gate is an account-level
- // policy toggle on OpenRouter's side — it is NOT satisfied by us pre-moderating
- // upstream of the call (the gate fires before our verdict is ever relevant).
- // Our NemoGuard pre-filter therefore does not unlock this endpoint; it stays
- // demoted until the OpenRouter account's data/moderation setting is verified.
- // (tasks/nvidia-nim/probes/moderation.md)
- 'openai/gpt-oss-120b:free': { provider: 'openrouter', tools: true, moderationGated: true },
+ // OpenRouter retires `:free` endpoints with no notice, and a retired id is
+ // indistinguishable from a typo at call time ("This model is unavailable for
+ // free"). On 2026-07-27 every id this block previously listed was gone at
+ // once — meta-llama/llama-3.3-70b-instruct:free,
+ // nousresearch/hermes-3-llama-3.1-405b:free and openai/gpt-oss-120b:free —
+ // which silently took the whole OpenRouter free lane out of the ladder.
+ //
+ // The ids below were verified live, but treat them as perishable: the
+ // anonymous /chat lane no longer depends on any of them, because
+ // _lib/openrouter-free.js resolves models from OpenRouter's live list at
+ // request time. When one of these starts failing, check that module's live
+ // list first rather than assuming a provider outage.
+ 'openai/gpt-oss-20b:free': { provider: 'openrouter', tools: true },
+ 'nvidia/nemotron-3-super-120b-a12b:free': { provider: 'openrouter', tools: true },
+ 'google/gemma-4-31b-it:free': { provider: 'openrouter', tools: true },
+ 'inclusionai/ling-3.0-flash:free': { provider: 'openrouter', tools: true },
// ── OpenRouter paid (BYOK, ~$0.05/$0.10 per 1M tok) — IBM Granite lane ─────
// Cheap, tool-capable Granite 4.1 for the "embed a Granite agent" surface.
@@ -164,11 +166,14 @@ export function usableModels(models, { requireTools = false, allowGated = false
}
/**
- * Default OpenRouter free model: the reliable, tool-capable Llama 3.3 70B free
- * endpoint. (Was GPT-OSS 120B, demoted for the moderation gate above.) Used as
- * the platform default wherever a free OpenRouter model is requested.
+ * Default OpenRouter free model: tool-capable GPT-OSS 20B, the surviving member
+ * of the GPT-OSS family after the 120B free endpoint was retired. Used as the
+ * platform default wherever a free OpenRouter model is requested.
+ *
+ * (Previously Llama 3.3 70B, which OpenRouter retired along with every other id
+ * this file used to name — see the free-tier block above.)
*/
-export const DEFAULT_FREE_MODEL = 'meta-llama/llama-3.3-70b-instruct:free';
+export const DEFAULT_FREE_MODEL = 'openai/gpt-oss-20b:free';
/** Default per-provider model when the caller doesn't name one. */
export const PROVIDER_MODEL_DEFAULTS = {
@@ -210,7 +215,9 @@ export const DEFAULT_PROVIDER_ORDER = ['groq', 'openrouter', 'nvidia', 'anthropi
*/
export const OPENROUTER_SIBLINGS = [
DEFAULT_FREE_MODEL,
- 'nousresearch/hermes-3-llama-3.1-405b:free',
+ 'nvidia/nemotron-3-super-120b-a12b:free',
+ 'google/gemma-4-31b-it:free',
+ 'inclusionai/ling-3.0-flash:free',
];
/**
diff --git a/api/_lib/embed-policy.js b/api/_lib/embed-policy.js
index b5b176227..bd533b43f 100644
--- a/api/_lib/embed-policy.js
+++ b/api/_lib/embed-policy.js
@@ -54,7 +54,7 @@ export function defaultEmbedPolicy() {
proxy_url: null,
monthly_quota: 1000,
rate_limit_per_min: 10,
- model: 'meta-llama/llama-3.3-70b-instruct:free',
+ model: 'openai/gpt-oss-20b:free',
},
storage: { primary: 'r2', pinned_ipfs: false, onchain_attested: false },
};
diff --git a/api/_lib/llm.js b/api/_lib/llm.js
index d04010fbc..e0d685a11 100644
--- a/api/_lib/llm.js
+++ b/api/_lib/llm.js
@@ -44,6 +44,7 @@ import {
vertexRequestHeaders,
toVertexBody,
} from './vertex-claude.js';
+import { DEFAULT_FREE_MODEL } from './chat-models.js';
const GROQ_MODEL = 'llama-3.3-70b-versatile';
// Second Groq rung on a different model: Groq free-tier quotas are PER MODEL,
@@ -54,7 +55,12 @@ const GROQ_INSTANT_MODEL = 'llama-3.1-8b-instant';
// Same Llama 3.3 70B on Cerebras' free tier (cloud.cerebras.ai) — optional
// rung, active when CEREBRAS_API_KEY is configured.
const CEREBRAS_MODEL = 'llama-3.3-70b';
-const OPENROUTER_MODEL = 'meta-llama/llama-3.3-70b-instruct';
+// The FULL free model id, not a base id we append ':free' to. Appending assumes
+// every paid model has a free twin, and that assumption is what broke this lane:
+// meta-llama/llama-3.3-70b-instruct still exists, but its ':free' variant was
+// retired, so the composed id 404'd on every call while the base id looked fine.
+// Keep this in step with DEFAULT_FREE_MODEL in _lib/chat-models.js.
+const OPENROUTER_FREE_MODEL = DEFAULT_FREE_MODEL;
// Gemini Flash-Lite on the AI Studio FREE tier (GEMINI_API_KEY): an external
// free quota, so it stays on the cheapest model.
const GEMINI_MODEL = 'gemini-2.5-flash-lite';
@@ -363,7 +369,7 @@ export function providerChain({ anthropicKey, anthropicModel, grokKey = null, gr
name: i === 0 ? 'openrouter' : `openrouter#${i + 1}`,
key,
url: 'https://openrouter.ai/api/v1/chat/completions',
- model: `${OPENROUTER_MODEL}:free`,
+ model: OPENROUTER_FREE_MODEL,
extraHeaders: { 'HTTP-Referer': 'https://three.ws', 'X-Title': 'three.ws' },
}));
});
diff --git a/api/llm/anthropic.js b/api/llm/anthropic.js
index 17be02afa..411fb512c 100644
--- a/api/llm/anthropic.js
+++ b/api/llm/anthropic.js
@@ -61,17 +61,17 @@ const MODELS = {
// OpenRouter free tier (no per-token cost; daily rate cap shared across host).
// All are tool-call capable in OpenRouter's catalog.
- 'meta-llama/llama-3.3-70b-instruct:free': {
+ 'openai/gpt-oss-20b:free': {
kind: 'openai',
provider: 'openrouter',
envKey: 'OPENROUTER_API_KEY',
},
- 'openai/gpt-oss-120b:free': {
+ 'nvidia/nemotron-3-super-120b-a12b:free': {
kind: 'openai',
provider: 'openrouter',
envKey: 'OPENROUTER_API_KEY',
},
- 'nousresearch/hermes-3-llama-3.1-405b:free': {
+ 'google/gemma-4-31b-it:free': {
kind: 'openai',
provider: 'openrouter',
envKey: 'OPENROUTER_API_KEY',
@@ -404,7 +404,7 @@ export default wrap(async (req, res) => {
const rawBody = await readJson(req);
const body = parse(bodySchema, rawBody);
const requestedModel =
- body.model || policy.brain?.model || 'meta-llama/llama-3.3-70b-instruct:free';
+ body.model || policy.brain?.model || 'openai/gpt-oss-20b:free';
// Ordered fallback chain for 429 / 5xx from OpenRouter free tier:
// 1. Requested model (e.g. llama-3.3-70b:free)
diff --git a/api/marketplace/[action].js b/api/marketplace/[action].js
index 6773d7428..a3ceb6a38 100644
--- a/api/marketplace/[action].js
+++ b/api/marketplace/[action].js
@@ -880,7 +880,7 @@ const PREVIEW_PROVIDERS = {
openrouter: {
envKey: 'OPENROUTER_API_KEY',
url: 'https://openrouter.ai/api/v1/chat/completions',
- defaultModel: 'meta-llama/llama-3.3-70b-instruct:free',
+ defaultModel: 'openai/gpt-oss-20b:free',
style: 'openai',
extraHeaders: {
'HTTP-Referer': 'https://three.ws',
diff --git a/scripts/i18n-translate.mjs b/scripts/i18n-translate.mjs
index 7b5d83f44..b1c499641 100644
--- a/scripts/i18n-translate.mjs
+++ b/scripts/i18n-translate.mjs
@@ -134,7 +134,7 @@ const PROVIDER_DEFAULT_MODEL = {
gemini: 'gemini-2.5-flash',
vertex: 'google/gemini-2.5-flash',
groq: 'llama-3.3-70b-versatile',
- openrouter: 'meta-llama/llama-3.3-70b-instruct:free',
+ openrouter: 'openai/gpt-oss-20b:free',
nvidia: 'meta/llama-3.3-70b-instruct',
openai: 'gpt-4o-mini',
anthropic: 'claude-haiku-4-5-20251001',
diff --git a/src/assistant-widget-core.js b/src/assistant-widget-core.js
index 898cdcc7e..13dcd4613 100644
--- a/src/assistant-widget-core.js
+++ b/src/assistant-widget-core.js
@@ -159,7 +159,7 @@ export function estimateSpeechMs(text) {
/** Default chat models per BYOK provider (OpenAI-compatible endpoints). */
export const BYOK_DEFAULT_MODELS = {
groq: 'llama-3.3-70b-versatile',
- openrouter: 'meta-llama/llama-3.3-70b-instruct:free',
+ openrouter: 'openai/gpt-oss-20b:free',
};
/** OpenAI-compatible chat-completions endpoints for BYOK lanes. */
diff --git a/src/avatar-page.js b/src/avatar-page.js
index 0134eb772..4e8272eda 100644
--- a/src/avatar-page.js
+++ b/src/avatar-page.js
@@ -84,22 +84,22 @@ const MODEL_OPTIONS = [
{ id: 'auto', label: 'Auto (GPT-OSS 120B)', provider: null, model: null },
{
id: 'openrouter:gpt-oss',
- label: 'GPT-OSS 120B (free)',
+ label: 'Nemotron 3 Super 120B (free)',
provider: 'openrouter',
- model: 'openai/gpt-oss-120b:free',
+ model: 'nvidia/nemotron-3-super-120b-a12b:free',
},
{ id: 'anthropic:sonnet', label: 'Claude Sonnet 4.6', provider: 'anthropic', model: 'claude-sonnet-4-6' },
{
id: 'openrouter:llama-70b',
- label: 'Llama 3.3 70B (free)',
+ label: 'GPT-OSS 20B (free)',
provider: 'openrouter',
- model: 'meta-llama/llama-3.3-70b-instruct:free',
+ model: 'openai/gpt-oss-20b:free',
},
{
id: 'openrouter:hermes',
- label: 'Hermes 3 405B (free)',
+ label: 'Gemma 4 31B (free)',
provider: 'openrouter',
- model: 'nousresearch/hermes-3-llama-3.1-405b:free',
+ model: 'google/gemma-4-31b-it:free',
},
{ id: 'groq:llama-70b', label: 'Groq Llama 3.3 70B', provider: 'groq', model: 'llama-3.3-70b-versatile' },
{ id: 'openai:gpt-5.6-sol', label: 'GPT-5.6 Sol', provider: 'openai', model: 'gpt-5.6-sol' },
diff --git a/src/dashboard-next/pages/agents.js b/src/dashboard-next/pages/agents.js
index 7c5662671..1df7a4220 100644
--- a/src/dashboard-next/pages/agents.js
+++ b/src/dashboard-next/pages/agents.js
@@ -510,15 +510,15 @@ const BRAIN_LABELS = {
'claude-opus-4-7': 'Claude Opus 4.7',
'llama-3.3-70b-versatile': 'Llama 3.3 70B · Groq',
'llama-3.1-8b-instant': 'Llama 3.1 8B · Groq',
- 'meta-llama/llama-3.3-70b-instruct:free': 'Llama 3.3 70B · OpenRouter',
+ 'openai/gpt-oss-20b:free': 'GPT-OSS 20B · OpenRouter',
'meta-llama/llama-3.1-8b-instruct:free': 'Llama 3.1 8B · OpenRouter',
- 'openai/gpt-oss-120b:free': 'GPT-OSS 120B · OpenRouter',
- 'nousresearch/hermes-3-llama-3.1-405b:free': 'Hermes 3 405B · OpenRouter',
+ 'nvidia/nemotron-3-super-120b-a12b:free': 'Nemotron 3 Super 120B · OpenRouter',
+ 'google/gemma-4-31b-it:free': 'Gemma 4 31B · OpenRouter',
};
function brainLabel(agent) {
const model = agent.meta?.brain?.model;
- if (!model) return 'Llama 3.3 70B · OpenRouter'; // runtime default
+ if (!model) return 'GPT-OSS 20B · OpenRouter'; // runtime default
return BRAIN_LABELS[model] || model.split('/').pop() || model;
}
diff --git a/src/dashboard-next/pages/api.js b/src/dashboard-next/pages/api.js
index fb02cdb5f..dff4c449f 100644
--- a/src/dashboard-next/pages/api.js
+++ b/src/dashboard-next/pages/api.js
@@ -1298,7 +1298,7 @@ function defaultClientPolicy() {
proxy_url: null,
monthly_quota: 1000,
rate_limit_per_min: 10,
- model: 'meta-llama/llama-3.3-70b-instruct:free',
+ model: 'openai/gpt-oss-20b:free',
},
storage: { primary: 'r2', pinned_ipfs: false, onchain_attested: false },
};
diff --git a/src/dashboard-next/pages/library/brain.js b/src/dashboard-next/pages/library/brain.js
index 8fe868838..f6c8d622e 100644
--- a/src/dashboard-next/pages/library/brain.js
+++ b/src/dashboard-next/pages/library/brain.js
@@ -38,7 +38,7 @@ const MODELS = [
brain_key: 'groq-llama',
},
{
- model: 'meta-llama/llama-3.3-70b-instruct:free',
+ model: 'openai/gpt-oss-20b:free',
label: 'Llama 3.3 70B',
network: 'OpenRouter',
tier: 'Free · open-source',
@@ -47,7 +47,7 @@ const MODELS = [
brain_key: 'groq-llama',
},
{
- model: 'openai/gpt-oss-120b:free',
+ model: 'nvidia/nemotron-3-super-120b-a12b:free',
label: 'GPT-OSS 120B',
network: 'OpenRouter',
tier: 'Free · OpenAI open-source',
@@ -56,7 +56,7 @@ const MODELS = [
brain_key: 'openai',
},
{
- model: 'nousresearch/hermes-3-llama-3.1-405b:free',
+ model: 'google/gemma-4-31b-it:free',
label: 'Hermes 3 405B',
network: 'OpenRouter',
tier: 'Free · large open-source',
@@ -65,7 +65,7 @@ const MODELS = [
brain_key: 'groq-llama',
},
];
-const MODEL_DEFAULT = 'meta-llama/llama-3.3-70b-instruct:free';
+const MODEL_DEFAULT = 'openai/gpt-oss-20b:free';
const MMAP = new Map(MODELS.map((m) => [m.model, m]));
function friendly(err) {
diff --git a/src/editor/manifest-builder.js b/src/editor/manifest-builder.js
index a89725f27..eeb7128b9 100644
--- a/src/editor/manifest-builder.js
+++ b/src/editor/manifest-builder.js
@@ -12,9 +12,9 @@ import { PersonaInterview } from './persona-interview.js';
// first so they're the default. The proxy translates request/response
// shapes server-side, so the browser provider stays Anthropic-shape.
const FREE_MODELS = [
- { id: 'meta-llama/llama-3.3-70b-instruct:free', label: 'Llama 3.3 70B (OpenRouter · free)' },
- { id: 'openai/gpt-oss-120b:free', label: 'GPT-OSS 120B (OpenRouter · free)' },
- { id: 'nousresearch/hermes-3-llama-3.1-405b:free', label: 'Hermes 3 405B (OpenRouter · free)' },
+ { id: 'openai/gpt-oss-20b:free', label: 'GPT-OSS 20B (OpenRouter · free)' },
+ { id: 'nvidia/nemotron-3-super-120b-a12b:free', label: 'Nemotron 3 Super 120B (OpenRouter · free)' },
+ { id: 'google/gemma-4-31b-it:free', label: 'Gemma 4 31B (OpenRouter · free)' },
{ id: 'llama-3.3-70b-versatile', label: 'Llama 3.3 70B (Groq · free, sub-second)' },
{ id: 'llama-3.1-8b-instant', label: 'Llama 3.1 8B (Groq · free, fastest)' },
];
@@ -133,7 +133,7 @@ function defaultState() {
rig: 'mixamo',
boundingBoxHeight: 1.78,
brainProvider: 'anthropic',
- brainModel: 'meta-llama/llama-3.3-70b-instruct:free',
+ brainModel: 'openai/gpt-oss-20b:free',
temperature: 0.7,
maxTokens: 4096,
thinking: 'auto',
diff --git a/src/element.js b/src/element.js
index cdddea441..c472b409e 100644
--- a/src/element.js
+++ b/src/element.js
@@ -32,7 +32,7 @@ const MODES = ['inline', 'floating', 'section', 'fullscreen'];
// (src/runtime/providers.js), which resolves this id to OpenRouter's free tier.
// `brain="free"` gets any ad-hoc embed talking with no API key, no backend code,
// and no per-token cost to the embedder.
-const FREE_BRAIN_MODEL = 'meta-llama/llama-3.3-70b-instruct:free';
+const FREE_BRAIN_MODEL = 'openai/gpt-oss-20b:free';
// ── WebGL context budget ────────────────────────────────────────────────
// Browsers cap the number of simultaneous WebGL contexts (~16 in Chrome).
diff --git a/src/nich-agent.js b/src/nich-agent.js
index 14ed5a942..d68679533 100644
--- a/src/nich-agent.js
+++ b/src/nich-agent.js
@@ -1004,22 +1004,22 @@ const MODEL_OPTIONS = [
{ id: 'auto', label: 'Auto (GPT-OSS 120B)', provider: null, model: null },
{
id: 'openrouter:gpt-oss',
- label: 'GPT-OSS 120B (free)',
+ label: 'Nemotron 3 Super 120B (free)',
provider: 'openrouter',
- model: 'openai/gpt-oss-120b:free',
+ model: 'nvidia/nemotron-3-super-120b-a12b:free',
},
{ id: 'anthropic:sonnet', label: 'Claude Sonnet 4.6', provider: 'anthropic', model: 'claude-sonnet-4-6' },
{
id: 'openrouter:llama-70b',
- label: 'Llama 3.3 70B (free)',
+ label: 'GPT-OSS 20B (free)',
provider: 'openrouter',
- model: 'meta-llama/llama-3.3-70b-instruct:free',
+ model: 'openai/gpt-oss-20b:free',
},
{
id: 'openrouter:hermes',
- label: 'Hermes 3 405B (free)',
+ label: 'Gemma 4 31B (free)',
provider: 'openrouter',
- model: 'nousresearch/hermes-3-llama-3.1-405b:free',
+ model: 'google/gemma-4-31b-it:free',
},
{
id: 'groq:llama-70b',
diff --git a/src/runtime/providers.js b/src/runtime/providers.js
index 6162ec9ae..ead8f4372 100644
--- a/src/runtime/providers.js
+++ b/src/runtime/providers.js
@@ -9,7 +9,7 @@ export class AnthropicProvider {
constructor({
// Free OpenRouter Llama 3.3 70B — no per-token cost to the host.
// Owners can override with a paid Claude model via embed-policy.
- model = 'meta-llama/llama-3.3-70b-instruct:free',
+ model = 'openai/gpt-oss-20b:free',
proxyURL,
apiKey,
agentId,
diff --git a/tests/api/llm-anthropic.test.js b/tests/api/llm-anthropic.test.js
index c32efce00..a46131635 100644
--- a/tests/api/llm-anthropic.test.js
+++ b/tests/api/llm-anthropic.test.js
@@ -204,7 +204,7 @@ const DEFAULT_POLICY = {
proxy_url: null,
monthly_quota: 1000,
rate_limit_per_min: 10,
- model: 'meta-llama/llama-3.3-70b-instruct:free',
+ model: 'openai/gpt-oss-20b:free',
},
storage: { primary: 'r2', pinned_ipfs: false, onchain_attested: false },
};
@@ -506,12 +506,12 @@ describe('/api/llm/anthropic — free-provider routing', () => {
});
});
- it('routes meta-llama/*:free models to OpenRouter with bearer auth', async () => {
+ it('routes free OpenRouter models to OpenRouter with bearer auth', async () => {
await invoke({
body: {
...VALID_BODY,
system: SYSTEM,
- model: 'meta-llama/llama-3.3-70b-instruct:free',
+ model: 'openai/gpt-oss-20b:free',
},
});
const call = fetchState.calls[0];
@@ -534,7 +534,7 @@ describe('/api/llm/anthropic — free-provider routing', () => {
// it walks the chain and serves from the next configured lane.
delete process.env.OPENROUTER_API_KEY;
const { status } = await invoke({
- body: { ...VALID_BODY, model: 'meta-llama/llama-3.3-70b-instruct:free' },
+ body: { ...VALID_BODY, model: 'openai/gpt-oss-20b:free' },
});
expect(status).toBe(200);
// Every attempted call skipped the unkeyed OpenRouter lane.
@@ -559,7 +559,7 @@ describe('/api/llm/anthropic — free-provider routing', () => {
});
};
const { status } = await invoke({
- body: { ...VALID_BODY, model: 'meta-llama/llama-3.3-70b-instruct:free' },
+ body: { ...VALID_BODY, model: 'openai/gpt-oss-20b:free' },
});
expect(status).toBe(200);
expect(fetchState.calls.length).toBeGreaterThan(1);
@@ -573,7 +573,7 @@ describe('/api/llm/anthropic — free-provider routing', () => {
delete process.env.ANTHROPIC_API_KEY;
try {
const { status, body } = await invoke({
- body: { ...VALID_BODY, model: 'meta-llama/llama-3.3-70b-instruct:free' },
+ body: { ...VALID_BODY, model: 'openai/gpt-oss-20b:free' },
});
expect(status).toBe(503);
expect(body.error).toBe('provider_unavailable');
@@ -594,7 +594,7 @@ describe('/api/llm/anthropic — free-provider routing', () => {
process.env.GOOGLE_CLOUD_PROJECT = 'test-project';
try {
const { status, body } = await invoke({
- body: { ...VALID_BODY, model: 'meta-llama/llama-3.3-70b-instruct:free' },
+ body: { ...VALID_BODY, model: 'openai/gpt-oss-20b:free' },
});
expect(status).toBe(200);
const call = fetchState.calls[0];
@@ -615,7 +615,7 @@ describe('/api/llm/anthropic — free-provider routing', () => {
await invoke({
body: {
system: SYSTEM,
- model: 'meta-llama/llama-3.3-70b-instruct:free',
+ model: 'openai/gpt-oss-20b:free',
max_tokens: 256,
temperature: 0.4,
messages: [
@@ -653,7 +653,7 @@ describe('/api/llm/anthropic — free-provider routing', () => {
},
});
const sent = JSON.parse(fetchState.calls[0].init.body);
- expect(sent.model).toBe('meta-llama/llama-3.3-70b-instruct:free');
+ expect(sent.model).toBe('openai/gpt-oss-20b:free');
expect(sent.max_tokens).toBe(256);
expect(sent.temperature).toBe(0.4);
// System collapses into the first message.
@@ -731,7 +731,7 @@ describe('/api/llm/anthropic — free-provider routing', () => {
usage: { prompt_tokens: 4, completion_tokens: 5 },
});
const { body } = await invoke({
- body: { ...VALID_BODY, model: 'meta-llama/llama-3.3-70b-instruct:free' },
+ body: { ...VALID_BODY, model: 'openai/gpt-oss-20b:free' },
});
expect(body.content).toEqual([
{ type: 'tool_use', id: 'call_1', name: 'getTime', input: { tz: 'UTC' } },
@@ -741,7 +741,7 @@ describe('/api/llm/anthropic — free-provider routing', () => {
it('debits OpenAI-shape token usage (prompt + completion) onto the agent', async () => {
await invoke({
- body: { ...VALID_BODY, model: 'meta-llama/llama-3.3-70b-instruct:free' },
+ body: { ...VALID_BODY, model: 'openai/gpt-oss-20b:free' },
});
const monthKey = new Date().toISOString().slice(0, 7);
expect(redisStore.get(`llm:tokens:agent-1:${monthKey}`)).toBe(16);
@@ -749,7 +749,7 @@ describe('/api/llm/anthropic — free-provider routing', () => {
it('records usage with the upstream provider tag', async () => {
await invoke({
- body: { ...VALID_BODY, model: 'meta-llama/llama-3.3-70b-instruct:free' },
+ body: { ...VALID_BODY, model: 'openai/gpt-oss-20b:free' },
});
expect(usageEvents[0]).toMatchObject({
kind: 'llm',
diff --git a/tests/api/llm-vertex-anchor-surfaces.test.js b/tests/api/llm-vertex-anchor-surfaces.test.js
index cf13e77b8..cc8620ae4 100644
--- a/tests/api/llm-vertex-anchor-surfaces.test.js
+++ b/tests/api/llm-vertex-anchor-surfaces.test.js
@@ -100,7 +100,7 @@ describe('shared vertex-gemini helper (api/_lib/vertex-gemini.js)', () => {
});
describe('brain (api/brain/chat.js): freeFallbackChain anchor', () => {
- const spec = { openrouterModel: 'openai/gpt-oss-120b:free' };
+ const spec = { openrouterModel: 'nvidia/nemotron-3-super-120b-a12b:free' };
it('appends the anchor at the tail when a GCP project is set', () => {
process.env.GOOGLE_CLOUD_PROJECT = 'test-project';
@@ -246,7 +246,7 @@ describe('anthropic-proxy (api/llm/anthropic.js): model fallback anchor', () =>
it('appends the anchor model as the final fallback when a GCP project is set', () => {
process.env.GOOGLE_CLOUD_PROJECT = 'test-project';
setAllProviderKeys();
- const chain = modelFallbackChain('meta-llama/llama-3.3-70b-instruct:free');
+ const chain = modelFallbackChain('openai/gpt-oss-20b:free');
expect(chain[chain.length - 1]).toBe('google/gemini-2.5-flash');
// Paid Anthropic stays ahead of it; the anchor is strictly last resort.
expect(chain.indexOf('claude-haiku-4-5-20251001')).toBeLessThan(
@@ -268,7 +268,7 @@ describe('anthropic-proxy (api/llm/anthropic.js): model fallback anchor', () =>
});
it('without a GCP project the anchor neither resolves nor joins the chain', () => {
- const chain = modelFallbackChain('meta-llama/llama-3.3-70b-instruct:free');
+ const chain = modelFallbackChain('openai/gpt-oss-20b:free');
expect(chain).not.toContain('google/gemini-2.5-flash');
expect(resolveModelRoute('google/gemini-2.5-flash')).toBeNull();
});
diff --git a/tests/api/llm.test.js b/tests/api/llm.test.js
index b590b9c6f..fd508bf2d 100644
--- a/tests/api/llm.test.js
+++ b/tests/api/llm.test.js
@@ -196,8 +196,8 @@ describe('llmComplete — multiple OpenRouter keys', () => {
// model). The primary key's :free rung 402s here, so the chain rotates to the
// fallback key's :free model.
expect(calls).toEqual([
- { auth: 'Bearer or-primary', model: 'meta-llama/llama-3.3-70b-instruct:free' },
- { auth: 'Bearer or-fallback', model: 'meta-llama/llama-3.3-70b-instruct:free' },
+ { auth: 'Bearer or-primary', model: 'openai/gpt-oss-20b:free' },
+ { auth: 'Bearer or-fallback', model: 'openai/gpt-oss-20b:free' },
]);
});
diff --git a/tests/chat-models.test.js b/tests/chat-models.test.js
index 9af3bceac..b573a1d9a 100644
--- a/tests/chat-models.test.js
+++ b/tests/chat-models.test.js
@@ -15,6 +15,8 @@ import {
} from '../api/_lib/chat-models.js';
const GRANITE = 'ibm-granite/granite-4.1-8b';
+// A catalogued model that is deliberately never auto-selected.
+const GATED = 'claude-mythos-5';
// Models removed from the catalog because they will never succeed: OpenRouter
// 404 "No endpoints found" / no tool-capable endpoint. They must never appear
@@ -23,6 +25,14 @@ const DEAD_ROUTES = [
'mistralai/mistral-7b-instruct:free',
'meta-llama/llama-3.2-3b-instruct:free',
'openai/gpt-oss-120b', // non-free variant, never catalogued
+ // Retired by OpenRouter in July 2026. Every one of these was live in the
+ // catalog when its endpoint disappeared, which silently killed the whole
+ // OpenRouter free lane and took the /chat app down with it.
+ 'openai/gpt-oss-120b:free',
+ 'meta-llama/llama-3.3-70b-instruct:free',
+ 'nousresearch/hermes-3-llama-3.1-405b:free',
+ 'google/gemma-3-27b-it:free',
+ 'qwen/qwen3-coder:free',
];
describe('chat-models catalog', () => {
@@ -39,9 +49,9 @@ describe('chat-models catalog', () => {
}
});
- it('marks gpt-oss-120b:free moderation-gated and tool-capable', () => {
- expect(isModelModerationGated('openai/gpt-oss-120b:free')).toBe(true);
- expect(modelSupportsTools('openai/gpt-oss-120b:free')).toBe(true);
+ it('marks a restricted-access model moderation-gated and tool-capable', () => {
+ expect(isModelModerationGated(GATED)).toBe(true);
+ expect(modelSupportsTools(GATED)).toBe(true);
});
});
@@ -61,12 +71,12 @@ describe('usableModels (route selector)', () => {
it('excludes moderation-gated models from auto selection by default', () => {
const picked = usableModels(ALL, { requireTools: true });
- expect(picked).not.toContain('openai/gpt-oss-120b:free');
+ expect(picked).not.toContain(GATED);
});
it('includes gated models only when explicitly allowed', () => {
- const picked = usableModels(['openai/gpt-oss-120b:free'], { allowGated: true });
- expect(picked).toContain('openai/gpt-oss-120b:free');
+ const picked = usableModels([GATED], { allowGated: true });
+ expect(picked).toContain(GATED);
});
it('drops unknown models entirely', () => {
@@ -90,7 +100,7 @@ describe('free-first ordering', () => {
});
it('does not lead the free tier with the moderation-gated model', () => {
- expect(DEFAULT_FREE_MODEL).not.toBe('openai/gpt-oss-120b:free');
+ expect(DEFAULT_FREE_MODEL).not.toBe(GATED);
expect(isModelModerationGated(DEFAULT_FREE_MODEL)).toBe(false);
expect(modelSupportsTools(DEFAULT_FREE_MODEL)).toBe(true);
});
diff --git a/tests/llm-pricing-granite.test.js b/tests/llm-pricing-granite.test.js
index 93a40cfb6..03de438a0 100644
--- a/tests/llm-pricing-granite.test.js
+++ b/tests/llm-pricing-granite.test.js
@@ -27,7 +27,7 @@ describe('llm-pricing — paid Granite lane', () => {
describe('llm-pricing — free lanes stay zero', () => {
it('free OpenRouter models are still $0', () => {
- expect(costMicroUsd({ provider: 'openrouter', model: 'meta-llama/llama-3.3-70b-instruct:free', input: M, output: M })).toBe(0);
+ expect(costMicroUsd({ provider: 'openrouter', model: 'openai/gpt-oss-20b:free', input: M, output: M })).toBe(0);
});
it('the free Gemini tier is still $0 (invariant not broken by the paid override)', () => {
diff --git a/tests/src/element-brain-config.test.js b/tests/src/element-brain-config.test.js
index 08362d4ed..8d8f6d18e 100644
--- a/tests/src/element-brain-config.test.js
+++ b/tests/src/element-brain-config.test.js
@@ -66,7 +66,7 @@ globalThis.fetch = vi.fn(async () => ({
json: async () => ({}),
}));
-const FREE_MODEL = 'meta-llama/llama-3.3-70b-instruct:free';
+const FREE_MODEL = 'openai/gpt-oss-20b:free';
beforeEach(async () => {
if (!customElements.get('agent-3d')) {
diff --git a/tests/vertex-claude.test.js b/tests/vertex-claude.test.js
index cbcfedf06..d8a3e232e 100644
--- a/tests/vertex-claude.test.js
+++ b/tests/vertex-claude.test.js
@@ -213,7 +213,7 @@ describe('providerChain free-tier resilience rungs', () => {
it('the OpenRouter host-key rung uses the :free model — never the paid tier', () => {
const chain = providerChain();
const or = chain.find((p) => p.name === 'openrouter');
- expect(or.model).toBe('meta-llama/llama-3.3-70b-instruct:free');
+ expect(or.model).toBe('openai/gpt-oss-20b:free');
// The host key must never bill a paid OpenRouter model: no paid rung, and no
// separate openrouter:free rung (the single rung is already :free).
expect(chain.some((p) => p.model === 'meta-llama/llama-3.3-70b-instruct')).toBe(false);