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
fix(mcp): price every model in three://models, free models at zero and mirrored keys at their routed model
three.ws operatora2ffbf72ce81
diff --git a/api/_mcp/resources.js b/api/_mcp/resources.jsindex 61ae17887..07ef881d9 100644--- a/api/_mcp/resources.js+++ b/api/_mcp/resources.js@@ -667,7 +667,7 @@ async function readModels() {import('../_lib/llm-pricing.js'),]);const agentModels = getAvailableProviders().map((p) => {- const price = modelPrice(p.key);+ const free = ANON_BRAIN_PROVIDERS.has(p.key);return {id: p.key,label: p.label,@@ -675,22 +675,27 @@ async function readModels() {tier: p.tier,max_output_tokens: p.maxOutput,available: p.available,- free: ANON_BRAIN_PROVIDERS.has(p.key),- price_usd_per_mtok: price,+ free,+ // A key like ibm-granite names no priced model itself; the model it+ // routes to does.+ price_usd_per_mtok: free ? [0, 0] : modelPrice(p.key) || modelPrice(p.openrouterModel),description: p.description || null,};});- const chatModels = Object.entries(MODEL_CATALOG).map(([id, m]) => ({- id,- provider: m.provider,- tools: Boolean(m.tools),- free: isFreeLane(m.provider, id),- price_usd_per_mtok: modelPrice(id),- }));+ const chatModels = Object.entries(MODEL_CATALOG).map(([id, m]) => {+ const free = isFreeLane(m.provider, id);+ return {+ id,+ provider: m.provider,+ tools: Boolean(m.tools),+ free,+ price_usd_per_mtok: free ? [0, 0] : modelPrice(id),+ };+ });return {agent_models: agentModels,chat_models: chatModels,- note: 'agent_models ids are what an agent brain accepts (create_agent model argument). Prices are USD per million tokens, [input, output].',+ note: 'agent_models ids are what an agent brain accepts (create_agent model argument). Prices are USD per million tokens, [input, output]; free models are [0, 0], and null means the model is not metered by list price.',};}diff --git a/api/brain/chat.js b/api/brain/chat.jsindex d5f3d99d3..42fe8a665 100644--- a/api/brain/chat.js+++ b/api/brain/chat.js@@ -877,6 +877,10 @@ export function getAvailableProviders() {context: spec.context || null,description: spec.description,roster: Boolean(spec.roster),+ // The model the key routes to when it has no native lane (or as its+ // mirror): what three://models prices against, since keys like+ // ibm-granite name no priced model themselves.+ openrouterModel: spec.openrouterModel || null,available,// `available` means the deployment holds a route for the model;// `requiresAuth` means the caller still needs a session to use itdiff --git a/data/changelog.json b/data/changelog.jsonindex f92ae9f98..134fa8c58 100644--- a/data/changelog.json+++ b/data/changelog.json@@ -1,6 +1,16 @@{"$comment": "Curated changelog entries for three.ws, the editorial layer of the public changelog. New PAGE launches are tracked automatically via the `added` field in data/pages.json; this file is for everything else holders care about: improvements, fixes, SDK releases, trading/payments capabilities, security work. scripts/build-page-index.mjs merges both sources into CHANGELOG.md, public/changelog.json, and public/changelog.xml. Newest first. Allowed tags: feature, improvement, fix, sdk, infra, docs, security, desktop (desktop entries become the desktop app's release notes). `link` is optional and must be a live three.ws path.","entries": [+ {+ "date": "2026-09-25",+ "title": "The model catalog AI clients read now shows the real price of every model",+ "summary": "The three://models resource that Claude and other MCP clients read listed free models with no price and left some paid models blank. Free models now read as costing nothing, and a model served through a partner route is priced at the model that actually answers, so an assistant comparing costs for you works from real numbers.",+ "tags": [+ "fix",+ "sdk"+ ],+ "link": "/docs/mcp"+ },{"date": "2026-09-22","title": "Claude and other AI clients can now read your three.ws account and follow guided flows",diff --git a/docs/mcp.md b/docs/mcp.mdindex 27194be81..c82c826a9 100644--- a/docs/mcp.md+++ b/docs/mcp.md@@ -928,7 +928,7 @@ Clients that show tools but not resources get the same data from the `read_resou| `three://wallets` | mcp, mcp-agent | Every agent wallet you own with SOL, USD value and freeze state, plus a total | `wallet:read` or `agents:read` || `three://launches` | mcp, mcp-agent | Every token your agents launched through three.ws | `agents:read` || `three://marketplace` | mcp, mcp-agent, mcp-bazaar | Paid agent skills with prices and free trials, agent services with track records, and your trials when signed in | public |-| `three://models` | mcp, mcp-3d | Every model an agent brain can run, with availability, free-tier status and USD per million tokens | public |+| `three://models` | mcp, mcp-3d | Every model an agent brain can run, with availability, free-tier status and USD per million tokens (`[0, 0]` for free models; a key that routes through a mirror is priced at the model it routes to) | public || `three://x402/services` | mcp, mcp-agent, mcp-bazaar | The live x402 service catalog: resource URL, price, networks, facilitator | public || `three://assets/{id}` | mcp-3d | A 3D asset's metadata, GLB URL and thumbnail; private assets only for their owner | public |diff --git a/tests/mcp-resources.test.js b/tests/mcp-resources.test.jsindex d92cf5896..59f71e3bb 100644--- a/tests/mcp-resources.test.js+++ b/tests/mcp-resources.test.js@@ -215,6 +215,18 @@ describe('resources/read access', () => {expect(md.contents[0].text).toContain('| mint | name | symbol |');});+ it('prices models through the model a key routes to, and free models at zero', async () => {+ const out = await resources.handleResourceMethod('mcp', 'resources/read', { uri: 'three://models' }, anon, req);+ const { agent_models, chat_models } = JSON.parse(out.contents[0].text);+ const byId = new Map(agent_models.map((m) => [m.id, m]));+ // ibm-granite names no priced model; its OpenRouter route does.+ expect(byId.get('ibm-granite').price_usd_per_mtok).toEqual([0.05, 0.1]);+ expect(byId.get('claude-opus-5').price_usd_per_mtok).toEqual([5, 25]);+ for (const m of [...agent_models, ...chat_models].filter((x) => x.free)) {+ expect(m.price_usd_per_mtok, m.id).toEqual([0, 0]);+ }+ });+it('hides internal errors behind a generic message with a reference', async () => {db.launches = null;const err = await resources