{"record":{"id":"1a2e28cf0c0374de","repo":"microsoft/autogen","slug":"the-group-topic-type-must-not-be-in-the-participan","errorCode":null,"errorMessage":"The group topic type must not be in the participant topic types.","messagePattern":"The group topic type must not be in the participant topic types\\.","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"python/packages/autogen-agentchat/src/autogen_agentchat/teams/_group_chat/_base_group_chat_manager.py","lineNumber":68,"sourceCode":"    ):\n        super().__init__(\n            description=\"Group chat manager\",\n            sequential_message_types=[\n                GroupChatStart,\n                GroupChatAgentResponse,\n                GroupChatTeamResponse,\n                GroupChatMessage,\n                GroupChatReset,\n            ],\n        )\n        if max_turns is not None and max_turns <= 0:\n            raise ValueError(\"The maximum number of turns must be greater than 0.\")\n        if len(participant_topic_types) != len(participant_descriptions):\n            raise ValueError(\"The number of participant topic types, agent types, and descriptions must be the same.\")\n        if len(set(participant_topic_types)) != len(participant_topic_types):\n            raise ValueError(\"The participant topic types must be unique.\")\n        if group_topic_type in participant_topic_types:\n            raise ValueError(\"The group topic type must not be in the participant topic types.\")\n        self._name = name\n        self._group_topic_type = group_topic_type\n        self._output_topic_type = output_topic_type\n        self._participant_names = participant_names\n        self._participant_name_to_topic_type = {\n            name: topic_type for name, topic_type in zip(participant_names, participant_topic_types, strict=True)\n        }\n        self._participant_descriptions = participant_descriptions\n        self._message_thread: List[BaseAgentEvent | BaseChatMessage] = []\n        self._output_message_queue = output_message_queue\n        self._termination_condition = termination_condition\n        self._max_turns = max_turns\n        self._current_turn = 0\n        self._message_factory = message_factory\n        self._emit_team_events = emit_team_events\n        self._active_speakers: List[str] = []\n\n    @rpc","sourceCodeStart":50,"sourceCodeEnd":86,"githubUrl":"https://github.com/microsoft/autogen/blob/027ecf0a379bcc1d09956d46d12d44a3ad9cee14/python/packages/autogen-agentchat/src/autogen_agentchat/teams/_group_chat/_base_group_chat_manager.py#L50-L86","documentation":"Thrown by the BaseGroupChatManager constructor when the group topic type (the broadcast channel used by the orchestrator) collides with one of the participant topic types. The group topic must be reserved for manager<->container traffic; if a participant uses the same identifier, messages intended for the group would be routed to that participant, so construction is rejected.","triggerScenarios":"Passing group_topic_type equal to one of the participant topic types / participant names when constructing the manager or a team that exposes group_topic_type; naming an agent so that its derived topic type equals the team's group topic string (typically the team name).","commonSituations":"Manually setting group_topic_type to a 'friendly' value that happens to match an agent name; building multiple teams over a shared runtime and reusing topic strings; custom orchestration code that constructs BaseGroupChatManager subclasses directly.","solutions":["Rename the colliding participant (or the group_topic_type) so the group channel identifier is distinct from all participant names/topic types.","Leave group_topic_type at its auto-generated default unless you specifically need a fixed value.","When constructing the manager directly, verify group_topic_type not in participant_topic_types before the call."],"exampleFix":"// before\nmanager = MyGroupChatManager(\n    group_topic_type=\"team\",\n    participant_topic_types=[\"team\", \"agent2\"],  # 'team' collides\n    ...)\n\n// after\nmanager = MyGroupChatManager(\n    group_topic_type=\"group_chat_topic\",\n    participant_topic_types=[\"team\", \"agent2\"],\n    ...)","handlingStrategy":"validation","validationCode":"if group_topic_type and group_topic_type in {a.name for a in participants}:\n    raise ValueError(\"group_topic_type collides with a participant name\")\nteam = SelectorGroupChat(participants, group_topic_type=group_topic_type)","typeGuard":"def topic_types_are_disjoint(group_topic_type: str, participant_topic_types: list[str]) -> bool:\n    return group_topic_type not in set(participant_topic_types)","tryCatchPattern":null,"preventionTips":["Leave group_topic_type at its auto-generated default unless sharing a runtime requires a fixed value.","Namespace explicit topic strings with a prefix (e.g. 'group:main') that agents never use.","Centralize topic naming in one constants module."],"tags":["group-chat","configuration","topics","validation"],"backgroundTag":null,"analyzedSha":"027ecf0a379bcc1d09956d46d12d44a3ad9cee14","analyzedAt":"2026-08-15T03:38:00.719Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}