Skip to content

.Net: Bug: OpenAiResponseAgent chat message images removed by SK #12888

@shravan2x

Description

@shravan2x

Describe the bug
It appears that SK currently removes any ImageContent in a user message before it's sent to OpenAI. The offending code seems to be this ToResponseItem call. The implementation of this method only retains the main chat string and ignores all items.

Pseudocode:

ChatMessageContent userMessage = new ChatMessageContent(AuthorRole.User, "describe the image");
userMessage.Items.Add(new ImageContent(imageUri));
await foreach (AgentResponseItem<ChatMessageContent> response in agent.InvokeAsync(userMessage))
{
 // ...
}

Platform

  • Language: C#
  • Source: NuGet package version 1.61.0
  • AI model: o3-pro

Metadata

Metadata

Labels

.NETIssue or Pull requests regarding .NET codebugSomething isn't working

Type

Projects

Status

Sprint: Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions