Skip to content

.NET : Unable to supply metadata to OpenAI ChatClients #2376

@MD-V

Description

@MD-V

Since PR #1984 the HostedAgentResponseExecutor expects either agent.name or metadata["entity_id"] to be sent by the requesting client.

Unfortunately this breaks the AgentWebChat (for all OpenAI clients - also the A2A is not working but I don't know if this is related)

Image

The current IChatClient abstractions of OpenAI.ChatClient and OpenAIResponseClient don't allow passing either an Agent nor metadata.

More notes:

  • OpenAI.ChatClient allows metadata via the OpenAI.Chat.ChatClientOptions parameter in the GetChatCompletionAsync method
  • OpenAI.ChatClient allows metadata via the OpenAI.Responses.ResponseCreationOptions parameter in the CreateResponseStreamingAsync method

I currently see two possible solutions:

  • Roll back the requirement for agent.name or metadata["entity_id"]
  • MEAI has to add support so that we can pass metadata via the IChatClient abstractions

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions