; =====================================================================
;  Nibiru AI module — config
;
;  Sections supported under [AI]:
;    - Ollama transport
;    - Chat completions
;    - Embeddings
;    - RAG (retrieval-augmented generation)
;    - Agents
;
;  Override per-environment with ai.production.ini, ai.staging.ini, etc.
; =====================================================================

[AI]
; --- Ollama transport ---
; Default is the standard local Ollama port. Override per environment in
; ai.production.ini / ai.staging.ini, or set the OLLAMA_BASE_URL env var.
ollama.base_url     = "http://localhost:11434"
ollama.timeout      = 90
ollama.retries      = 1

; --- Chat ---
chat.model          = "nibiru-coder:1.0"
chat.fallback_model = "qwen2.5-coder:14b"
chat.temperature    = 0.4
chat.max_tokens     = 1024
chat.system_prompt  = "You are an expert on the Nibiru PHP framework. Answer with concrete code examples."

; --- Embeddings ---
embed.model         = "nomic-embed-text"
embed.batch         = 16
embed.dim           = 768

; --- RAG ---
rag.storage_path    = "/../../application/module/ai/cache/rag/"
rag.top_k           = 6
rag.chunk_target    = 600
rag.chunk_min       = 120
rag.chunk_max       = 900

; --- Agents ---
agent.max_iterations    = 6
agent.tool_timeout      = 30
agent.allowed_tools[]   = "pdo_query"
agent.allowed_tools[]   = "http_get"
agent.allowed_tools[]   = "view_assign"
agent.allowed_tools[]   = "form_build"

; --- Anthropic / OpenAI fallback (optional) ---
anthropic.api_key   = ""
anthropic.model     = "claude-haiku-4-5-20251001"
openai.api_key      = ""
openai.embed_model  = "text-embedding-3-small"
