This change rewrites /api/chat from a Node-based Next API route to an edge runtime handler that validates the request body, delegates Firebase token verification to a new /api/auth endpoint, and calls OpenAI directly via fetch. The split is necessary because the edge runtime can't use the existing server-side Firebase/OpenAI SDK setup, so auth stays in a standard API route while chat execution moves to the edge. On the client side, the chat action remains mostly unchanged, still posting messages and personas to /api/chat. The practical effect is a cleaner edge-compatible chat path with potentially lower latency for user conversations.