---
type: email
from: Moses Hu <notifications@github.com>
subject: [openai/openai-agents-python] Gemini 2.5 does not work well with

 function call (Issue #1420)
received: 2026-03-05 10:01:13
date_header: Mon, 11 Aug 2025 04:10:00 -0700
priority: normal
status: awaiting_approval
uid: 27160
---

## Email Content

**From:** Moses Hu <notifications@github.com>
**Subject:** [openai/openai-agents-python] Gemini 2.5 does not work well with

 function call (Issue #1420)
**Date:** Mon, 11 Aug 2025 04:10:00 -0700

### Body (preview)

moseshu created an issue (openai/openai-agents-python#1420)



### Please read this first



- **Have you read the docs?**[Agents SDK docs](https://openai.github.io/openai-agents-python/)

- **Have you searched for related issues?** Others may have had similar requests



### Question

Gemini 2.5 does not work well with function call



```

self.npc_agent = Agent[WorldState](

            name="NPC Agent",

            tools=self.bound_tools,

            model=OpenAIChatCompletionsModel(model="gemini-2.5-pro",

                                             openai_client=gemini_client),

            instructions=npc_instructions,

            hooks=CustomAgentHooks("NPC agent")

        )



response =  Runner.run_streamed(self.npc_agent, input=messages,context=self.world_state)

            #logger.info(f"result：{response.final_output}")

            # 3. Process NPC response

            async for event in response.stream_events():

                logger.info(f"event===:{event}")

                if event.type == "raw_response_event" and isinstance(event.data, ResponseTextDeltaEvent):

                    yield self._text_yield_stream(text=event.data.delta)

                    #logger.info(f"chunk====:{event.data.delta}")

                elif event.type == "run_item_stream_event":

                    if event.item.type == "tool_call_item":

                        logger.info(f"-- Tool was called:{event.item}")

                    elif event.item.type == "tool_call_output_item":

                        logger.info(f"----\n{event.item.output}\n------")

                    elif event.item.type == "message_output_item":

                        logger.info(f"-- Message output1:\n {ItemHelpers.text_message_output(event.item)}")



```



```

user: Hi

logs: 

event===:AgentUpdatedStreamEvent(new_agent=Agent(name='NPC Agent'

 ### (NPC agent) 1: Agent NPC Agent started

event===

....



Message output1:

Maya: Welcome to the NexusTech mixer! I'm Maya, the even

---

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