fix(tts): protect direct Cartesia keys and redact provider errors - #774
Draft
axelpey wants to merge 2 commits into
Draft
fix(tts): protect direct Cartesia keys and redact provider errors#774axelpey wants to merge 2 commits into
axelpey wants to merge 2 commits into
Conversation
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Follow-up to David's #755, based on
feat/cartesia-api-key. This changes only the Cartesia transport and its tests; it does not modify David's branch, select another voice, or resolve the Alfred voice-access blocker.Direct and proxy failures can reach robot chat/logs through TTS handling. They now expose only HTTP status or a generic request failure, with no upstream body, headers, or exception chain. Public-demo sessions (
INNATE_PUBLIC_DEMO=1,true, oryes) cannot select, construct, or use a direct Cartesia transport. The configured proxy still wins and never falls back to a different account after an error. Warmup remains status-agnostic because HEAD is only for connection reuse and may legitimately return 405.21 tests passed using the actual TTS handler, real proxy adapter and httpx client with controlled network transport: exact Alfred/default voice forwarding, speech body and headers, optional generation config, client reuse/closure, proxy precedence, missing key, rejected credential/partial stream/warmup error redaction, and public-demo guard. Ruff and diff checks pass. No real provider key or physical audio device was used. A separate combined roundtrip with #773 and #772 successfully saved controlled keys through the CLI, loaded them with the real hardware launch loader, and exercised OpenAIContext plus the Cartesia TTSHandler against local HTTP provider doubles; 54 combined provider/TTS tests passed.
The original #755 must remain blocked until Alfred works consistently with the intended non-owning Cartesia key. Owner-local key configuration is separate draft #773; OpenAI Responses runtime is separate draft #772. No deployment or PR-status changes were made.
Keep this follow-up draft until Axel explicitly approves it.