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.

test(agent-api): teach the id-validation suite the authed-read rate bucket

nirholas9c2d485e0385
diff --git a/tests/agent-capability-config-ids.test.js b/tests/agent-capability-config-ids.test.js
index ecffdcce6..1339d83f1 100644
--- a/tests/agent-capability-config-ids.test.js
+++ b/tests/agent-capability-config-ids.test.js
@@ -20,8 +20,15 @@ vi.mock('../api/_lib/auth.js', () => ({
extractBearer: vi.fn(() => null),
}));
+// Mirror the real `limits` surface these handlers touch: GETs use the generous
+// authed-read bucket and writes the strict credential bucket (376929cb1). A
+// mock that only knows authIp makes every GET throw on `undefined()` inside
+// wrap(), which reports as a 500 and hides the 400/200 this file exists to pin.
vi.mock('../api/_lib/rate-limit.js', () => ({
- limits: { authIp: vi.fn(async () => ({ success: true, reset: 1_000 })) },
+ limits: {
+ authIp: vi.fn(async () => ({ success: true, reset: 1_000 })),
+ authedReadIp: vi.fn(async () => ({ success: true, reset: 1_000 })),
+ },
clientIp: () => '203.0.113.8',
}));