mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-19 11:21:24 +02:00
- Add Dockerfile for multi-stage Docker build - Add mana-core-auth integration with login/register pages - Add auth store using Svelte 5 runes - Add protected route layout with auth guard - Add health endpoint for container health checks - Add runtime URL injection via hooks.server.ts - Add logout button to header - Update docker-compose.macmini.yml with llm-playground service - Update cloudflared-config.yml with playground.mana.how route - Update mana-llm CORS config for playground domain - Update generate-env.mjs with auth URL variable Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
48 lines
1.3 KiB
Python
48 lines
1.3 KiB
Python
"""Configuration settings for mana-llm service."""
|
|
|
|
from pydantic_settings import BaseSettings
|
|
|
|
|
|
class Settings(BaseSettings):
|
|
"""Application settings loaded from environment variables."""
|
|
|
|
# Service
|
|
port: int = 3025
|
|
log_level: str = "info"
|
|
|
|
# Ollama (Primary provider)
|
|
ollama_url: str = "http://localhost:11434"
|
|
ollama_default_model: str = "gemma3:4b"
|
|
ollama_timeout: int = 120
|
|
|
|
# OpenRouter (Cloud fallback)
|
|
openrouter_api_key: str | None = None
|
|
openrouter_base_url: str = "https://openrouter.ai/api/v1"
|
|
openrouter_default_model: str = "meta-llama/llama-3.1-8b-instruct"
|
|
|
|
# Groq (Optional)
|
|
groq_api_key: str | None = None
|
|
groq_base_url: str = "https://api.groq.com/openai/v1"
|
|
|
|
# Together (Optional)
|
|
together_api_key: str | None = None
|
|
together_base_url: str = "https://api.together.xyz/v1"
|
|
|
|
# Caching (Optional)
|
|
redis_url: str | None = None
|
|
cache_ttl: int = 3600
|
|
|
|
# CORS
|
|
cors_origins: str = "http://localhost:5173,http://localhost:5190,https://mana.how,https://playground.mana.how"
|
|
|
|
@property
|
|
def cors_origins_list(self) -> list[str]:
|
|
"""Parse CORS origins from comma-separated string."""
|
|
return [origin.strip() for origin in self.cors_origins.split(",")]
|
|
|
|
class Config:
|
|
env_file = ".env"
|
|
env_file_encoding = "utf-8"
|
|
|
|
|
|
settings = Settings()
|