ALTER TABLE preferences ADD COLUMN context_tokens INTEGER NOT NULL DEFAULT 32768
    CHECK (context_tokens > 0);
ALTER TABLE preferences ADD COLUMN max_generated_tokens INTEGER NOT NULL DEFAULT 50000
    CHECK (max_generated_tokens > 0);
ALTER TABLE preferences ADD COLUMN system_prompt TEXT NOT NULL DEFAULT 'You are a helpful assistant';
ALTER TABLE preferences ADD COLUMN temperature REAL
    CHECK (temperature IS NULL OR temperature BETWEEN 0 AND 100);
ALTER TABLE preferences ADD COLUMN top_p REAL
    CHECK (top_p IS NULL OR top_p BETWEEN 0 AND 1);
ALTER TABLE preferences ADD COLUMN min_p REAL
    CHECK (min_p IS NULL OR min_p BETWEEN 0 AND 1);
ALTER TABLE preferences ADD COLUMN seed TEXT;
ALTER TABLE preferences ADD COLUMN reasoning_mode TEXT NOT NULL DEFAULT 'high'
    CHECK (reasoning_mode IN ('none', 'high', 'max'));
