---
type: email
from: Deniz Özdemirli  <notifications@github.com>
subject: Re: [openai/openai-agents-python] openai.BadRequestError with

 gpt-oss-120b - Expected 2 output messages (reasoning and final), but got 3.

 (Issue #1468)
received: 2026-03-05 10:09:55
date_header: Mon, 18 Aug 2025 05:44:33 -0700
priority: normal
status: awaiting_approval
uid: 27945
---

## Email Content

**From:** Deniz Özdemirli  <notifications@github.com>
**Subject:** Re: [openai/openai-agents-python] openai.BadRequestError with

 gpt-oss-120b - Expected 2 output messages (reasoning and final), but got 3.

 (Issue #1468)
**Date:** Mon, 18 Aug 2025 05:44:33 -0700

### Body (preview)

02deno left a comment (openai/openai-agents-python#1468)



Can you tell me exactly which file you have changed? There are multiple _fetch_response functions defined. I believe in my code another one is being called. This one in line 215 in **openai_chatcompletions.py** :     



```

async def _fetch_response(

        self,

        system_instructions: str | None,

        input: str | list[TResponseInputItem],

        model_settings: ModelSettings,

        tools: list[Tool],

        output_schema: AgentOutputSchemaBase | None,

        handoffs: list[Handoff],

        span: Span[GenerationSpanData],

        tracing: ModelTracing,

        stream: bool = False,

        prompt: ResponsePromptParam | None = None,

    ) -> ChatCompletion | tuple[Response, AsyncStream[ChatCompletionChunk]]:

        converted_messages = Converter.items_to_messages(input)

        print(f"CONVERTED MESSAGES : {converted_messages}")

```



-- 

Reply to this email directly or view it on GitHub:

https://github.com/openai/openai-agents-python/issues/1468#issuecomment-3196609578

You are receiving this because you are subscribed to this thread.



Message ID: <openai/openai-agents-python/issues/1468/3196609578@github.com>

---

## Suggested Actions
- [ ] Reply
- [ ] Archive
- [ ] Escalate
