Skip to content

Proposal: channel-native /model alias resolution and Feishu channel support #285

Description

@chsimonpan

We have been using ORG2 through external chat channels and found a few integration gaps that are worth upstreaming as a cohesive channel-layer improvement.

1. Channel /model should resolve aliases to the actual routed model id

In a channel context, users naturally type commands such as:

/model fable
/model gpt-5.5
/model sonnet

The channel handler should resolve those aliases the same way the rest of the app does, then persist/report the canonical routed model id (including provider/vendor slug when needed). Otherwise channel sessions can display one model, route another, or fail to map the command to a configured provider.

Implementation notes from our fork:

  • c50ff795fix: handle channel model slash command
    • adds /model handling in channel slash flow
  • b8a6204cfix(agent-core): resolve channel model aliases to routed ids
    • normalizes aliases and chooses best candidate from available routed models
    • updates status-bar/reporting to show the resolved model consistently

This matters especially for provider-router setups where gpt-5.5 may map to openai/gpt-5.5:openai, or where Anthropic models require a vendor suffix for cache behavior.

2. Feishu / Lark channel support

We also added a Feishu channel integration for daily dogfooding. The useful pieces were:

  • event parsing for Feishu direct/group messages
  • media/image/file handling
  • typing/reaction preservation across reinjection
  • channel dispatch stability for external chat sessions
  • channel session restoration in the sidebar/session loader

Relevant fork commits:

  • a6562f6dfix(feishu): handle media and typing reactions
  • 3bf7a401fix(feishu): preserve typing reaction across reinject
  • 3121ebbdfix(channel): stabilize Feishu sessions and 150 dev runtime

Main touched areas:

  • src-tauri/crates/agent-core/src/integrations/channels/feishu/*
  • src-tauri/crates/agent-core/src/state/commands/channel_handler/*
  • src-tauri/crates/agent-core/src/integrations/gateway/*
  • session/sidebar restoration code for channel-backed sessions

Suggested split

This is probably best split into smaller upstream PRs:

  1. Channel /model command + alias-to-routed-model resolution.
  2. Feishu channel event parsing and send API.
  3. Feishu media/typing reactions.
  4. Channel session restoration/sidebar stability.

Happy to break out the clean pieces into PRs if Feishu/Lark support is in scope.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions