Stop Calling LLM APIs from Your Request Handler — Queue Them
LLM APIs are slow, rate-limited, and expensive — three things that destroy inline request handling. Here's the queue-based architecture I use for AI features in production Node.js backends, with BullMQ code you can copy.