{"record":{"id":"0df54b92634a3682","repo":"microsoft/autogen","slug":"the-method-or-operation-is-not-implemented-0df54b","errorCode":null,"errorMessage":"The method or operation is not implemented.","messagePattern":"The method or operation is not implemented\\.","errorType":"exception","errorClass":"NotImplementedException","httpStatus":null,"severity":"error","filePath":"dotnet/src/AutoGen.SemanticKernel/Middleware/SemanticKernelChatMessageContentConnector.cs","lineNumber":139,"sourceCode":"                return ProcessMessageForSelf(m);\n            }\n            else\n            {\n                return ProcessMessageForOthers(m);\n            }\n        });\n    }\n\n    private IEnumerable<ChatMessageContent> ProcessMessageForSelf(IMessage message)\n    {\n        return message switch\n        {\n            TextMessage textMessage => ProcessMessageForSelf(textMessage),\n            MultiModalMessage multiModalMessage => ProcessMessageForSelf(multiModalMessage),\n#pragma warning disable CS0618 // deprecated\n            Message m => ProcessMessageForSelf(m),\n#pragma warning restore CS0618 // deprecated\n            _ => throw new System.NotImplementedException(),\n        };\n    }\n\n    private IEnumerable<ChatMessageContent> ProcessMessageForOthers(IMessage message)\n    {\n        return message switch\n        {\n            TextMessage textMessage => ProcessMessageForOthers(textMessage),\n            MultiModalMessage multiModalMessage => ProcessMessageForOthers(multiModalMessage),\n            ImageMessage imageMessage => ProcessMessageForOthers(imageMessage),\n#pragma warning disable CS0618 // deprecated\n            Message m => ProcessMessageForOthers(m),\n#pragma warning restore CS0618 // deprecated\n            _ => throw new InvalidOperationException(\"unsupported message type, only support TextMessage, ImageMessage, MultiModalMessage and Message.\"),\n        };\n    }\n\n    private IEnumerable<ChatMessageContent> ProcessMessageForSelf(TextMessage message)","sourceCodeStart":121,"sourceCodeEnd":157,"githubUrl":"https://github.com/microsoft/autogen/blob/027ecf0a379bcc1d09956d46d12d44a3ad9cee14/dotnet/src/AutoGen.SemanticKernel/Middleware/SemanticKernelChatMessageContentConnector.cs#L121-L157","documentation":"ProcessMessageForSelf converts messages authored by the agent itself into SK ChatMessageContent. It handles TextMessage, MultiModalMessage, and the deprecated Message type; anything else — ImageMessage, ToolCallMessage, ToolCallResultMessage, AggregateMessage, custom types — falls through to NotImplementedException.","triggerScenarios":"Replaying a conversation history to the same SK agent where the history contains a message type outside the three supported kinds, e.g. the agent's own ImageMessage or an AggregateMessage of tool calls.","commonSituations":"Group-chat histories replayed to SK agents; persisting and restoring conversations that include tool-call aggregates or images.","solutions":["Filter history to TextMessage/MultiModalMessage (from self) before sending to the SK agent.","Serialize unsupported self-authored messages into a TextMessage summary before replay.","Handle ToolCallMessage/AggregateMessage pairs with a dedicated tool-call connector instead of the plain chat content connector.","Update AutoGen — newer connectors added arms for additional message kinds."],"exampleFix":"// before\nawait skAgent.SendAsync(fullGroupChatHistory); // contains ToolCallMessage from self\n\n// after\nvar safe = fullGroupChatHistory.Where(m => m is TextMessage or MultiModalMessage or Message);\nawait skAgent.SendAsync(safe);","handlingStrategy":"type-guard","validationCode":"var skSafeSelf = history.Where(m => m is TextMessage or MultiModalMessage or Message).ToList();","typeGuard":"static bool IsSupportedSelfMessage(IMessage m) => m is TextMessage or MultiModalMessage or Message;","tryCatchPattern":"catch (NotImplementedException) when (processingSelfMessages)\n{\n    logger.LogError(\"Unsupported self-authored message type {Type} for SK agent\", m.GetType().Name);\n    throw;\n}","preventionTips":["Normalize conversation history per-connector before replay.","Keep group-chat broadcast logic per agent: filter each agent's own unsupported message kinds."],"tags":["semantic-kernel","message-connector","history-replay","autogen","csharp"],"backgroundTag":null,"analyzedSha":"027ecf0a379bcc1d09956d46d12d44a3ad9cee14","analyzedAt":"2026-08-15T03:38:00.719Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}