package settings

const (
	DefaultMaxContextLoadTime = 24 * 60
	DefaultLanguage           = "auto"
	DefaultReasoningEffort    = "medium"
	DefaultHeartbeatInterval  = 30
)

type Settings struct {
	ChatModelID         string `json:"chat_model_id"`
	SearchProviderID    string `json:"search_provider_id"`
	MemoryProviderID    string `json:"memory_provider_id"`
	TtsModelID          string `json:"tts_model_id"`
	BrowserContextID    string `json:"browser_context_id"`
	MaxContextLoadTime  int    `json:"max_context_load_time"`
	MaxContextTokens    int    `json:"max_context_tokens"`
	Language            string `json:"language"`
	AclDefaultEffect    string `json:"acl_default_effect"`
	ReasoningEnabled    bool   `json:"reasoning_enabled"`
	ReasoningEffort     string `json:"reasoning_effort"`
	HeartbeatEnabled    bool   `json:"heartbeat_enabled"`
	HeartbeatInterval   int    `json:"heartbeat_interval"`
	HeartbeatModelID    string `json:"heartbeat_model_id"`
	TitleModelID        string `json:"title_model_id"`
	CompactionEnabled   bool   `json:"compaction_enabled"`
	CompactionThreshold int    `json:"compaction_threshold"`
	CompactionModelID   string `json:"compaction_model_id,omitempty"`
}

type UpsertRequest struct {
	ChatModelID         string  `json:"chat_model_id,omitempty"`
	SearchProviderID    string  `json:"search_provider_id,omitempty"`
	MemoryProviderID    string  `json:"memory_provider_id,omitempty"`
	TtsModelID          string  `json:"tts_model_id,omitempty"`
	BrowserContextID    string  `json:"browser_context_id,omitempty"`
	MaxContextLoadTime  *int    `json:"max_context_load_time,omitempty"`
	MaxContextTokens    *int    `json:"max_context_tokens,omitempty"`
	Language            string  `json:"language,omitempty"`
	AclDefaultEffect    string  `json:"acl_default_effect,omitempty"`
	ReasoningEnabled    *bool   `json:"reasoning_enabled,omitempty"`
	ReasoningEffort     *string `json:"reasoning_effort,omitempty"`
	HeartbeatEnabled    *bool   `json:"heartbeat_enabled,omitempty"`
	HeartbeatInterval   *int    `json:"heartbeat_interval,omitempty"`
	HeartbeatModelID    string  `json:"heartbeat_model_id,omitempty"`
	TitleModelID        string  `json:"title_model_id,omitempty"`
	CompactionEnabled   *bool   `json:"compaction_enabled,omitempty"`
	CompactionThreshold *int    `json:"compaction_threshold,omitempty"`
	CompactionModelID   *string `json:"compaction_model_id,omitempty"`
}
