Skip to content

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

feat(api/v2/agent): m

Gergő Móriczcd8ffca6a377
diff --git a/apps/api/src/controllers/v2/agent.ts b/apps/api/src/controllers/v2/agent.ts
index e68943a32..bb86e850d 100644
--- a/apps/api/src/controllers/v2/agent.ts
+++ b/apps/api/src/controllers/v2/agent.ts
@@ -102,6 +102,7 @@ export async function agentController(
maxCredits: req.body.maxCredits ?? undefined,
strictConstrainToURLs: req.body.strictConstrainToURLs ?? undefined,
webhook: req.body.webhook ?? undefined,
+ model: req.body.model,
}),
},
);
diff --git a/apps/api/src/controllers/v2/types.ts b/apps/api/src/controllers/v2/types.ts
index 61d231c15..42bcac35b 100644
--- a/apps/api/src/controllers/v2/types.ts
+++ b/apps/api/src/controllers/v2/types.ts
@@ -752,6 +752,7 @@ export const agentRequestSchema = z.strictObject({
webhook: agentWebhookSchema.optional(),
overrideWhitelist: z.string().optional(),
+ model: z.enum(["spark-1-pro", "spark-1-mini"]).default("spark-1-pro"),
});
export type AgentRequest = z.infer<typeof agentRequestSchema>;