---
type: email
from: Ruskaruma <notifications@github.com>
subject: Re: [openai/openai-agents-python] fix: convert oneOf to anyOf in

 strict schema for OpenAI compatibility (PR #1884)
received: 2026-03-06 08:03:46
date_header: Tue, 14 Oct 2025 06:33:15 -0700
priority: normal
status: awaiting_approval
uid: 32546
---

## Email Content

**From:** Ruskaruma <notifications@github.com>
**Subject:** Re: [openai/openai-agents-python] fix: convert oneOf to anyOf in

 strict schema for OpenAI compatibility (PR #1884)
**Date:** Tue, 14 Oct 2025 06:33:15 -0700

### Body (preview)

@ruskaruma commented on this pull request.







> +

+from pydantic import BaseModel, Field

+

+from agents.agent_output import AgentOutputSchema

+from agents.strict_schema import ensure_strict_json_schema

+

+

+def test_oneof_converted_to_anyof():

+    schema = {

+        "type": "object",

+        "properties": {"value": {"oneOf": [{"type": "string"}, {"type": "integer"}]}},

+    }

+

+    result = ensure_strict_json_schema(schema)

+

+    assert "oneOf" not in str(result)



@seratch I’ve made the requested changes to use explicit expected dictionaries in the test assertions. Please let me know if any further adjustments or structural changes to the tests are needed, and then I’ll update them as soon as possible. I hope this addresses everything.



-- 

Reply to this email directly or view it on GitHub:

https://github.com/openai/openai-agents-python/pull/1884#discussion_r2429210069

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



Message ID: <openai/openai-agents-python/pull/1884/review/3335696999@github.com>

---

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