litellm/litellm/realtime_api
devin-ai-integration[bot] 3f01341f0a
fix(health)!: openai realtime health check reports healthy with a missing or invalid api key (#41233)
* fix(health): report openai realtime deployments with a missing or invalid api key as unhealthy

* fix(health): time out a silent openai realtime handshake and keep the first-event parsing in the openai handler

* fix(health): treat invalid_model as healthy, read the first event only on OpenAI hosts, map rate limits to 429

* fix(health): respect the global api_base, report a missing key as 401, keep invalid_model healthy only for known models

Drop the separate first-event timeout so model_info.health_check_timeout governs the wait, and keep the shared stream error table unchanged by raising AuthenticationError for invalid_api_key in the realtime check

* fix(health): keep invalid_model healthy unless the cost map lists the model outside realtime, and load realtime types lazily

* fix(health): read the cost map's listed endpoints, not its mode, since registering a realtime deployment overwrites the mode

* fix(health): read a realtime gateway's first event and keep Live deployments listing /v1/live healthy

Behind a custom api_base the OpenAI realtime health check now waits up to
3 seconds for the first event, so a gateway that passes on OpenAI's
invalid_api_key error reports unhealthy while a silent gateway stays
healthy. /v1/live counts as a realtime endpoint for the invalid_model rule.

---------

Co-authored-by: mateo-berri <277851410+mateo-berri@users.noreply.github.com>
2026-10-29 00:40:02 -07:00
..
main.py fix(health)!: openai realtime health check reports healthy with a missing or invalid api key (#41233) 2026-10-29 00:40:02 -07:00
README.md feat: litellm oss 110626 (#30202) 2026-06-11 22:30:26 -07:00

Abstraction / Routing logic for OpenAI's /v1/realtime endpoints.

Supported endpoints:

  • WebSocket: /v1/realtime (with intent=transcription for transcription-only sessions)
  • HTTP: /v1/realtime/client_secrets, /v1/realtime/transcription_sessions

Supported providers: OpenAI, Azure OpenAI, Bedrock, Vertex AI, xAI.

For user-facing documentation and usage examples, see the litellm-docs repo.