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.

follow-up fixes: bonfida bare import in agents/sns, solana-wallet double-auth, llm provider null guard

nirholasb6bfaca929fe
diff --git a/api/agents/sns.js b/api/agents/sns.js
index 24ca7b37f..85e255adc 100644
--- a/api/agents/sns.js
+++ b/api/agents/sns.js
@@ -70,7 +70,7 @@ async function fetchFavoriteDomain(address) {
}
async function getRegistryOwner(connection, domain) {
- const sns = await import('@bonfida/spl-name-service/dist/cjs/index.js');
+ const sns = await import('@bonfida/spl-name-service');
const { pubkey } = sns.getDomainKeySync(domain);
const { registry } = await sns.NameRegistryState.retrieve(connection, pubkey);
return registry.owner.toBase58();
@@ -79,7 +79,7 @@ async function getRegistryOwner(connection, domain) {
async function buildRegisterIxs({ connection, domain, buyer, space }) {
const { PublicKey } = await import('@solana/web3.js');
const { getAssociatedTokenAddressSync } = await import('@solana/spl-token');
- const sns = await import('@bonfida/spl-name-service/dist/cjs/index.js');
+ const sns = await import('@bonfida/spl-name-service');
const usdcMint = new PublicKey(USDC_MINT);
const buyerAta = getAssociatedTokenAddressSync(usdcMint, buyer, true);
return sns.registerDomainNameV2(connection, domain, space || 1000, buyer, buyerAta, usdcMint);
diff --git a/api/agents/solana-wallet.js b/api/agents/solana-wallet.js
index 2e6188f6b..77e6b9e6d 100644
--- a/api/agents/solana-wallet.js
+++ b/api/agents/solana-wallet.js
@@ -314,14 +314,12 @@ async function handleWallet(req, res, id) {
if (cors(req, res, { methods: 'GET,POST,DELETE,OPTIONS', credentials: true })) return;
if (!method(req, res, ['GET', 'POST', 'DELETE'])) return;
+ const auth = await resolveAuth(req);
+
// Unauthenticated GET: serve public wallet info without requiring sign-in.
- // Write operations still require owner auth below.
- if (req.method === 'GET') {
- const auth = await resolveAuth(req);
- if (!auth) return handlePublicWalletRead(req, res, id);
- }
+ // Write operations (POST, DELETE) still require owner auth below.
+ if (req.method === 'GET' && !auth) return handlePublicWalletRead(req, res, id);
- const auth = await resolveAuth(req);
if (!auth) return error(res, 401, 'unauthorized', 'sign in required');
const rl = req.method === 'GET'
diff --git a/api/llm/anthropic.js b/api/llm/anthropic.js
index d5cf3083a..908dcd94f 100644
--- a/api/llm/anthropic.js
+++ b/api/llm/anthropic.js
@@ -51,6 +51,7 @@ const MODELS = {
// OpenRouter free tier (no per-token cost; daily rate cap shared across host).
// All three are tool-call capable in OpenRouter's catalog.
'meta-llama/llama-3.3-70b-instruct:free': { kind: 'openai', provider: 'openrouter', envKey: 'OPENROUTER_API_KEY' },
+ 'meta-llama/llama-3.1-8b-instruct:free': { kind: 'openai', provider: 'openrouter', envKey: 'OPENROUTER_API_KEY' },
'openai/gpt-oss-120b:free': { kind: 'openai', provider: 'openrouter', envKey: 'OPENROUTER_API_KEY' },
'nousresearch/hermes-3-llama-3.1-405b:free': { kind: 'openai', provider: 'openrouter', envKey: 'OPENROUTER_API_KEY' },
@@ -354,6 +355,10 @@ export default wrap(async (req, res) => {
break;
}
+ if (!usedRoute || !upstream) {
+ return json(res, 503, { error: 'provider_unavailable', message: 'no configured fallback model is available' });
+ }
+
const route = usedRoute;
// ── Streaming path ────────────────────────────────────────────────────────