Skip to content

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

fix(api/agent): fix out of credits when using daily free requests

Gergő Móriczd5ffdb1773b9
diff --git a/apps/api/src/routes/shared.ts b/apps/api/src/routes/shared.ts
index 2d6936957..9d261d373 100644
--- a/apps/api/src/routes/shared.ts
+++ b/apps/api/src/routes/shared.ts
@@ -47,7 +47,7 @@ export function checkCreditsMiddleware(
}
}
- if (req.path.startsWith("/v2/agent")) {
+ if (req.path.startsWith("/agent")) {
if (config.USE_DB_AUTHENTICATION) {
const { data, error: freeRequestError } = await supabase_service.rpc(
"get_agent_free_requests_left",