Skip to content

Preserve refusals in OpenAI Chat Generators #13255

Description

@anakin87

Currently, both OpenAIChatGenerator and OpenAIResponsesChatGenerator do not preserve refusals from the API.

We should preserve this information in ChatMessage.

At the moment, this field is only handled in to_openai_dict_format/from_openai_dict_format (the latter is not used in Chat Generators). When we do the above work, we might also decide to simplify/remove support for this field from these conversion functions.


👋 Hello there! This issue will be handled internally and isn't open for external contributions. If you'd like to contribute, please take a look at issues labeled contributions welcome or good first issue. We'd really appreciate it!

Activity

  1. self-assigned this
    on Oct 14, 2026
  2. added theissue type on Oct 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

handled internallyHandled by the team, not open for external contributions

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions