diff --git a/apps/sim/app/api/copilot/chat/route.ts b/apps/sim/app/api/copilot/chat/route.ts index 092ae01fae3..b8858832b9c 100644 --- a/apps/sim/app/api/copilot/chat/route.ts +++ b/apps/sim/app/api/copilot/chat/route.ts @@ -123,23 +123,6 @@ export async function POST(req: NextRequest) { const session = await getSession() let authenticatedUserId: string | null = session?.user?.id || null - // If no session, check for API key auth - if (!authenticatedUserId) { - const apiKeyHeader = req.headers.get('x-api-key') - if (apiKeyHeader) { - // Verify API key - const [apiKeyRecord] = await db - .select({ userId: apiKeyTable.userId }) - .from(apiKeyTable) - .where(eq(apiKeyTable.key, apiKeyHeader)) - .limit(1) - - if (apiKeyRecord) { - authenticatedUserId = apiKeyRecord.userId - } - } - } - if (!authenticatedUserId) { return NextResponse.json({ error: 'Unauthorized' }, { status: 401 }) } diff --git a/apps/sim/lib/logs/console/logger.ts b/apps/sim/lib/logs/console/logger.ts index 8c77293b262..5f67ea0bc80 100644 --- a/apps/sim/lib/logs/console/logger.ts +++ b/apps/sim/lib/logs/console/logger.ts @@ -44,8 +44,8 @@ const LOG_CONFIG = { colorize: true, }, production: { - enabled: false, // Disable all console logs in production - minLevel: LogLevel.ERROR, + enabled: true, // Enable console logs in production + minLevel: LogLevel.INFO, // Show INFO, WARN, and ERROR logs colorize: false, }, test: {