<?php

declare(strict_types=1);

// Private runtime config for this forum instance.
// This file may contain secrets. Keep it outside public/ and out of git.
// Run ./v3 private-config view to inspect redacted effective values.
// Run ./v3 private-config refresh-template to refresh comments/examples without changing values.

return [
    // LLM provider used for post analysis and agent reply drafting.
    // Required, no default. Supported values: openai, openrouter, anthropic, stub, or a custom OpenAI-compatible gateway name.
    'LLM_PROVIDER' => '',

    // Provider API key. For LLM_PROVIDER=stub this can stay as the placeholder.
    'LLM_API_KEY' => 'replace-with-real-key',

    // Base URL without the endpoint path.
    // OpenAI-compatible providers call /v1/chat/completions; Anthropic calls /v1/messages.
    // Required for every provider except stub; see the provider examples below.
    'LLM_API_BASE_URL' => '',

    // Provider model identifier. Required for every provider except stub; see the provider examples below.
    'LLM_MODEL' => '',

    // External provider request timeout in seconds.
    'LLM_TIMEOUT_SECONDS' => 60,

    // Optional provider headers. OpenRouter commonly uses HTTP-Referer and X-Title.
    'LLM_EXTRA_HEADERS' => [],

    // Prompt template path, relative to the application root unless absolute.
    'LLM_POST_ANALYSIS_PROMPT_PATH' => 'prompts/dedalus_post_analysis_system.txt',

    // Fastmod is independent of full post analysis and disabled by default.
    // Its LLM settings fall back to the corresponding LLM_* values when omitted.
    'FAST_SCORING_ENABLED' => false,
    'FAST_SCORING_AUTOMATIC_ENQUEUE_ENABLED' => false,
    'FAST_SCORING_LLM_MODEL' => 'openai/gpt-5-nano',
    'FAST_SCORING_PROMPT_PATH' => 'prompts/fast_post_scoring_system.txt',
    // Optional; defaults to state/private/fast_scores.sqlite3.
    // 'FAST_SCORING_DATABASE_PATH' => '/srv/forum-rewrite/state/private/fast_scores.sqlite3',
    // Required for audit/backfill when the selected model is not gpt-5-nano.
    // Prices are USD per million tokens for the configured Fastmod model.
    // 'FAST_SCORING_INPUT_USD_PER_MILLION' => 0.05,
    // 'FAST_SCORING_OUTPUT_USD_PER_MILLION' => 0.40,

    // Agent reply controls. These names remain Dedalus-prefixed for backward compatibility.
    'DEDALUS_AGENT_REPLIES_ENABLED' => true,
    'DEDALUS_AGENT_REPLIES_AUTOMATIC_ENABLED' => false,
    'AGENT_RESPONSE_REQUESTS_ENABLED' => true,

    // Private LLM exchange capture and web visibility. Both default to true.
    'LLM_CONVERSATION_RECORDING_ENABLED' => true,
    'LLM_CONVERSATION_UI_ENABLED' => true,
    // Optional; defaults to state/private/llm_exchanges.sqlite3.
    // 'LLM_EXCHANGE_DATABASE_PATH' => '/srv/forum-rewrite/state/private/llm_exchanges.sqlite3',
];

// Provider examples. Copy the relevant values into the returned array above.
//
// Direct OpenAI:
//   'LLM_PROVIDER' => 'openai',
//   'LLM_API_BASE_URL' => 'https://api.openai.com',
//   'LLM_MODEL' => 'gpt-5-nano',
//
// Direct Anthropic:
//   'LLM_PROVIDER' => 'anthropic',
//   'LLM_API_BASE_URL' => 'https://api.anthropic.com',
//   'LLM_MODEL' => 'claude-haiku-4-5-20251001',
//
// OpenRouter:
//   'LLM_PROVIDER' => 'openrouter',
//   'LLM_API_BASE_URL' => 'https://openrouter.ai/api',
//   'LLM_MODEL' => 'openai/gpt-5-nano',
//   'LLM_EXTRA_HEADERS' => [
//       'HTTP-Referer' => 'https://forum.example',
//       'X-Title' => 'Forum',
//   ],
//
// LiteLLM or another OpenAI-compatible gateway:
//   'LLM_PROVIDER' => 'litellm',
//   'LLM_API_BASE_URL' => 'https://llm-gateway.example',
//   'LLM_MODEL' => 'openai/gpt-5-nano',
//
// Offline smoke tests:
//   'LLM_PROVIDER' => 'stub',