Skip to content

🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.

chore(cloud): remove rate limits from projects api as it is used by auth_check in sdks (#6193)

Marc Klingend00c63100e4b
diff --git a/web/src/pages/api/public/projects.ts b/web/src/pages/api/public/projects.ts
index 87810d0caf..53b5f73b9a 100644
--- a/web/src/pages/api/public/projects.ts
+++ b/web/src/pages/api/public/projects.ts
@@ -5,7 +5,6 @@ import { isPrismaException } from "@/src/utils/exceptions";
import { logger, redis } from "@langfuse/shared/src/server";
import { type NextApiRequest, type NextApiResponse } from "next";
-import { RateLimitService } from "@/src/features/public-api/server/RateLimitService";
export default async function handler(
req: NextApiRequest,
@@ -26,23 +25,19 @@ export default async function handler(
if (req.method === "GET") {
try {
+ // Do not apply rate limits as it can break applications on lower tier plans when using auth_check in prod
+
const projects = await prisma.project.findMany({
+ select: {
+ id: true,
+ name: true,
+ },
where: {
id: authCheck.scope.projectId,
// deletedAt: null, // here we want to include deleted projects and grey them in the UI.
},
});
- const rateLimitCheck =
- await RateLimitService.getInstance().rateLimitRequest(
- authCheck.scope,
- "public-api",
- );
-
- if (rateLimitCheck?.isRateLimited()) {
- return rateLimitCheck.sendRestResponseIfLimited(res);
- }
-
return res.status(200).json({
data: projects.map((project) => ({
id: project.id,