Skip to content

Feature: per-channel / per-group / per-DM model override in config #53638

Description

@gandalf-at-lerian

Summary

Allow configuring a model field at the channel, group, and DM level in openclaw.json, so different conversations can use different models without manual runtime overrides.

Current behavior

Model selection granularity is limited to:

  • Global default (agents.defaults.model.primary) — applies to all new sessions
  • Per-session runtime override (/model or session_status(model=...)) — ephemeral, does not persist across session resets
  • Per-cron — each cron job declares its own model

There is no way to pin a model to a specific channel, group, or DM in config.

Desired behavior

Add an optional model field to the per-target config schemas:

WhatsApp

  • channels.whatsapp.groups.<group-id>.model — per-group override
  • channels.whatsapp.dms.<phone>.model — per-DM override
  • (optional) channels.whatsapp.model — channel-wide default for all WhatsApp sessions

Slack

  • channels.slack.channels.<channel-id>.model — per-channel override
  • (optional) channels.slack.model — channel-wide default for all Slack sessions

Resolution order (proposed)

  1. Per-target override (group/DM/channel-specific)
  2. Channel-wide default (channels.<provider>.model)
  3. Global default (agents.defaults.model.primary)

Use cases

  1. Cost control: Use a cheaper model (Haiku/Sonnet) for high-traffic group chats while keeping Opus for owner DMs
  2. Quality tiering: Pin critical business channels to the strongest model, casual groups to a lighter one
  3. Testing: Try a new model on a single channel before rolling it out globally
  4. Team separation: Different teams get different models based on their channel

Context

Currently running 35+ sessions across WhatsApp DMs, WhatsApp groups, Slack channels, and Slack threads. All inherit the global default unless manually overridden at runtime. The override does not survive session resets, making it impractical for persistent per-context model selection.

Environment

  • OpenClaw 2026.3.13
  • Channels: WhatsApp + Slack
  • Config schemas inspected: channels.whatsapp.groups.*, channels.whatsapp.dms.*, channels.slack.channels.* — none have a model field today

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Normal backlog priority with limited blast radius.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions