managarten/services
Till JS 45063b88be feat(mana-llm): add Google Gemini fallback provider with auto-routing
Add Google Gemini as a fallback provider that activates automatically
when Ollama is overloaded or unavailable, ensuring LLM requests always
succeed even under load.

New provider (src/providers/google.py):
- Full LLMProvider implementation using google-genai SDK
- Chat completions (streaming + non-streaming)
- Vision/multimodal support (base64 images)
- Embeddings via text-embedding-004
- Model mapping: Ollama models → Gemini equivalents
  (gemma3:4b → gemini-2.0-flash, llava:7b → gemini-2.0-flash, etc.)

Auto-fallback routing (src/providers/router.py):
- Concurrent request tracking for Ollama (OLLAMA_MAX_CONCURRENT=3)
- When Ollama concurrent > max: route to Google automatically
- When Ollama fails: retry on Google with model mapping
- Health check caching (5s TTL) to avoid hammering Ollama
- Non-Ollama providers (openrouter, groq, together) are never fallback-routed
- Fallback info included in /health endpoint response

New config (src/config.py):
- GOOGLE_API_KEY: enables Google provider
- GOOGLE_DEFAULT_MODEL: default gemini-2.0-flash
- AUTO_FALLBACK_ENABLED: toggle fallback (default: true)
- OLLAMA_MAX_CONCURRENT: concurrent request threshold (default: 3)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 22:44:09 +01:00
..
mana-api-gateway feat(games): add whopixels hosting at whopxl.mana.how 2026-03-20 19:57:50 +01:00
mana-core-auth feat: add unified @manacore/shared-llm package and migrate all backends 2026-03-23 22:06:30 +01:00
mana-crawler feat(games): add whopixels hosting at whopxl.mana.how 2026-03-20 19:57:50 +01:00
mana-image-gen fix(mana-notify): resolve BullMQ circular import issue 2026-01-29 22:58:47 +01:00
mana-landing-builder fix(landing-builder): rework Dockerfile to copy workspace directly 2026-03-23 13:50:22 +01:00
mana-llm feat(mana-llm): add Google Gemini fallback provider with auto-routing 2026-03-23 22:44:09 +01:00
mana-media fix(mana-media): use prom-client directly instead of shared metrics package 2026-03-23 11:06:09 +01:00
mana-notify feat(games): add whopixels hosting at whopxl.mana.how 2026-03-20 19:57:50 +01:00
mana-search fix: replace all manacore.app URLs with mana.how 2026-03-22 18:40:37 +01:00
mana-stt feat(auth): add API key management for STT/TTS services 2026-02-12 02:12:05 +01:00
mana-tts 📝 docs(tts): document German voice support (Piper/Kerstin) 2026-02-14 12:21:40 +01:00
mana-voice-bot feat(mana-voice-bot): add German voice-to-voice assistant service 2026-02-01 02:21:13 +01:00
matrix-calendar-bot feat(games): add whopixels hosting at whopxl.mana.how 2026-03-20 19:57:50 +01:00
matrix-chat-bot 🔒 refactor(bots): remove !login command and enforce OIDC-only auth 2026-02-14 11:26:58 +01:00
matrix-clock-bot feat(games): add whopixels hosting at whopxl.mana.how 2026-03-20 19:57:50 +01:00
matrix-contacts-bot 🔒 refactor(bots): remove !login command and enforce OIDC-only auth 2026-02-14 11:26:58 +01:00
matrix-mana-bot feat(games): add whopixels hosting at whopxl.mana.how 2026-03-20 19:57:50 +01:00
matrix-manadeck-bot 🔒 refactor(bots): remove !login command and enforce OIDC-only auth 2026-02-14 11:26:58 +01:00
matrix-nutriphi-bot feat(games): add whopixels hosting at whopxl.mana.how 2026-03-20 19:57:50 +01:00
matrix-ollama-bot feat: add unified @manacore/shared-llm package and migrate all backends 2026-03-23 22:06:30 +01:00
matrix-onboarding-bot feat(games): add whopixels hosting at whopxl.mana.how 2026-03-20 19:57:50 +01:00
matrix-picture-bot 🔒 refactor(bots): remove !login command and enforce OIDC-only auth 2026-02-14 11:26:58 +01:00
matrix-planta-bot feat(games): add whopixels hosting at whopxl.mana.how 2026-03-20 19:57:50 +01:00
matrix-presi-bot 🔒 refactor(bots): remove !login command and enforce OIDC-only auth 2026-02-14 11:26:58 +01:00
matrix-project-doc-bot fix(mana-media): use prom-client directly instead of shared metrics package 2026-03-23 11:06:09 +01:00
matrix-questions-bot 🔒 refactor(bots): remove !login command and enforce OIDC-only auth 2026-02-14 11:26:58 +01:00
matrix-skilltree-bot 🔒 refactor(bots): remove !login command and enforce OIDC-only auth 2026-02-14 11:26:58 +01:00
matrix-stats-bot feat(games): add whopixels hosting at whopxl.mana.how 2026-03-20 19:57:50 +01:00
matrix-storage-bot 🔒 refactor(bots): remove !login command and enforce OIDC-only auth 2026-02-14 11:26:58 +01:00
matrix-stt-bot feat(games): add whopixels hosting at whopxl.mana.how 2026-03-20 19:57:50 +01:00
matrix-todo-bot feat(games): add whopixels hosting at whopxl.mana.how 2026-03-20 19:57:50 +01:00
matrix-tts-bot feat(games): add whopixels hosting at whopxl.mana.how 2026-03-20 19:57:50 +01:00
matrix-zitare-bot feat(games): add whopixels hosting at whopxl.mana.how 2026-03-20 19:57:50 +01:00
ollama-metrics-proxy feat(telegram-bot): add local STT support and Prometheus metrics 2026-01-27 16:51:09 +01:00