diff --git a/src/app/api/ask/quick/route.ts b/src/app/api/ask/quick/route.ts index 568a6bce8a..a55870f2d9 100644 --- a/src/app/api/ask/quick/route.ts +++ b/src/app/api/ask/quick/route.ts @@ -9,6 +9,8 @@ import { askTools } from "@/lib/ai/askTools"; import { streamText, hasToolCall, ModelMessage } from "ai"; import { getModel, getApiKeyForProvider } from "aieo"; +export const runtime = "nodejs"; + type Provider = "anthropic" | "google" | "openai" | "claude_code"; export async function GET(request: NextRequest) { diff --git a/src/app/api/ask/route.ts b/src/app/api/ask/route.ts index b3e109a6d0..8a0295b723 100644 --- a/src/app/api/ask/route.ts +++ b/src/app/api/ask/route.ts @@ -5,6 +5,8 @@ import { db } from "@/lib/db"; import { EncryptionService } from "@/lib/encryption"; import { validateWorkspaceAccess } from "@/services/workspace"; +export const runtime = "nodejs"; + export async function GET(request: NextRequest) { try { const session = await getServerSession(authOptions); diff --git a/src/app/api/gitsee/route.ts b/src/app/api/gitsee/route.ts index 1935cbe100..f40107d899 100644 --- a/src/app/api/gitsee/route.ts +++ b/src/app/api/gitsee/route.ts @@ -5,6 +5,8 @@ import { db } from "@/lib/db"; import { EncryptionService } from "@/lib/encryption"; import { validateWorkspaceAccessById } from "@/services/workspace"; +export const runtime = "nodejs"; + export async function POST(request: NextRequest) { try { const session = await getServerSession(authOptions); diff --git a/src/app/api/learnings/route.ts b/src/app/api/learnings/route.ts index a681deadb4..b65b34b037 100644 --- a/src/app/api/learnings/route.ts +++ b/src/app/api/learnings/route.ts @@ -5,6 +5,8 @@ import { db } from "@/lib/db"; import { EncryptionService } from "@/lib/encryption"; import { validateWorkspaceAccess } from "@/services/workspace"; +export const runtime = "nodejs"; + export async function GET(request: NextRequest) { try { const session = await getServerSession(authOptions); diff --git a/src/app/api/swarm/route.ts b/src/app/api/swarm/route.ts index def0528334..496758fff0 100644 --- a/src/app/api/swarm/route.ts +++ b/src/app/api/swarm/route.ts @@ -10,6 +10,8 @@ import { SwarmStatus } from "@prisma/client"; import { getServerSession } from "next-auth/next"; import { NextRequest, NextResponse } from "next/server"; +export const runtime = "nodejs"; + export async function POST(request: NextRequest) { if (isFakeMode) { const { id, swarm_id } = await createFakeSwarm(); diff --git a/src/app/api/tasks/route.ts b/src/app/api/tasks/route.ts index ec32be95e6..f56a7f01ec 100644 --- a/src/app/api/tasks/route.ts +++ b/src/app/api/tasks/route.ts @@ -4,6 +4,8 @@ import { authOptions } from "@/lib/auth/nextauth"; import { db } from "@/lib/db"; import { TaskStatus, Priority, WorkflowStatus } from "@prisma/client"; +export const runtime = "nodejs"; + export async function GET(request: NextRequest) { try { const session = await getServerSession(authOptions); diff --git a/src/app/api/workspaces/route.ts b/src/app/api/workspaces/route.ts index 70ffadce55..379611b40d 100644 --- a/src/app/api/workspaces/route.ts +++ b/src/app/api/workspaces/route.ts @@ -4,6 +4,8 @@ import { authOptions } from "@/lib/auth/nextauth"; import { createWorkspace, getUserWorkspaces, softDeleteWorkspace } from "@/services/workspace"; import { db } from "@/lib/db"; +export const runtime = "nodejs"; + // Prevent caching of user-specific data export const dynamic = "force-dynamic";