Channel-Specific Context
7.3. Channel-Specific Context — Per-Channel Context
Per-channel/thread overrides on gateway messaging
On platforms such as Discord and Slack, each channel or thread can have its own model and system prompt, declared in channel_overrides:
# ~/.hermes/gateway-config.yaml
platforms:
discord:
channel_overrides:
"123456789":
model: "anthropic/claude-opus-4"
system_prompt: "You are supporting the #support channel; prioritize short, concise answers."
All three keys (model, system_prompt, and related fields) are optional — you can set just one of them, and the rest fall back to the global defaults automatically.
Lookup order — specific first, general after
Lookup goes by the exact channel/thread ID first, and only if not found does it climb up to the parent channel/forum — meaning threads in Discord automatically inherit the parent channel’s override without re-declaring it.
Priority order when there is a conflict
For the model: in-session /model override → channel_overrides → global configuration. A user typing /model in chat still beats the channel’s default configuration — the user’s immediate decision always gets the highest respect.
For system_prompt: this override replaces the global gateway prompt for that channel entirely — and importantly, it is not stored in history, only inserted per turn (ephemeral), so it does not bloat the cache like a regular context file would.
Notes
- Use channel overrides when one bot serves different purposes on different channels (e.g. #support needs brevity, #research needs a stronger model) — instead of running separate profiles/bots for each purpose.
- Since overrides are applied by specific channel/thread ID, remember to update the configuration when a channel is archived/recreated — a new ID will not automatically inherit the old override.
- Combine with
/modelto quickly test a channel override before committing it to the officialgateway-config.yaml— avoid repeatedly editing the config file and hot-reloading just to experiment.