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
llm(free-lane): move the free brain model to gemma-4-31b-it across every caller
nirholas748f97e50b2a
diff --git a/api/_lib/embed-policy.js b/api/_lib/embed-policy.jsindex bd533b43f..80499d571 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: 'openai/gpt-oss-20b:free',+ model: 'google/gemma-4-31b-it:free',},storage: { primary: 'r2', pinned_ipfs: false, onchain_attested: false },};diff --git a/api/brain/chat.js b/api/brain/chat.jsindex 304387aea..5e5cfd132 100644--- a/api/brain/chat.js+++ b/api/brain/chat.js@@ -71,7 +71,7 @@ const PROVIDERS = {description: 'Open-weight 120B from OpenAI. Fast, capable, free tier. Platform default.',// OpenRouter-only — no first-party key for the free tier. The 120B free// endpoint was retired upstream; 20B is the surviving GPT-OSS free route.- openrouterModel: 'openai/gpt-oss-20b:free',+ openrouterModel: 'google/gemma-4-31b-it:free',},'claude-fable-5': {label: 'Claude Fable 5',diff --git a/api/llm/anthropic.js b/api/llm/anthropic.jsindex d7cee89f9..857785089 100644--- a/api/llm/anthropic.js+++ b/api/llm/anthropic.js@@ -66,7 +66,7 @@ const MODELS = {// OpenRouter free tier (no per-token cost; daily rate cap shared across host).// All are tool-call capable in OpenRouter's catalog.- 'openai/gpt-oss-20b:free': {+ 'google/gemma-4-31b-it:free': {kind: 'openai',provider: 'openrouter',envKey: 'OPENROUTER_API_KEY',@@ -76,11 +76,6 @@ const MODELS = {provider: 'openrouter',envKey: 'OPENROUTER_API_KEY',},- 'google/gemma-4-31b-it:free': {- kind: 'openai',- provider: 'openrouter',- envKey: 'OPENROUTER_API_KEY',- },// Groq free tier (sub-second latency; per-IP+per-key minute caps).'llama-3.3-70b-versatile': { kind: 'openai', provider: 'groq', envKey: 'GROQ_API_KEY' },@@ -289,7 +284,7 @@ const PAID_HOST_KEY_MODELS = new Set(.map(([id]) => id),);-const FREE_DEFAULT_MODEL = 'openai/gpt-oss-20b:free';+const FREE_DEFAULT_MODEL = 'google/gemma-4-31b-it:free';// Resolve the model to run: the caller's choice when it costs the host nothing// or matches what the owner configured, otherwise the policy's own model. Thediff --git a/api/marketplace/[action].js b/api/marketplace/[action].jsindex 800a87f64..9b41f1214 100644--- a/api/marketplace/[action].js+++ b/api/marketplace/[action].js@@ -886,7 +886,7 @@ const PREVIEW_PROVIDERS = {openrouter: {envKey: 'OPENROUTER_API_KEY',url: 'https://openrouter.ai/api/v1/chat/completions',- defaultModel: 'openai/gpt-oss-20b:free',+ defaultModel: 'google/gemma-4-31b-it:free',style: 'openai',extraHeaders: {'HTTP-Referer': 'https://three.ws',diff --git a/src/assistant-widget-core.js b/src/assistant-widget-core.jsindex 13dcd4613..0546971b1 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: 'openai/gpt-oss-20b:free',+ openrouter: 'google/gemma-4-31b-it:free',};/** OpenAI-compatible chat-completions endpoints for BYOK lanes. */diff --git a/src/avatar-page.js b/src/avatar-page.jsindex e8e2d8685..c3af2571d 100644--- a/src/avatar-page.js+++ b/src/avatar-page.js@@ -121,9 +121,9 @@ const MODEL_OPTIONS = [{ id: 'anthropic:sonnet', label: 'Claude Sonnet 4.6', provider: 'anthropic', model: 'claude-sonnet-4-6' },{id: 'openrouter:llama-70b',- label: 'GPT-OSS 20B (free)',+ label: 'Gemma 4 31B (free)',provider: 'openrouter',- model: 'openai/gpt-oss-20b:free',+ model: 'google/gemma-4-31b-it:free',},{id: 'openrouter:hermes',diff --git a/src/editor/manifest-builder.js b/src/editor/manifest-builder.jsindex 1609b27bc..0297517c6 100644--- a/src/editor/manifest-builder.js+++ b/src/editor/manifest-builder.js@@ -13,9 +13,8 @@ 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: '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: 'nvidia/nemotron-3-super-120b-a12b:free', label: 'Nemotron 3 Super 120B (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)' },];@@ -134,7 +133,7 @@ function defaultState() {rig: 'mixamo',boundingBoxHeight: 1.78,brainProvider: 'anthropic',- brainModel: 'openai/gpt-oss-20b:free',+ brainModel: 'google/gemma-4-31b-it:free',temperature: 0.7,maxTokens: 4096,thinking: 'auto',diff --git a/src/element.js b/src/element.jsindex 2f8f9c5a6..7d89c549e 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 = 'openai/gpt-oss-20b:free';+const FREE_BRAIN_MODEL = 'google/gemma-4-31b-it: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.jsindex c0d6ed27d..3b202ef79 100644--- a/src/nich-agent.js+++ b/src/nich-agent.js@@ -1011,9 +1011,9 @@ const MODEL_OPTIONS = [{ id: 'anthropic:sonnet', label: 'Claude Sonnet 4.6', provider: 'anthropic', model: 'claude-sonnet-4-6' },{id: 'openrouter:llama-70b',- label: 'GPT-OSS 20B (free)',+ label: 'Gemma 4 31B (free)',provider: 'openrouter',- model: 'openai/gpt-oss-20b:free',+ model: 'google/gemma-4-31b-it:free',},{id: 'openrouter:hermes',diff --git a/src/runtime/providers.js b/src/runtime/providers.jsindex ead8f4372..5b7960716 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 = 'openai/gpt-oss-20b:free',+ model = 'google/gemma-4-31b-it:free',proxyURL,apiKey,agentId,diff --git a/src/start.js b/src/start.jsindex 90f525516..d62797144 100644--- a/src/start.js+++ b/src/start.js@@ -53,7 +53,7 @@ const PRESETS = {const MODELS = {'claude-sonnet-4-6': { label: 'Claude Sonnet 4.6' },- 'openai/gpt-oss-20b:free': { label: 'GPT-OSS 20B' },+ 'google/gemma-4-31b-it:free': { label: 'Gemma 4 31B' },'llama-3.3-70b-versatile': { label: 'Llama 3.3 70B' },};const DEFAULT_MODEL = 'claude-sonnet-4-6';