You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
FIX: omit unset speed from OpenAITTSTarget requests - #4488
Fixes#4485. OpenAITTSTarget passed speed=body_parameters.get("speed") to audio.speech.create, so an unset speed reached the SDK as an explicit None, which it serializes as JSON null. gpt-4o-mini-tts rejects that with Invalid type for 'speed'.
Pass speed to the SDK only when it is set.
Add a unit test that the SDK call gets no speed argument when speed is None (the existing test covers the set case).
speed now reaches the SDK only via optional_parameters; the copy in
body_parameters was never read.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes #4485.
OpenAITTSTargetpassedspeed=body_parameters.get("speed")toaudio.speech.create, so an unset speed reached the SDK as an explicitNone, which it serializes as JSONnull.gpt-4o-mini-ttsrejects that withInvalid type for 'speed'.speedto the SDK only when it is set.speedargument whenspeedisNone(the existing test covers the set case).