Realtime API Pydantic Models incomplete for RealtimeResponseStatus type
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 2/5
- Geschätzter Aufwand
- 1-3 Stunden
- Anfängerfreundlichkeit
- 78/100
Rechercherichtung
Beginne mit src/openai/types/beta/realtime/realtime_response_status.py, insbesondere mit dem im Issue referenzierten Error-Modell, und untersuche, wie die response.done-Nutzdaten validiert werden. Reproduziere das Beispiel für die fehlgeschlagene Antwort und überprüfe, dass die Validierung die verschachtelte Fehlermeldung beibehält, wenn das Modell aktualisiert wird.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Confirm this is an issue with the Python library and not an underlying OpenAI API
- This is an issue with the Python library --> It is both and I have informed the issue via https://help.openai.com/en
Describe the bug
And I have got errors like this when using latest Azure deployments of OpenAI Realtime model
{
"type": "response.done",
"event_id": "event_BvlnvdNtqw7LLGP7xDfyA",
"response": {
"object": "realtime.response",
"id": "resp_BvlnvRcuxxRLrr5FBygyo",
"status": "failed",
"status_details": {
"type": "failed",
"error": {
"type": "invalid_request_error",
"code": "inference_rate_limit_exceeded",
"message": "We're currently processing too many requests — please try again later."
}
},
"output": [],
"conversation_id": "conv_Bvlm1z1fjvrisuRsPx8hC",
"modalities": ["text", "audio"],
"voice": "sage",
"output_audio_format": "pcm16",
"temperature": 0.6,
"max_output_tokens": "inf",
"usage": {
"total_tokens": 0,
"input_tokens": 0,
"output_tokens": 0,
"input_token_details": {
"text_tokens": 0,
"audio_tokens": 0,
"cached_tokens": 0,
"cached_tokens_details": {
"text_tokens": 0,
"audio_tokens": 0
}
},
"output_token_details": {
"text_tokens": 0,
"audio_tokens": 0
}
},
"metadata": {
"client_event_id": "response_create_6448171658c7"
}
}
}
I have seen online others report errors like this: https://community.openai.com/t/realtime-api-errors-in-both-playground-and-api-calls/1007933 or here https://github.com/pipecat-ai/pipecat/issues/2106#issue-3193722974 etc.
The problem is that the pydantic model for Error is wrong - it does not include the message field (e.g. "We're currently processing too many requests — please try again later." in the above example). This seems to be the case in the API reference itself too https://platform.openai.com/docs/api-reference/realtime-server-events/response/done
A side effect of this is that pydantic validated code sometimes will omit the message which is quite helpeful for debugging.
To Reproduce
Create a response that fails to complete, e.g. due to exceeding the rate limit of your server
The issue is present even in latest code base of openai repo: https://github.com/openai/openai-python/blob/e6c6757553bbdb777c31d0daf5916fb9e2b47ff8/src/openai/types/beta/realtime/realtime_response_status.py#L11
Code snippets
OS
Linux
Python version
3.13
Library version
1.84.0
- Vorherrschende Sprache
- Python
- Sterne
- 31.7k
- Forks
- 6.8k
- Ø Merge
- 1 T. 5 Std.
- Gemergte PRs (30 T.)
- 128
Entwicklungsumgebung
Startet den Dev-Container des Projekts im Browser, mit Ihrem eigenen GitHub-Konto.
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus openai/openai-python
-
sdk-breaking-change v4
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 86/100
openai/openai-python#3837 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
openai/openai-python#3556 · 3 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
openai/openai-python#2927 · 7 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 62/100
openai/openai-python#2486 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 38/100
openai/openai-python#3966 · 2 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in openai/openai-python
Ähnliche Issues
-
adr
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
kristofdegrave/homeassistant-smart-charging#1607 ·
Maintainer antworten meist innerhalb von 1 Tag
-
namespace operations
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 64/100
EclipseFdn/open-vsx.org#13665 ·
Maintainer antworten meist innerhalb von 1 Tag
-
doc good first issue help wanted
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
collective/icalendar#1865 · 2 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
canonical/opentelemetry-collector-operator#409 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 85/100
mozilla/addons-release-tests#1243 ·
Maintainer antworten meist innerhalb von 1 Tag