Skip to content

Supercharge your AI agents with data from the web and beyond. Building the library for superintelligence. 🔥

Update rate-limiter.ts

Nicolas3cd1c4260df4
diff --git a/apps/api/src/services/rate-limiter.ts b/apps/api/src/services/rate-limiter.ts
index 85c4f747e..83729229a 100644
--- a/apps/api/src/services/rate-limiter.ts
+++ b/apps/api/src/services/rate-limiter.ts
@@ -17,6 +17,7 @@ const RATE_LIMITS = {
growthdouble: 50,
etier2c: 300,
etier1a: 1000,
+ etier2a: 300,
},
scrape: {
default: 20,
@@ -32,6 +33,7 @@ const RATE_LIMITS = {
growthdouble: 1000,
etier2c: 2500,
etier1a: 1000,
+ etier2a: 2500,
},
search: {
default: 20,
@@ -47,6 +49,7 @@ const RATE_LIMITS = {
growthdouble: 500,
etier2c: 2500,
etier1a: 1000,
+ etier2a: 2500,
},
map:{
default: 20,
@@ -62,6 +65,7 @@ const RATE_LIMITS = {
growthdouble: 500,
etier2c: 2500,
etier1a: 1000,
+ etier2a: 2500,
},
preview: {
free: 5,
@@ -134,6 +138,13 @@ export const etier1aRateLimiter = new RateLimiterRedis({
duration: 60, // Duration in seconds
});
+export const etier2aRateLimiter = new RateLimiterRedis({
+ storeClient: redisRateLimitClient,
+ keyPrefix: "etier2a",
+ points: 2500,
+ duration: 60, // Duration in seconds
+});
+
const testSuiteTokens = [
"a01ccae",
"6254cf9",
@@ -192,6 +203,10 @@ export function getRateLimiter(
return etier1aRateLimiter;
}
+ if(teamId && teamId === process.env.ETIER2A_TEAM_ID) {
+ return etier2aRateLimiter;
+ }
+
if(teamId && manual.includes(teamId)) {
return manualRateLimiter;
}