You are a seasoned Python and Next.js developer with over a decade of experience, known for delivering highly polished, professional applications. Your goal is to create a sleek, intuitive chat application that allows users to interact with multiple Large Language Models (LLMs) from top providers, such as Ollama, Groq, DeepSeek, Gemini by Google, Grok by X-AI, Claude by Anthropic, and ChatGPT by OpenAI. The application should deliver an engaging, modern user experience, meeting the highest standards in both functionality and design.

---

**User Requirements:**

1. **User Interface (UI) Design:**  
   - **Modern Look & Feel:** Develop a contemporary interface with an attractive color scheme, ensuring readability and usability.
   - **Model Selection:** Provide a dropdown menu or select menu below the chat input for users to choose both the LLM model and provider with ease.
   - **Chat History Management:** Include a stylish, minimalistic "dot menu" on the side where users can view their chat history.
   - **New Chat Creation:** A simple, sleek "+" button in the sidebar menu should allow users to initiate new chat sessions effortlessly.

2. **Provider Integrations:**  
   Each provider should be seamlessly integrated on the FastAPI backend, allowing users to select and interact with them. Examples for setup:
   
   - **Google (Gemini):** Use Gemini to generate responses with the following setup:
     

python
     import os
     import google.generativeai as genai

     genai.configure(api_key=os.environ["GEMINI_API_KEY"])

     generation_config = {
       "response_mime_type": "text/plain",
     }

     model = genai.GenerativeModel(
       model_name="gemini-1.5-pro-002",
       generation_config=generation_config,
     )

     chat_session = model.start_chat(history=[])
     response = chat_session.send_message("INSERT_INPUT_HERE")
     print(response.text)



   - **Grok (X AI):** Set up Grok-beta with the following curl example:
     

bash
     curl https://api.x.ai/v1/chat/completions -H "Content-Type: application/json" -H "Authorization: Bearer YOUR_XAI_API_KEY" -d '{
       "messages": [
         {
           "role": "system",
           "content": "You are a test assistant."
         },
         {
           "role": "user",
           "content": "Testing. Just say hi and hello world and nothing else."
         }
       ],
       "model": "grok-beta",
       "stream": false,
       "temperature": 0
     }'



3. **Technology Stack:**  
   - **Frontend:** Next.js for the entire front-end development, delivering an interactive, performant user experience.
   - **Backend:** Python with FastAPI, enabling integration with the various LLM providers and handling requests/responses.

4. **Setup Options:**  
   - Please include all essential configuration options when running:
     

bash
     npx create-next-app@latest



---

In creating the Next.js frontend, please anwser this following options:

1. **Would you like to use TypeScript?**
   (Using TypeScript ensures type safety and improves code maintainability.)

2. **Would you like to use ESLint?**
   (Include ESLint to maintain code quality with consistent linting rules.)

3. **Would you like to use Tailwind CSS?**
   (Tailwind CSS allows for rapid, customizable, and modern styling, perfect for a sleek chat UI.)

4. **Would you like your code inside a src/ directory?**
   (Organizes code better and is recommended for larger projects.)

5. **Would you like to use App Router?**
   (Enables the new App Router in Next.js, providing better performance and flexibility.)

6. **Would you like to use Turbopack for next dev?**
   (Turbopack speeds up development with faster builds and improved hot-reloading.)

7. **Would you like to customize the import alias?**
   (Use custom import aliases for easier imports in complex file structures.)