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.

fix(cron): teach isRangeRejection Base's "exceeds max results / retry with the range" wording

nirholas694e648ab932
diff --git a/api/cron/[name].js b/api/cron/[name].js
index 36b4c28b1..6c52e6486 100644
--- a/api/cron/[name].js
+++ b/api/cron/[name].js
@@ -476,7 +476,7 @@ const ERC8004_MIN_BLOCK_CHUNK = 100;
// 2026-10-08 a testnet's dRPC lane answered "ranges over 10000 blocks are not
// supported on free plan" to every window from 8,000 down to 200 and served 101.
// It is still a range ceiling that shrinking reaches, which is all this asks.
-const RANGE_REJECTED = /block range|range is too large|too wide|too many blocks|ranges? over \d+ blocks|query returned more than|exceed maximum block range|limited to|response size|logs matched/i;
+const RANGE_REJECTED = /block range|range is too large|too wide|too many blocks|ranges? over \d+ blocks|query returned more than|exceed maximum block range|limited to|response size|logs matched|exceeds? max(?:imum)? results|retry with the range/i;
/**
* Is this RPC failure the provider refusing the width of the requested range?
diff --git a/tests/agent-index.test.js b/tests/agent-index.test.js
index 75e063f6c..43f95b8aa 100644
--- a/tests/agent-index.test.js
+++ b/tests/agent-index.test.js
@@ -506,6 +506,13 @@ describe('isRangeRejection', () => {
expect(isRangeRejection(null)).toBe(false);
expect(isRangeRejection('')).toBe(false);
});
+
+ it('reads Coinbase/Base RPC wording ("exceeds max results ... retry with the range") as a range ceiling', () => {
+ // Verbatim from erc8004_crawl_cursor.last_error on chain 8453 (Base), frozen since 2026-10-22.
+ expect(
+ isRangeRejection('RPC -32602: query exceeds max results 20000, retry with the range 52932450-52933133'),
+ ).toBe(true);
+ });
});
// ─── Sweep capacity ──────────────────────────────────────────────────────────