---
type: email
from: Kazuhiro Sera <notifications@github.com>
subject: [openai/openai-agents-python] fix: #1594 support Azure OpenAI

 Realtime connection using headers (PR #1633)
received: 2026-03-06 07:19:43
date_header: Mon, 01 Sep 2025 18:11:04 -0700
priority: normal
status: awaiting_approval
uid: 29252
---

## Email Content

**From:** Kazuhiro Sera <notifications@github.com>
**Subject:** [openai/openai-agents-python] fix: #1594 support Azure OpenAI

 Realtime connection using headers (PR #1633)
**Date:** Mon, 01 Sep 2025 18:11:04 -0700

### Body (preview)

This pull request resolves #1594. Azure OpenAI&#39;s Realtime WeSocket connection establishment requires a different set of request headers. This pull request enables developers to pass it using custom request headers. 



&gt;API key: An api-key can be provided in one of two ways:

&gt;Using an api-key connection header on the prehandshake connection. This option isn&#39;t available in a browser environment.

&gt;Using an api-key query string parameter on the request URI. Query string parameters are encrypted when using https/wss.



Refer to the following resources for more details:

- https://learn.microsoft.com/en-us/azure/ai-foundry/openai/how-to/realtime-audio-websockets#connection-and-authentication

- https://github.com/openai/openai-agents-python/issues/1594#issuecomment-3241280427



You can view, comment on, or merge this pull request online at:



  https://github.com/openai/openai-agents-python/pull/1633



-- Commit Summary --



  * fix: #1594 support Azure OpenAI Realtime connection using headers



-- File Changes --



    M src/agents/realtime/model.py (6)

    M src/agents/realtime/openai_realtime.py (32)

    M tests/realtime/test_openai_realtime.py (41)



-- Patch Links --



https://github.com/openai/openai-agents-python/pull/1633.patch

https://github.com/openai/openai-agents-python/pull/1633.diff



-- 

Reply to this email directly or view it on GitHub:

https://github.com/openai/openai-agents-python/pull/1633

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



Message ID: &lt;openai/openai-agents-python/pull/1633@github.com&gt;

---

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