> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fs.soquincy.qzz.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Runtime Config Reference: config.json Keys and Defaults

> Every configurable key in Freesona's runtime config.json — what it controls, its type, default value, and the /config command to change it.

Freesona exposes a set of runtime-mutable configuration keys you can change live with `/config` commands. These persist across restarts in `config.json` and take effect immediately — no bot restart required.

## Using /config Commands

```text theme={null}
/config list                               — list all keys with descriptions
/config show                               — show all current values
/config show mvsep_poll_interval           — show one specific key
/config set generation_rate_limit 2.0      — update a value
/config reset generation_rate_limit        — reset to default
```

<Note>
  All `/config` commands are restricted to the Bot Owner.
</Note>

## All Configurable Keys

Values are automatically type-converted based on the default type for each key (int, float, bool, or string). Invalid values are rejected with an error message.

| Key                               | Type  | Default | Description                                                                |
| :-------------------------------- | :---- | :------ | :------------------------------------------------------------------------- |
| `mvsep_poll_interval`             | int   | `5`     | Seconds between MVSEP API polling checks when no webhook is configured     |
| `mvsep_poll_timeout`              | int   | `300`   | Maximum seconds to wait for an MVSEP separation task to complete           |
| `ytdlp_subprocess_timeout`        | int   | `300`   | Maximum seconds for a yt-dlp subprocess before it is killed                |
| `ytdlp_compress_target_mb`        | float | `9.5`   | Target file size in MB for the video compression fallback step             |
| `generation_split_min_length`     | int   | `1900`  | Minimum character length before a response is split into multiple messages |
| `generation_split_delay_base`     | float | `0.5`   | Base delay in seconds between sending message segments                     |
| `generation_split_delay_per_char` | float | `0.001` | Additional delay added per character in each segment                       |
| `generation_split_delay_max`      | float | `3.0`   | Maximum delay in seconds between any two message segments                  |
| `generation_rate_limit`           | float | `1.0`   | Minimum seconds between AI generation calls                                |

## Notes on Specific Keys

* **`generation_rate_limit`** — Increase this on free-tier AI provider plans to avoid rate limit errors. The default of `1.0` works well for most paid tiers. Example: `/config set generation_rate_limit 3.0`.
* **`ytdlp_compress_target_mb`** — Keep this below Discord's upload limit (10 MB for free servers). Reduce it if you're seeing file-too-large errors after compression. Example: `/config set ytdlp_compress_target_mb 8.0`.
* **`mvsep_poll_timeout`** — Increase this for very long audio files if the bot times out before MVSEP finishes the separation job. Example: `/config set mvsep_poll_timeout 600`.
* **`generation_split_min_length`** — If the AI produces very long responses and you want them split into smaller chunks earlier, reduce this value. Example: `/config set generation_split_min_length 1500`.

## config.json Managed Fields

Beyond the `/config` keys above, `config.json` also stores bot state that other commands manage. You don't edit these directly — use the Discord commands listed below.

| Key                          | Set by                                                         |
| :--------------------------- | :------------------------------------------------------------- |
| `prefix`                     | `~prefix <symbol>`                                             |
| `chat_channel_id`            | `/setchannel`                                                  |
| `conversation_response_mode` | `/chatmode <all/mentions/smart>`                               |
| `autonomy`                   | `/autonomy on` / `/autonomy off`                               |
| `autonomy_frequency`         | `/autonomy frequency <low/default/high>`                       |
| `model_name`                 | `/model set <name>`                                            |
| `provider`                   | `/provider set <name>`                                         |
| `timezone`                   | `/settimezone <timezone>`                                      |
| `enabled_modules`            | `/module enable <name>` / `/module disable <name>`             |
| `whitelist_bot_ids`          | `/botwhitelist add <bot_id>` / `/botwhitelist remove <bot_id>` |
| `rss_feeds`                  | `/rss add <name> <url>` / `/rss remove <name>`                 |

<Note>
  `config.json` is loaded fresh on every command call to avoid stale state across module reloads. Do not edit it manually while the bot is running — use the Discord commands above so changes are validated and applied cleanly.
</Note>
