feat(chat): add Google Gemini API support with Flash as default model

- Add @google/generative-ai package for Gemini integration
- Update ChatService to support both Azure OpenAI and Gemini providers
- Add Gemini 2.5 Flash, Flash-Lite, and Pro models to seed
- Set Gemini 2.5 Flash as the default model for fast responses
- Add DEV_BYPASS_AUTH mode for local development
- Make /api/models endpoint public (no auth required)
- Add port 5174 to CORS allowed origins
- Add isDefault field to models schema

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Till-JS 2025-11-29 13:22:58 +01:00
parent 7deb5b9a1e
commit 95bba8ef6e
9 changed files with 426 additions and 211 deletions

View file

@ -55,11 +55,15 @@ STRIPE_WEBHOOK_SECRET=whsec_YOUR_SECRET
# Chat Backend
CHAT_BACKEND_PORT=3002
CHAT_DATABASE_URL=postgresql://chat:chatpassword@localhost:5432/chat
CHAT_DATABASE_URL=postgresql://manacore:devpassword@localhost:5432/chat
DEV_BYPASS_AUTH=true
# Azure OpenAI (required for chat - get your own keys)
AZURE_OPENAI_ENDPOINT=https://your-azure-openai-endpoint.openai.azure.com
AZURE_OPENAI_API_KEY=YOUR_API_KEY
# Google Gemini API (primary - fast & cost-effective)
GOOGLE_GENAI_API_KEY=AIzaSyApsYQXxN6PuXpF8-7j6MonCACwS0ZxNRc
# Azure OpenAI (fallback)
AZURE_OPENAI_ENDPOINT=https://memoroseopenai.openai.azure.com
AZURE_OPENAI_API_KEY=3082103c9b0d4270a795686ccaa89921
AZURE_OPENAI_API_VERSION=2024-12-01-preview
# Chat Supabase (if using Supabase for chat data)