litellm - 💡(How to fix) Fix [Bug]: Azure openai realtime WebRTC flow [3 comments, 1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
BerriAI/litellm#24659Fetched 2026-04-08 01:37:22
View on GitHub
Comments
3
Participants
1
Timeline
8
Reactions
0
Author
Participants
Timeline (top)
commented ×3labeled ×3mentioned ×1subscribed ×1

Error Message

Gives error: "error": { 2. Did a post to https://MY_LITELLM_DEPLOYMENT/v1/realtime/client_secrets as mentioned above and observed error.

Fix Action

Fix / Workaround

My litellm version: v1.82.3-stable.patch.2 Doing a POST to: https://MY_LITELLM_DEPLOYMENT/v1/realtime/client_secrets

v1.82.3-stable.patch.2

Code Example

{
    "error": {
        "message": "/openai/realtime/client_secrets?api-version=2024-07-01-preview",
        "type": "None",
        "param": "None",
        "code": "500"
    }
}

---
RAW_BUFFERClick to expand / collapse

Check for existing issues

  • I have searched the existing issues and checked that my issue is not a duplicate.

What happened?

What I'm tryin to achieve? Following the guide here to setup the ephemeral token minting for setting up the webrtc connection to azure openai. https://docs.litellm.ai/blog/realtime_webrtc_http_endpoints

My litellm version: v1.82.3-stable.patch.2 Doing a POST to: https://MY_LITELLM_DEPLOYMENT/v1/realtime/client_secrets

With payload and appropriate litellm key: { "model": "azure/gpt-realtime"}

Gives error:

{
    "error": {
        "message": "/openai/realtime/client_secrets?api-version=2024-07-01-preview",
        "type": "None",
        "param": "None",
        "code": "500"
    }
}

Trying with payload : {"model": "gpt/realtime"} gives a 404 resource not found. The litellm config for that model: { "api_base": "https://MY_AZURE_OPENAI_BASE.openai.azure.com", "api_version": "2025-08-28", // this model version is deployed at the azure foundry instance "model" : "azure/gpt-realtime", "api_key" : "THE_AZURE_OPENAI_KEY" }

What works? Directly hitting the azure foundry deployment: https://MY_AZURE_OPENAI_BASE.openai.azure.com/openai/v1/realtime/client_secrets

with payload: { "session": { "type": "realtime", "model": "gpt-realtime"} }

Any pointers much appreciated!

Steps to Reproduce

  1. Configured the litellm config as above for the azure/gpt-realtime model
  2. Did a post to https://MY_LITELLM_DEPLOYMENT/v1/realtime/client_secrets as mentioned above and observed error.

Relevant log output

What part of LiteLLM is this about?

Proxy

What LiteLLM version are you on ?

v1.82.3-stable.patch.2

Twitter / LinkedIn details

No response

extent analysis

Fix Plan

The issue seems to be related to incorrect payload formatting and version mismatch. To fix this, follow these steps:

  • Update the payload to match the expected format by Azure OpenAI:
{
  "session": {
    "type": "realtime",
    "model": "gpt-realtime"
  }
}
  • Ensure the api_version in the Litellm config matches the one used in the Azure OpenAI deployment. In this case, update the api_version to 2025-08-28 in the POST request as well.

Example code snippet:

import requests

url = "https://MY_LITELLM_DEPLOYMENT/v1/realtime/client_secrets"
payload = {
  "session": {
    "type": "realtime",
    "model": "gpt-realtime"
  }
}
headers = {
  "api-version": "2025-08-28"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())

Verification

Verify that the fix worked by checking the response status code and the presence of the expected data in the response body.

Extra Tips

  • Double-check the Litellm config and Azure OpenAI deployment settings to ensure consistency.
  • Make sure to handle any potential errors and exceptions in the code.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING