Files
60f9f4fecf fix(dify-agent): align Dify conversation owner with group context mode (LANG-623) (#3119)
Dify binds a conversation to the end user that created it. DifyAgent sent
the sender as `user` but stored one `external.conversation_id` per LangBot
conversation, so in a group sharing context the second sender reused the
first sender's conversation and Dify answered 404 "Conversation Not Exists".

- Group sharing context (Host session_id `group_<id>`): use the group
  session as provider user so all members continue one Dify conversation.
- Per-member group context (`groupmember_...`) and private chats: sender.
- Keep Dify conversation ids per provider user (hashed, bounded) and retry
  once with a new conversation when a stored id is reported as not found
  (state from older versions, runs without a Host session id).

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
2026-11-20 23:55:59 +08:00
..