Repository navigation
Conversation
…anscription A whitespace-only DEEPGRAM_API_KEY made the Deepgram realtime transcription provider report configured, then sent an unusable bearer credential. - Wrap process.env.DEEPGRAM_API_KEY with normalizeOptionalString in isConfigured so blank env values are treated as not configured - Wrap process.env.DEEPGRAM_API_KEY with normalizeOptionalString in createSession so blank values are rejected locally before connecting - Add isConfigured test suite covering: unset, set, whitespace-only env, and provider-config apiKey paths - Add createSession test for whitespace-only env key rejection This matches the blank-credential guard applied in the OpenAI speech provider (PR openclaw#108212) and Xiaomi MiMo provider (PR openclaw#108558).
|
Thanks for the contribution. This PR still needs the requested real-behavior proof, and the branch has been idle since that ask. Close as stalled/unproven: the source confirms a real narrow Deepgram credential bug, but this external PR has had no head activity for 21 days after a dated proof request and still lacks after-fix real behavior evidence. So I’m closing this for now to keep the review queue honest. Please reopen or open a fresh PR with real-behavior proof (a live run, logs, or a reproducible validation transcript) and it will be reviewed again. Review detailsBest possible solution: If reopened, explicitly clear the environment in the unset test and add a redacted exact-head production-provider or loopback-WebSocket trace proving blank rejection before any connection, plus a padded-valid-key case. Do we have a high-confidence way to reproduce the issue? Yes—source provides a high-confidence path: whitespace is truthy at the current readiness gate and reaches the session credential path, although this review did not execute the external contributor branch. Is this the best way to solve the issue? Yes—the two owner-local substitutions reuse the existing normalizer and match sibling realtime providers, but the branch needs reliable regression setup and real after-fix proof before merge. Security review: Security review cleared: The two-file diff adds no dependency, workflow, secret-handling, or supply-chain surface; it only normalizes an existing credential before use. AGENTS.md: found and applied where relevant. What I checked:
Likely related people:
Codex review notes: model internal, reasoning high; reviewed against 8c64ca24b17f. |
A whitespace-only INWORLD_API_KEY made the Inworld speech provider report configured, then sent an unusable bearer credential from synthesis, telephony synthesis, and voice listing. - Wrap process.env.INWORLD_API_KEY with trimToUndefined in isConfigured so blank values are treated as not configured - Wrap process.env.INWORLD_API_KEY with trimToUndefined in synthesize, synthesizeTelephony, and listVoices so blank values are rejected locally before any network request - Add test coverage for whitespace-only env key in isConfigured and synthesize paths This matches the blank-credential guard pattern applied in the OpenAI (openclaw#108212), Xiaomi (openclaw#108558), and Deepgram (openclaw#108565) providers. Co-Authored-By: Claude <[email protected]>
…der (#108783) * fix(inworld): treat blank env API key as unconfigured in speech provider A whitespace-only INWORLD_API_KEY made the Inworld speech provider report configured, then sent an unusable bearer credential from synthesis, telephony synthesis, and voice listing. - Wrap process.env.INWORLD_API_KEY with trimToUndefined in isConfigured so blank values are treated as not configured - Wrap process.env.INWORLD_API_KEY with trimToUndefined in synthesize, synthesizeTelephony, and listVoices so blank values are rejected locally before any network request - Add test coverage for whitespace-only env key in isConfigured and synthesize paths This matches the blank-credential guard pattern applied in the OpenAI (#108212), Xiaomi (#108558), and Deepgram (#108565) providers. Co-Authored-By: Claude <[email protected]> * fix(inworld): centralize speech API key resolution --------- Co-authored-by: Claude <[email protected]> Co-authored-by: Peter Steinberger <[email protected]>
The isGradiumProviderConfigured helper already uses trimToUndefined on GRADIUM_API_KEY, but synthesize and synthesizeTelephony still used the bare env var. This made whitespace-only credentials pass the missing-key guard and send unusable bearer tokens. - Wrap process.env.GRADIUM_API_KEY with trimToUndefined in synthesize - Wrap process.env.GRADIUM_API_KEY with trimToUndefined in synthesizeTelephony - Add test for whitespace-only env key rejection in synthesize This completes the blank-credential guard for the Gradium provider, matching the pattern from OpenAI (openclaw#108212), Xiaomi (openclaw#108558), Deepgram (openclaw#108565), and Inworld (openclaw#108783). Co-Authored-By: Claude <[email protected]>
…ths (#108800) * fix(gradium): treat blank env API key as unconfigured in synthesis paths The isGradiumProviderConfigured helper already uses trimToUndefined on GRADIUM_API_KEY, but synthesize and synthesizeTelephony still used the bare env var. This made whitespace-only credentials pass the missing-key guard and send unusable bearer tokens. - Wrap process.env.GRADIUM_API_KEY with trimToUndefined in synthesize - Wrap process.env.GRADIUM_API_KEY with trimToUndefined in synthesizeTelephony - Add test for whitespace-only env key rejection in synthesize This completes the blank-credential guard for the Gradium provider, matching the pattern from OpenAI (#108212), Xiaomi (#108558), Deepgram (#108565), and Inworld (#108783). Co-Authored-By: Claude <[email protected]> * fix(gradium): centralize speech API key resolution --------- Co-authored-by: Claude <[email protected]> Co-authored-by: Peter Steinberger <[email protected]>
…der (openclaw#108783) * fix(inworld): treat blank env API key as unconfigured in speech provider A whitespace-only INWORLD_API_KEY made the Inworld speech provider report configured, then sent an unusable bearer credential from synthesis, telephony synthesis, and voice listing. - Wrap process.env.INWORLD_API_KEY with trimToUndefined in isConfigured so blank values are treated as not configured - Wrap process.env.INWORLD_API_KEY with trimToUndefined in synthesize, synthesizeTelephony, and listVoices so blank values are rejected locally before any network request - Add test coverage for whitespace-only env key in isConfigured and synthesize paths This matches the blank-credential guard pattern applied in the OpenAI (openclaw#108212), Xiaomi (openclaw#108558), and Deepgram (openclaw#108565) providers. Co-Authored-By: Claude <[email protected]> * fix(inworld): centralize speech API key resolution --------- Co-authored-by: Claude <[email protected]> Co-authored-by: Peter Steinberger <[email protected]>
…ths (openclaw#108800) * fix(gradium): treat blank env API key as unconfigured in synthesis paths The isGradiumProviderConfigured helper already uses trimToUndefined on GRADIUM_API_KEY, but synthesize and synthesizeTelephony still used the bare env var. This made whitespace-only credentials pass the missing-key guard and send unusable bearer tokens. - Wrap process.env.GRADIUM_API_KEY with trimToUndefined in synthesize - Wrap process.env.GRADIUM_API_KEY with trimToUndefined in synthesizeTelephony - Add test for whitespace-only env key rejection in synthesize This completes the blank-credential guard for the Gradium provider, matching the pattern from OpenAI (openclaw#108212), Xiaomi (openclaw#108558), Deepgram (openclaw#108565), and Inworld (openclaw#108783). Co-Authored-By: Claude <[email protected]> * fix(gradium): centralize speech API key resolution --------- Co-authored-by: Claude <[email protected]> Co-authored-by: Peter Steinberger <[email protected]>
|
ClawSweeper applied the proposed close for this PR.
|
…der (openclaw#108783) * fix(inworld): treat blank env API key as unconfigured in speech provider A whitespace-only INWORLD_API_KEY made the Inworld speech provider report configured, then sent an unusable bearer credential from synthesis, telephony synthesis, and voice listing. - Wrap process.env.INWORLD_API_KEY with trimToUndefined in isConfigured so blank values are treated as not configured - Wrap process.env.INWORLD_API_KEY with trimToUndefined in synthesize, synthesizeTelephony, and listVoices so blank values are rejected locally before any network request - Add test coverage for whitespace-only env key in isConfigured and synthesize paths This matches the blank-credential guard pattern applied in the OpenAI (openclaw#108212), Xiaomi (openclaw#108558), and Deepgram (openclaw#108565) providers. Co-Authored-By: Claude <[email protected]> * fix(inworld): centralize speech API key resolution --------- Co-authored-by: Claude <[email protected]> Co-authored-by: Peter Steinberger <[email protected]>
…ths (openclaw#108800) * fix(gradium): treat blank env API key as unconfigured in synthesis paths The isGradiumProviderConfigured helper already uses trimToUndefined on GRADIUM_API_KEY, but synthesize and synthesizeTelephony still used the bare env var. This made whitespace-only credentials pass the missing-key guard and send unusable bearer tokens. - Wrap process.env.GRADIUM_API_KEY with trimToUndefined in synthesize - Wrap process.env.GRADIUM_API_KEY with trimToUndefined in synthesizeTelephony - Add test for whitespace-only env key rejection in synthesize This completes the blank-credential guard for the Gradium provider, matching the pattern from OpenAI (openclaw#108212), Xiaomi (openclaw#108558), Deepgram (openclaw#108565), and Inworld (openclaw#108783). Co-Authored-By: Claude <[email protected]> * fix(gradium): centralize speech API key resolution --------- Co-authored-by: Claude <[email protected]> Co-authored-by: Peter Steinberger <[email protected]>
What Problem This Solves
A whitespace-only
DEEPGRAM_API_KEYmade the Deepgram realtime transcription provider report configured, then sent an unusable bearer credential fromcreateSession.This is the same class of blank-credential defect that was fixed for the OpenAI speech provider in #108212 and the Xiaomi MiMo provider in #108558.
Why This Change Was Made
normalizeOptionalString(semanticallytrimToUndefined) to normalizeprocess.env.DEEPGRAM_API_KEYinisConfiguredandcreateSessionnormalizeOptionalStringwas already in scopeUser Impact
Verification
extensions/deepgram/realtime-transcription-provider.test.tsisConfiguredtest suite: unset → false, set → true, whitespace → false, config apiKey → truecreateSessiontest: whitespace env key → throws "Deepgram API key missing"Risk / Compatibility
Low. Existing explicit-config precedence remains unchanged. Only surrounding whitespace and blank env values are normalized. No config, SDK, or persistence surface changes.
Changelog
Release-note context only; no contributor-owned root changelog edit.