diff --git a/apps/api/src/controllers/v2/agent.ts b/apps/api/src/controllers/v2/agent.ts index 438073161..7fd8e7d75 100644 --- a/apps/api/src/controllers/v2/agent.ts +++ b/apps/api/src/controllers/v2/agent.ts @@ -46,25 +46,7 @@ export async function agentController( }); if (!config.EXTRACT_V3_BETA_URL) { - return res.status(400).json({ - success: false, - error: "Agent beta is not enabled.", - }); - } - - if ( - !req.acuc?.flags?.extractV3Beta && - !req.acuc?.flags?.agentBeta && - !( - config.AGENT_INTEROP_SECRET && - req.body.overrideWhitelist === config.AGENT_INTEROP_SECRET - ) - ) { - return res.status(400).json({ - success: false, - error: - "Agent beta is not enabled for your team. Please contact support@firecrawl.com to join the beta.", - }); + throw new Error("Agent beta is not enabled."); } let freeRequest: any; diff --git a/apps/api/src/controllers/v2/extract.ts b/apps/api/src/controllers/v2/extract.ts index 144c59055..d2ee361ee 100644 --- a/apps/api/src/controllers/v2/extract.ts +++ b/apps/api/src/controllers/v2/extract.ts @@ -50,18 +50,7 @@ export async function extractController( if (req.body.agent?.model === "v3-beta") { if (!config.EXTRACT_V3_BETA_URL) { - return res.status(400).json({ - success: false, - error: "Agent beta is not enabled.", - }); - } - - if (!req.acuc?.flags?.extractV3Beta) { - return res.status(400).json({ - success: false, - error: - "Agent beta is not enabled for your team. Please contact support@firecrawl.com to join the beta.", - }); + throw new Error("Agent beta is not enabled."); } if (!req.body.prompt) {