Multiple Similar Messages in Single ResponsesAPI Response

Overview

When implementing a conversational bot using the ResponsesAPI, we’ve identified a phenomenon where a single API request returns multiple message items with identical or very similar content. This duplication or similarity of messages in responses negatively impacts the user experience.

Steps to Reproduce

  1. Use the gpt-4.5-preview model to call the ResponsesAPI
  2. Send a normal conversation request

Observed Behavior

A single API call response may contain multiple message objects with similar but slightly different content.

Example of Similar Messages

{
    "output": [
        {
            "id": "msg_abc123",
            "type": "message",
            "role": "assistant",
            "content": [
                {
                    "type": "output_text",
                    "text": "Climate change refers to long-term shifts in the Earth's climate system. The main cause is greenhouse gas emissions from burning fossil fuels. This leads to an increase in the Earth's average temperature, resulting in sea level rise and more frequent extreme weather events."
                }
            ]
        },
        {
            "id": "msg_def456",
            "type": "message",
            "role": "assistant",
            "content": [
                {
                    "type": "output_text",
                    "text": "Climate change refers to long-term alterations in Earth's climate patterns. Human activities that produce greenhouse gases are the primary cause, resulting in global warming, rising sea levels, and increased extreme weather events. Solutions include transitioning to renewable energy and promoting energy efficiency."
                }
            ]
        }
    ]
}

Issues

  1. Multiple messages with similar content on the same topic may be returned
  2. Depending on implementation, this could lead to confusing content being concatenated and displayed to the user
  3. It’s difficult to determine whether these are intentional rephrasing or system-generated duplications
  4. The ResponsesAPI documentation does not mention this behavior of returning multiple similar messages

Expected Behavior

  1. A single API request should provide a consistent, single response
  2. If multiple messages are returned, each message should have a clearly different role or purpose
  3. Clear explanation of the conditions under which similar messages occur and the reason for this behavior

I would appreciate information on whether this similar message phenomenon is an intentional design or a bug, and any details on future handling of this issue.

3 Likes

I’m seeing this too, with the responses API and o4-mini. My current workaround is to:

(a) ignore all but the first message output, and
(b) ignore message outputs if there is also a function_call output (this isn’t mentioned in @IM-TRB6’s post, but I suspect it’s related — I see the model respond with a message and a function_call; my code responds with a function_call_result, and the model responds with the same message again, even though the first message is already in the history)

I’d love to know whether this is a bug known to OpenAI.

1 Like

Hey @mhjacobson and @IM-TRB6 – Steve here from the API engineering team. Can you confirm if this is still occurring, and if so, if you have a short repro you can provide?

Thank you for letting us know!

It would not be reproducible exactly - you guys shut the gpt-4.5 model off.

Here’s a forum topic to follow up on, along with others on the forum with similar symptom of also repeating structured outputs where the JSON restarts.

Seems it is an issue with the model not emitting the correct stop sequence token, or the API endpoint not catching it correctly, as it seems symptomatic on the Responses endpoint.

Hi @stevecoffey this is still happening for me and I have logs and everything ready if you want to take a look. We are observing this quite frequently.

My team is also seeing this behavior, and spun our wheels for days trying to diagnose. Since we are managing our own conversation state, we were thinking of switching back to the Completions API.

Hi @Milan7 and @dannymac, thanks again for reporting this. I believe we have a fix for this now. To be cautious, we’re first rolling it out to a small set of customers so we can measure the impact before a broader release.

If you’d like early access and can help us validate the fix, just send me a message and I’ll add you to the test group.

Thanks for your patience and support!

2 Likes

Hey @jasondouglas , we’ve also been experiencing this issue. Almost 1 out of every 20 of our responses in the last 48 hours have had duplicate/similar output text within the same response.

Could we be opted in to the fix as well? happy to followup wherever is appropriate with details

Thanks!