Repository navigation
Closed
Labels
complexity-lowComplexity: low (board points 1-3)priority-p2Importanttheme-channelsTheme: Channelstype-featureNew functionality
Description
Summary
Add a per-agent setting in the Sharing UI to select which Claude model is used for all public-facing channels (public chat link, Slack, Telegram, WhatsApp). Today public chats always use the platform-wide default model with no per-agent override available to agent owners.
Context
Currently the model resolution for public chats is:
routers/public.py:610-618callstask_execution_service.execute_task()withmodel=Noneservices/task_execution_service.py:286-287falls back tosettings_service.get_platform_default_model()services/settings_service.py:233-247readssystem_settings.platform_default_model(hardcoded fallbackclaude-sonnet-4-6)
This means:
- The only knob is platform-wide (admin-only).
- Agent owners cannot opt their public-facing agent into a cheaper model (Haiku) for cost control or a more capable model (Opus) for quality on a per-agent basis.
- The same problem applies to Slack/Telegram/WhatsApp adapter messages routed through
adapters/message_router.py, which currently inherits the same default.
Sharing is the natural home for this setting — it already governs how external users reach the agent (sharing list, public link, channel bindings, access policy).
Acceptance Criteria
- New column on
agent_ownership(e.g.public_channel_model TEXT NULL) — NULL means inherit platform default. -
GET /api/agents/{name}/public-channel-modelreturns the resolved value + whether it is overridden. -
PUT /api/agents/{name}/public-channel-modelallows owner/admin to set or clear the override; validates against a known model whitelist (Opus 4.7, Sonnet 4.6, Haiku 4.5). -
routers/public.pyandadapters/message_router.pyresolve model in this order: per-agent override → platform default → hardcoded fallback. - Sharing tab in
AgentDetail.vuegains a model selector with three options + "Use platform default". - Audit log entry written when override is changed (event_type
agent_lifecycle, actionupdate_public_model). - Existing scheduler-triggered runs (which already have their own
agent_schedules.modelper-schedule column) are unaffected.
Technical Notes
- Three surfaces to update (Architectural Invariant Setup improvements #5/feat: SMARTS trading pipeline with Telegram notifications and Miro visualization #13): backend router + service, frontend Pinia store + Sharing view, and probably a new MCP tool is not required (this is owner-facing config, not agent-callable).
- Model whitelist should live in one place — consider extending
settings_servicewith ais_valid_model()helper rather than duplicating the list. - Keep the column NULL-default so this is a purely additive migration; no backfill needed.
- Worth a brief look at whether
agent_schedules.modeland this new field should share validation logic.
Metadata
Metadata
Assignees
Labels
complexity-lowComplexity: low (board points 1-3)priority-p2Importanttheme-channelsTheme: Channelstype-featureNew functionality
Activity
dolho commentedon Jun 29, 2026
/claim
github-actions commentedon Jun 29, 2026
Claimed by @dolho. Label
status-in-progressadded.Next steps:
feature/894-<short-slug>Fixes #894feat(channels): per-agent public-channel model override (#1375)
11 remaining items
docs(flows): the model-choice flow answers the standard sections (Abi…
docs(workspace): requirements for the Workspace model dropdown (Abili…
feat(models): the Workspace curation is a policy dimension on the ONE…
feat(workspace): the backend half of the model dropdown — payload, la…
test(workspace): the model dropdown's guards (Abilityai/trinity-enter…
fix(workspace): the model ladder resolves to a concrete id, and the 4…
docs(flows): the model-choice flow answers the standard sections (Abi…
docs(workspace): requirements for the Workspace model dropdown (Abili…
feat(models): the Workspace curation is a policy dimension on the ONE…
test(workspace): the model dropdown's guards (Abilityai/trinity-enter…
fix(workspace): the model ladder resolves to a concrete id, and the 4…
docs(flows): the model-choice flow answers the standard sections (Abi…
docs(requirements): the model-dropdown section takes a free number (A…
feat(workspace): a user-friendly model dropdown in the chat composer (A…
refactor: split the four remaining oversized backend modules (#1028) (#…