Skip to content

Channels: add thread-aware model overrides#22315

Merged
thewilloftheshadow merged 2 commits intomainfrom
shadow/channel-model-overrides
Feb 21, 2026
Merged

Channels: add thread-aware model overrides#22315
thewilloftheshadow merged 2 commits intomainfrom
shadow/channel-model-overrides

Conversation

@thewilloftheshadow
Copy link
Member

@thewilloftheshadow thewilloftheshadow commented Feb 21, 2026

Greptile Summary

Added thread-aware channel-specific model overrides via channels.modelByChannel configuration. The feature allows pinning specific channels/groups to models while respecting the priority hierarchy: heartbeat model > session override (/model) > channel override > defaults. Thread awareness enables fallback from thread IDs to parent channel IDs when direct matches aren't found, with support for Telegram topic suffixes (:topic:99) and Discord/Slack thread patterns (:thread:456).

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • The implementation is well-structured with comprehensive tests covering parent group ID fallback, topic-specific overrides, and thread-aware matching. The logic correctly prioritizes overrides (heartbeat > session > channel > defaults) and integrates cleanly with existing model selection code. Documentation is thorough and the feature is non-breaking.
  • No files require special attention

Last reviewed commit: 68e7d1c

@openclaw-barnacle openclaw-barnacle bot added docs Improvements or additions to documentation gateway Gateway runtime size: M maintainer Maintainer-authored PR labels Feb 21, 2026
@thewilloftheshadow thewilloftheshadow merged commit f555835 into main Feb 21, 2026
9 checks passed
@thewilloftheshadow thewilloftheshadow deleted the shadow/channel-model-overrides branch February 21, 2026 01:26
@openclaw-barnacle openclaw-barnacle bot added channel: discord Channel integration: discord channel: msteams Channel integration: msteams channel: telegram Channel integration: telegram channel: whatsapp-web Channel integration: whatsapp-web docker Docker and sandbox tooling agents Agent runtime and tooling size: XL and removed size: M labels Feb 21, 2026
tiagocampo added a commit to tiagocampo/openclaw that referenced this pull request Feb 22, 2026
The validator was rejecting modelByChannel as an 'unknown channel id'
because it only allowed actual channel IDs (telegram, whatsapp, etc.)
and 'defaults' in the channels object.

modelByChannel is a config property (PR openclaw#22315) that maps channel IDs
to model overrides, not a channel itself.

Fixes openclaw#23146
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling channel: discord Channel integration: discord channel: msteams Channel integration: msteams channel: telegram Channel integration: telegram channel: whatsapp-web Channel integration: whatsapp-web docker Docker and sandbox tooling docs Improvements or additions to documentation gateway Gateway runtime maintainer Maintainer-authored PR size: XL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant