LLM (Large Language Model) integration is fully optional. Without a key the script works normally with fuzzy matching. With a key, two additional capabilities unlock.
| Config Option | What it Does |
|---|---|
Config.LLM.enableMatchingLLM | Tier 4 fallback — when all fuzzy matching fails, LLM attempts to interpret the player's intent |
Config.LLM.enableAddonLLM | Allows addons (e.g. Ambient NPC) to generate unique AI-powered responses |
Config.LLM.prioritizeMatchingLLM | Runs LLM matching first, before fuzzy tiers (not recommended for most servers) |
These options are set in shared/config.lua but only activate if a valid LLM key is registered at startup.
Groq is the recommended LLM provider. It has a free tier and low latency. If you already set stt_api_key with stt_provider "groq", the same key is automatically reused for LLM — no separate llm_api_key is needed.
Create a free account at console.groq.com and generate an API key.
set llm_api_key "your_groq_api_key_here" set llm_provider "groq" ensure [onex]
Config.LLM = { enableAddonLLM = true, enableMatchingLLM = true, prioritizeMatchingLLM = false, matchingMode = "fallback", -- "fallback" | "parallel" }
If you use Groq for STT, the same key is automatically reused for LLM. You do not need to set both stt_api_key and llm_api_key when both point to Groq.
Priority chain for LLM key resolution:
llm_api_key (explicit, any provider)groq_api_key (deprecated fallback)stt_api_key when stt_provider = "groq" (automatic reuse)| Field | Default | Description |
|---|---|---|
enableAddonLLM | true | Allow addons (ambient_npc, etc.) to use LLM for responses |
enableMatchingLLM | true | Allow Tier 4 LLM matching when fuzzy matching fails |
prioritizeMatchingLLM | false | Run LLM matching first, before Tiers 1–3 |
matchingMode | "fallback" | "fallback" — LLM only when other tiers fail; "parallel" — LLM runs alongside |
After restarting the server with a key configured, check the server console. A successful registration logs a 200 response with a provider confirmation. Common errors:
| Response | Cause |
|---|---|
200 | Key valid and registered |
401 | Key rejected — verify no leading/trailing spaces |
0 / timeout | No internet or backend unreachable |
Never share or commit your API keys to version control. Set them as convars in server.cfg and ensure that file is excluded from any public repositories.
groq_api_key is deprecated. It still works as an LLM fallback but will be removed in a future version. Migrate to llm_api_key + llm_provider "groq".
Last updated about 1 month ago