use serde::{Deserialize, Serialize};

#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct Config {
    pub database_url: String,
    pub openai_api_key: String,
    pub openrouter_api_key: String,
    pub openai_base_url: Option<String>,
    pub llm_provider: String,
    pub llm_model: String,
    pub embedding_model: String,
    pub summary_trigger_count: usize,
    pub default_search_limit: usize,
    pub connection_threshold: f32,
    pub max_connections: usize,
}

impl Default for Config {
    fn default() -> Self {
        Self {
            database_url: "postgres://localhost:5432/mem1".to_string(),
            openai_api_key: String::new(),
            openrouter_api_key: String::new(),
            openai_base_url: None,
            llm_provider: "openai".to_string(),
            llm_model: "gpt-4o-mini".to_string(),
            embedding_model: "text-embedding-3-small".to_string(),
            summary_trigger_count: 20,
            default_search_limit: 10,
            connection_threshold: 0.6,
            max_connections: 5,
        }
    }
}
