Step 1 of Google login integration: Alembic migration for oauth_accounts + avatar_url on users, OAuthAccount model with User relationship, UserProfile schema extended with avatar_url, get_current_user updated to include avatar_url. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
69 lines
2.8 KiB
Python
69 lines
2.8 KiB
Python
from typing import Literal
|
|
from pydantic_settings import BaseSettings, SettingsConfigDict
|
|
|
|
|
|
class Settings(BaseSettings):
|
|
DATABASE_URL: str = "postgresql+asyncpg://postgres:postgres@localhost:5432/adiuvai"
|
|
JWT_SECRET: str = "change-me-in-production"
|
|
JWT_ALGORITHM: str = "HS256"
|
|
JWT_ACCESS_TOKEN_EXPIRE_MINUTES: int = 30
|
|
JWT_REFRESH_TOKEN_EXPIRE_DAYS: int = 30
|
|
|
|
STRIPE_SECRET_KEY: str = ""
|
|
STRIPE_WEBHOOK_SECRET: str = ""
|
|
|
|
OPENAI_API_KEY: str = ""
|
|
ANTHROPIC_API_KEY: str = ""
|
|
GOOGLE_API_KEY: str = ""
|
|
CEREBRAS_API_KEY: str = ""
|
|
|
|
LLM_MODEL: str = "gpt-4o"
|
|
LLM_EMBED_MODEL: str = "text-embedding-3-small"
|
|
|
|
# Per-agent model overrides. Leave empty to fall back to LLM_MODEL.
|
|
LLM_MODEL_CLASSIFIER: str = "" # _infer_floating_domain (intent routing)
|
|
LLM_MODEL_HOME_AGENT: str = "" # home-agent (run_single_agent / stream)
|
|
LLM_MODEL_FLOATING_AGENT: str = "" # floating-agent (contextual chat)
|
|
LLM_MODEL_UNIFIED_PROCESSOR: str = "" # unified-processor (agent_runner)
|
|
LLM_MODEL_CLOUD_PROCESSOR: str = "" # cloud-processor (agent_runner)
|
|
LLM_MODEL_SETUP_AGENT: str = "" # agent-setup journey
|
|
|
|
# GitHub Copilot OAuth token storage directory.
|
|
# Leave empty to use the LiteLLM default (~/.config/litellm/github_copilot).
|
|
# In Docker, set this to a path backed by a named volume so tokens survive restarts.
|
|
GITHUB_COPILOT_TOKEN_DIR: str = ""
|
|
|
|
# OAuth client credentials — used for Gmail and Microsoft (Outlook/Teams) flows.
|
|
GMAIL_CLIENT_ID: str = ""
|
|
GMAIL_CLIENT_SECRET: str = ""
|
|
MS_CLIENT_ID: str = ""
|
|
MS_CLIENT_SECRET: str = ""
|
|
# MS_TENANT_ID: set to 'common' to allow multi-tenant (personal + work accounts).
|
|
MS_TENANT_ID: str = "common"
|
|
|
|
# Google Login OAuth credentials — scope: openid email profile.
|
|
# Separate from GMAIL_CLIENT_ID/SECRET (which uses gmail.readonly scope).
|
|
GOOGLE_AUTH_CLIENT_ID: str = ""
|
|
GOOGLE_AUTH_CLIENT_SECRET: str = ""
|
|
# Deep-link URI registered in the Google Cloud Console for the desktop app.
|
|
# Must match the protocol registered in forge.config.ts.
|
|
OAUTH_REDIRECT_URI: str = "adiuvai://oauth/callback"
|
|
|
|
# Fernet key (URL-safe base64, 32-byte key) for at-rest encryption of OAuth
|
|
# tokens stored in cloud_agent_configs.oauth_token_encrypted.
|
|
# Generate with: from cryptography.fernet import Fernet; Fernet.generate_key()
|
|
OAUTH_ENCRYPTION_KEY: str = ""
|
|
|
|
CORS_ORIGINS: list[str] = ["app://.", "http://localhost:3000", "http://localhost:5173"]
|
|
|
|
LANGFUSE_SECRET_KEY: str = ""
|
|
LANGFUSE_PUBLIC_KEY: str = ""
|
|
LANGFUSE_BASE_URL: str = "https://cloud.langfuse.com"
|
|
|
|
ENV: Literal["dev", "prod"] = "dev"
|
|
|
|
model_config = SettingsConfigDict(env_file=".env", env_file_encoding="utf-8")
|
|
|
|
|
|
settings = Settings()
|