Skip to content

Conversation

@jurepurgar
Copy link

Motivation and Context

When invoking OpenAIReponsesAgent with existing chat history that contains assistant messages the call fails with following error:

HTTP 400 (invalid_request_error: invalid_value)
Parameter: input[1].content[0]
Invalid value: 'input_text'. Supported values are: 'output_text' and 'refusal'.

The root cause of the issue is that all messages are eventually converted to InputTextPart but assistant messages have to be converted to OutputTextPart.

Description

Added isOutput parameter to ToResponseContentPart. Added test that fails before change and works after the change.

@jurepurgar jurepurgar requested a review from a team as a code owner December 22, 2025 09:36
@moonbox3 moonbox3 added .NET Issue or Pull requests regarding .NET code kernel Issues or pull requests impacting the core kernel labels Dec 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kernel Issues or pull requests impacting the core kernel .NET Issue or Pull requests regarding .NET code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants