Replace deprecated Pydantic v1 `class Config:` inner class with `model_config = SettingsConfigDict(...)` to eliminate the deprecation warning emitted on every test run. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
61 lines
2.0 KiB
Python
61 lines
2.0 KiB
Python
from typing import Literal
|
|
from pydantic_settings import BaseSettings, SettingsConfigDict
|
|
|
|
|
|
class Settings(BaseSettings):
|
|
DATABASE_URL: str = "postgresql+asyncpg://postgres:postgres@localhost:5432/adiuva"
|
|
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 = ""
|
|
|
|
S3_BUCKET: str = ""
|
|
S3_REGION: str = "us-east-1"
|
|
S3_ENDPOINT_URL: str = ""
|
|
AWS_ACCESS_KEY_ID: str = ""
|
|
AWS_SECRET_ACCESS_KEY: str = ""
|
|
|
|
PINECONE_API_KEY: str = ""
|
|
PINECONE_INDEX: str = "adiuva"
|
|
QDRANT_URL: str = ""
|
|
QDRANT_API_KEY: str = ""
|
|
|
|
OPENAI_API_KEY: str = ""
|
|
ANTHROPIC_API_KEY: str = ""
|
|
GOOGLE_API_KEY: str = ""
|
|
CEREBRAS_API_KEY: str = ""
|
|
|
|
LLM_MODEL: str = "gpt-4o"
|
|
LLM_ROUTER_MODEL: str = "gpt-4o-mini"
|
|
LLM_EMBED_MODEL: str = "text-embedding-3-small"
|
|
|
|
# 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"
|
|
|
|
# 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"]
|
|
|
|
ENV: Literal["dev", "prod"] = "dev"
|
|
|
|
model_config = SettingsConfigDict(env_file=".env", env_file_encoding="utf-8")
|
|
|
|
|
|
settings = Settings()
|