{"record":{"id":"fdf3a99b60e7cadd","repo":"microsoft/autogen","slug":"invalid-streaming-message-type-reply-gettype-na","errorCode":null,"errorMessage":"Invalid streaming message type {reply.GetType().Name}","messagePattern":"Invalid streaming message type (.+?)","errorType":"exception","errorClass":"InvalidOperationException","httpStatus":null,"severity":"error","filePath":"dotnet/src/AutoGen.AzureAIInference/Middleware/AzureAIInferenceChatRequestMessageConnector.cs","lineNumber":81,"sourceCode":"                if (update.Content.FunctionName is string functionName)\n                {\n                    currentToolName = functionName;\n                }\n                else if (update.Content.ToolCallUpdate is StreamingFunctionToolCallUpdate toolCallUpdate && toolCallUpdate.Name is string toolCallName)\n                {\n                    currentToolName = toolCallName;\n                }\n                var postProcessMessage = PostProcessStreamingMessage(update, currentToolName);\n                if (postProcessMessage != null)\n                {\n                    yield return postProcessMessage;\n                }\n            }\n            else\n            {\n                if (this.strictMode)\n                {\n                    throw new InvalidOperationException($\"Invalid streaming message type {reply.GetType().Name}\");\n                }\n                else\n                {\n                    yield return reply;\n                }\n            }\n        }\n    }\n\n    public IMessage PostProcessMessage(IMessage message)\n    {\n        return message switch\n        {\n            IMessage<ChatResponseMessage> m => PostProcessChatResponseMessage(m.Content, m.From),\n            IMessage<ChatCompletions> m => PostProcessChatCompletions(m),\n            _ when strictMode is false => message,\n            _ => throw new InvalidOperationException($\"Invalid return message type {message.GetType().Name}\"),\n        };","sourceCodeStart":63,"sourceCodeEnd":99,"githubUrl":"https://github.com/microsoft/autogen/blob/027ecf0a379bcc1d09956d46d12d44a3ad9cee14/dotnet/src/AutoGen.AzureAIInference/Middleware/AzureAIInferenceChatRequestMessageConnector.cs#L63-L99","documentation":"Error \"Invalid streaming message type {reply.GetType().Name}\" thrown in microsoft/autogen.","triggerScenarios":"Thrown at dotnet/src/AutoGen.AzureAIInference/Middleware/AzureAIInferenceChatRequestMessageConnector.cs:81 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Send only supported streaming update message types"],"exampleFix":"Return TextMessageUpdate or ToolCallMessageUpdate from the streaming pipeline","handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"027ecf0a379bcc1d09956d46d12d44a3ad9cee14","analyzedAt":"2026-08-15T03:38:00.719Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}