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
feat(x-content): let the editor model take a per-call token budget and test the escaped step log in partner articles
nirholas020d2ce07f8d
diff --git a/api/_lib/x-content/llm.js b/api/_lib/x-content/llm.jsindex e08435b72..5b722c2d2 100644--- a/api/_lib/x-content/llm.js+++ b/api/_lib/x-content/llm.js@@ -19,11 +19,11 @@export const EDITOR_MODEL = 'claude-opus-5';-async function viaVertex({ system, parts }) {+async function viaVertex({ system, parts, maxTokens = 6000 }) {const { vertexClaudeConfigured, vertexAnthropicMessages } = await import('../vertex-claude.js');if (!vertexClaudeConfigured()) return null;const content = parts.map((part) => (part.type === 'image' ? { type: 'image', source: { type: 'base64', media_type: part.mime, data: part.data } } : { type: 'text', text: part.text }));- const response = await vertexAnthropicMessages({ model: EDITOR_MODEL, max_tokens: 6000, system, messages: [{ role: 'user', content }] });+ const response = await vertexAnthropicMessages({ model: EDITOR_MODEL, max_tokens: maxTokens, system, messages: [{ role: 'user', content }] });if (!response.ok) throw new Error(`Vertex ${response.status}: ${(await response.text()).slice(0, 200)}`);const body = await response.json();return { model: `vertex:${EDITOR_MODEL}`, text: body.content.filter((block) => block.type === 'text').map((block) => block.text).join('') };diff --git a/tests/x-content-partners.test.js b/tests/x-content-partners.test.jsindex 31148a199..35d1ba670 100644--- a/tests/x-content-partners.test.js+++ b/tests/x-content-partners.test.js@@ -203,6 +203,8 @@ describe('the weekly Article', () => {expect(blocks['facts-studio']).toMatch(/the run read tools = 15/);expect(blocks['facts-ar']).not.toMatch(/the run counted/);expect(blocks['request-studio']).toContain("curl -s 'https://three.ws/api/tools'");+ const logged = articleBlocks(openai, [{ ...runs[0], proof: { ...runs[0].proof, steps: [{ index: 1, kind: 'goto', target: 'https://three.ws/openai', detail: 'loaded | ok', ok: true, ms: 812 }, { index: 2, kind: 'hold', target: '2500', ok: true, ms: 2500 }] } }]);+ expect(logged['log-studio']).toBe('| Step | Did | On | Result | ms |\n|---|---|---|---|---|\n| 1 | goto | three.ws/openai | passed: loaded \\| ok | 812 |');const brief = buildArticleBrief({ partner: openai, runs, figures, blocks, partnersSection: ['OpenAI: Select'], tryIt: [openai.page] });expect(brief.features[1].measured).toEqual({});expect(brief.blocks.runs).toMatch(/^table:/);