Repository navigation
fix(studio): repair custom TTS endpoint test and playback - #9905
Conversation
Custom connection tests always probed /chat/completions, which fails for TTS-only gateways like Kokoro that expose /models and /audio/speech. Probe /models first, then /audio/speech, then chat completions. When proxying speech to external providers, send stream=false so servers that default to chunked streaming return a complete audio file. Preserve the upstream Content-Type when creating browser blob URLs so playback does not abort on undecodable media.
|
Confirmed the custom provider test in studio/backend/routes/providers.py still probes only /chat/completions and that the blob URL in studio-speech-synthesis-adapter.ts drops the upstream content type, so both halves of this match what I see on main. One thing to double check before review: sending stream: false unconditionally from create_speech for every provider, not just gateways that default to streaming. |
|
Thanks for checking, @danielhanchen. On this branch (
If anything still looks like main on your side, could you share which commit SHA you're viewing? Happy to walk through the diff. |
|
NOT READY. The conflict is resolved against current The merged head is clean on the reviewed scope: three exact-head review lanes closed 55/55 obligations with zero findings. Validation passed 75 speech/provider tests, 55 transcription tests, the saved-credential guard, 11 frontend authority/adapter tests, Fresh UI A/B proof is bound to base The conflict blocker is resolved. Readiness is still blocked because the replacement required CI run has 45 nonterminal checks; it must reach a required-green terminal state before this can be called ready. |
Resolve the speech-route test conflict by preserving main's instructions assertion and strict JSON access alongside the PR's no-stream, WAV merge, and cancellation coverage.
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. Breezy! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |

Fixes #9895
Problem
Custom connection tests always probed
/chat/completions, which fails for TTS-only OpenAI-compatible gateways like Kokoro FastAPI that expose/v1/modelsand/v1/audio/speechbut not chat completions.TTS preview/read-aloud could return HTTP 200 yet fail to play in the browser with "The fetching process for the media resource was aborted by the user agent at the user's request." Kokoro defaults to
stream: true, and blob URLs were created without preserving the upstreamContent-Type.Fix
/models→/audio/speech→/chat/completions.stream: falseso upstream servers return a complete audio file instead of a chunked stream.Content-Typeheader.Testing
stream: falseoncreate_speech.pytest tests/test_external_provider_usage_chunk.py tests/test_openai_audio_speech_route.py— 72 passednode --test tests/tts-custom-connections-disabled.test.ts— 11 passed