import uuid

from pydantic_settings import BaseSettings

GLOBAL_USER_ID = uuid.UUID("00000000-0000-0000-0000-000000000000")


class Settings(BaseSettings):
    DATABASE_URL: str = "postgresql+asyncpg://postgres:postgres@localhost:5432/ootd_poc"
    LLM_PROVIDER: str = "openai"  # "gemini" or "openai"
    MANNEQUIN_MODE: str = "edit"
    # Default OpenAI image model for ghost mannequin + VTON when a request does
    # not specify one ("gpt-image-2" or "gpt-image-1.5"). Per-request overrides
    # are accepted by the ghost/vton endpoints (see schemas.common.ImageModel).
    OPENAI_IMAGE_MODEL: str = "gpt-image-2"
    GEMINI_API_KEY: str = ""
    OPENAI_API_KEY: str = ""
    FACE_MATCH_THRESHOLD: float = 0.5
    UPLOAD_DIR: str = "storage"
    # SEGMENTATION_MODEL: str = "birefnet-general"
    # SEGMENTATION_MODEL: str = "birefnet-general-lite"
    SEGMENTATION_MODEL: str = "isnet-general-use"
    SEGMENTATION_PROVIDERS: str = ""  # comma-separated; empty = onnxruntime autodetect

    model_config = {"env_file": ".env", "env_file_encoding": "utf-8"}


settings = Settings()
