-- Add LLM configuration columns to characters table
-- Migration: 006_add_character_llm_settings.sql

ALTER TABLE characters 
ADD COLUMN llm_provider VARCHAR(50),
ADD COLUMN llm_model VARCHAR(100),
ADD COLUMN llm_temperature FLOAT,
ADD COLUMN llm_max_tokens INTEGER;

-- Add indexes for common queries
CREATE INDEX IF NOT EXISTS ix_characters_llm_provider ON characters(llm_provider);
CREATE INDEX IF NOT EXISTS ix_characters_llm_model ON characters(llm_model);

-- Add comments for documentation
COMMENT ON COLUMN characters.llm_provider IS 'Per-character LLM provider override (openrouter, openai, gemini, custom)';
COMMENT ON COLUMN characters.llm_model IS 'Specific model name for this character';
COMMENT ON COLUMN characters.llm_temperature IS 'Creativity/randomness setting (0.1-2.0)';
COMMENT ON COLUMN characters.llm_max_tokens IS 'Maximum response length for this character';