Repository navigation
fix(inworld): treat blank env API key as unconfigured in speech provider - #108783
Conversation
1738ffd to
5fc79c1
Compare
|
Codex review: needs real behavior proof before merge. Reviewed July 16, 2026, 5:07 AM ET / 09:07 UTC. Summary PR surface: Source +3, Tests +25. Total +28 across 2 files. Reproducibility: yes. from source inspection: a whitespace-only JavaScript environment string is truthy, so the existing raw reads report configuration and reach request code. The path is source-reproducible, although no runtime reproduction was performed during this read-only review. Review metrics: none identified. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Use one provider-owned normalized Inworld credential resolution path across readiness, voice listing, synthesis, and telephony, then demonstrate with redacted runtime output that a whitespace-only environment key fails locally before any network request. Do we have a high-confidence way to reproduce the issue? Yes from source inspection: a whitespace-only JavaScript environment string is truthy, so the existing raw reads report configuration and reach request code. The path is source-reproducible, although no runtime reproduction was performed during this read-only review. Is this the best way to solve the issue? Yes—the provider-owned normalization is the narrowest maintainable fix and matches the merged OpenAI precedent. Consolidating the repeated reads into one resolver would further reduce drift, but the current shape has no proven blocking correctness defect. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against b8a634161784. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +3, Tests +25. Total +28 across 2 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
5fc79c1 to
8da37c1
Compare
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]>
8da37c1 to
5abc1b0
Compare
|
Maintainer proof complete.
Best-fix judgment: yes. The original four local trims were correct but duplicated auth policy and left the direct voice-list override outside one owner. The rewrite gives Inworld one resolver and uses the shared cross-provider normalization contract. |
|
Merged via squash.
|
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]>
…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
INWORLD_API_KEYmade the Inworld speech provider report configured, then sent an unusable HTTP Basic credential from synthesis, telephony synthesis, and voice listing.Why This Change Was Made
listVoices,isConfigured,synthesize, andsynthesizeTelephony.User Impact
Whitespace-only credentials no longer select Inworld or reach request construction. Nonblank request/config/environment precedence is unchanged.
Evidence
Production-entrypoint probe, importing
buildInworldSpeechProviderand replacing global fetch with a call counter:Focused regression:
Hosted changed-file gate: format, SDK API baseline, extension and extension-test typechecks, lint, plugin boundaries, and runtime guards passed in Blacksmith Testbox.
Risk / Compatibility
Low. The change only normalizes credential presence at the provider owner boundary and preserves existing precedence and HTTP Basic credential handling.
AI-assisted: contributor patch and maintainer rewrite used coding agents.