User Settings
The User model (see Database Models) stores preferences in a user_settings JSONB column: per-purpose LLM defaults, UI preferences, notifications, localization, and privacy.
Schema
Only version and the four models slots (generation, evaluation, execution, embedding) are present by default; other sections are created on first write. The column also holds onboarding progress and a default_project reference.
Usage
Read and write through the user.settings property, which wraps the raw dict in typed accessors and returns None for missing values. update() deep-merges and persists the change onto the model automatically — you still commit the session.
API
PATCH merges partial data into existing settings. Changes to models.embedding are rejected — the embedding model is fixed for a deployment.
Validation
Pydantic schemas in rhesis.backend.app.schemas.user validate updates:
LLMModelSettings—temperaturein 0.0–2.0,max_tokens> 0UISettings—default_page_sizein 1–100- The top-level
UserSettingsusesextra="forbid", so unknown keys are rejected