---
type: email
from: Wen-Tien Chang <notifications@github.com>
subject: Re: [openai/openai-agents-python] Tool Call doesn't work when using

 Structured Outputs (Issue #1778)
received: 2026-03-06 07:39:57
date_header: Sun, 21 Sep 2025 09:12:14 -0700
priority: normal
status: awaiting_approval
uid: 30919
---

## Email Content

**From:** Wen-Tien Chang <notifications@github.com>
**Subject:** Re: [openai/openai-agents-python] Tool Call doesn't work when using

 Structured Outputs (Issue #1778)
**Date:** Sun, 21 Sep 2025 09:12:14 -0700

### Body (preview)

ihower left a comment (openai/openai-agents-python#1778)





Google ADK works here only because they implemented a special hack, not because the model itself supports this behavior.

See: [https://github.com/google/adk-python/commit/af635674b5d3c128cf21737056e091646283aeb7](https://github.com/google/adk-python/commit/af635674b5d3c128cf21737056e091646283aeb7)



In ADK, when `output_schema` and tools are both present, they temporarily remove the `output_schema` so function calling can still work. Then they inject a prompt like:



```

IMPORTANT: You have access to other tools, but you must provide 

your final response using the set_model_response tool with the 

required structured format. After using any other tools needed 

to complete the task, always call set_model_response with your 

final answer in the specified schema format.

```



The purpose is to **force the model** to call a built-in tool (`set_model_response`) to *simulate* structured outputs.



I personally don’t like this kind of hack: adding function calling and injecting prompts under the hood feels too opaque. 



-- 

Reply to this email directly or view it on GitHub:

https://github.com/openai/openai-agents-python/issues/1778#issuecomment-3316092585

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



Message ID: <openai/openai-agents-python/issues/1778/3316092585@github.com>

---

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