[Bugfix][Frontend] Return 500 for unexpected speech failures (#6487)

Signed-off-by: z2z23n0 <51999056+z2z23n0@users.noreply.github.com>
Co-authored-by: Canlin Guo <canlinguosdu@gmail.com>
This commit is contained in:
z2z23n0andCanlin Guo authored and GitHub committed 2026-09-24 01:38:05 -07:00
1 parent 926ba72793
commit 3b02e5338a
2 files changed
+60 -5

No files matched your search

@@ -2726,8 +2726,11 @@ class OmniOpenAIServingSpeech(OpenAIServing, AudioMixin):
total_ms,
e,
)
logger.exception("Speech generation failed: %s", e)
return self.create_error_response(f"Speech generation failed: {e}")
return self.create_error_response(
f"Speech generation failed: {e}",
err_type="InternalServerError",
status_code=HTTPStatus.INTERNAL_SERVER_ERROR,
)
@staticmethod
def _merge_batch_item(