Skip to content

.Net: The message could not be added to the thread due to an error response from the service. #12472

Open
@karthiksimplist

Description

@karthiksimplist

Why we would get this error and how to handle this?

Message: The message could not be added to the thread due to an error response from the service.
Stack: 
   at Microsoft.SemanticKernel.Agents.AzureAI.AzureAIAgentThread.OnNewMessageInternalAsync(ChatMessageContent newMessage, CancellationToken cancellationToken)
   at Microsoft.SemanticKernel.Agents.AgentThread.OnNewMessageAsync(ChatMessageContent newMessage, CancellationToken cancellationToken)
   at Microsoft.SemanticKernel.Agents.Agent.EnsureThreadExistsWithMessagesAsync[TThreadType](ICollection`1 messages, AgentThread thread, Func`1 constructThread, CancellationToken cancellationToken)
   at Microsoft.SemanticKernel.Agents.AzureAI.AzureAIAgent.InvokeStreamingAsync(ICollection`1 messages, AgentThread thread, AzureAIAgentInvokeOptions options, CancellationToken cancellationToken)+MoveNext()
   at Microsoft.SemanticKernel.Agents.AzureAI.AzureAIAgent.InvokeStreamingAsync(ICollection`1 messages, AgentThread thread, AzureAIAgentInvokeOptions options, CancellationToken cancellationToken)+System.Threading.Tasks.Sources.IValueTaskSource.GetResult()

Metadata

Metadata

Assignees

Labels

.NETIssue or Pull requests regarding .NET codeagents

Type

No type

Projects

Status

Bug

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions