Repository navigation
fix(xiaomi): treat blank env API key as unconfigured in speech provider - #108558
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed July 15, 2026, 10:14 PM ET / July 16, 2026, 02:14 UTC. Summary PR surface: Source +3, Tests +32. Total +35 across 2 files. Reproducibility: yes. from source inspection: before the patch, a whitespace-only environment string is truthy during readiness checking and can become the synthesis credential; the added tests exercise both paths. 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: Keep Xiaomi credential resolution provider-owned and consistently normalized across readiness and synthesis, then land it with focused regression coverage and observable local-rejection proof. Do we have a high-confidence way to reproduce the issue? Yes from source inspection: before the patch, a whitespace-only environment string is truthy during readiness checking and can become the synthesis credential; the added tests exercise both paths. Is this the best way to solve the issue? Yes. Normalizing the environment fallback at the provider boundary is the narrowest maintainable fix, preserves explicit-config precedence, and matches the merged sibling-provider pattern. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 08ecf63bb608. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +3, Tests +32. Total +35 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
|
77f2efc to
0f164e7
Compare
A whitespace-only XIAOMI_API_KEY made the Xiaomi MiMo speech provider report configured, then sent an unusable bearer credential from synthesis. - Wrap process.env.XIAOMI_API_KEY with trimToUndefined in isConfigured so blank values are treated as not configured - Wrap process.env.XIAOMI_API_KEY with trimToUndefined in synthesize so blank values are rejected locally before any network request - Add test coverage for whitespace-only and blank env key in both paths This matches the blank-credential guard applied in the OpenAI speech provider (PR openclaw#108212).
0f164e7 to
55dcbcd
Compare
|
Maintainer proof complete for Xiaomi blank speech keys.
|
|
Merged via squash.
|
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]>
…er (openclaw#108558) * fix(xiaomi): treat blank env API key as unconfigured in speech provider A whitespace-only XIAOMI_API_KEY made the Xiaomi MiMo speech provider report configured, then sent an unusable bearer credential from synthesis. - Wrap process.env.XIAOMI_API_KEY with trimToUndefined in isConfigured so blank values are treated as not configured - Wrap process.env.XIAOMI_API_KEY with trimToUndefined in synthesize so blank values are rejected locally before any network request - Add test coverage for whitespace-only and blank env key in both paths This matches the blank-credential guard applied in the OpenAI speech provider (PR openclaw#108212). * refactor(xiaomi): centralize speech key resolution --------- 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]>
…er (openclaw#108558) * fix(xiaomi): treat blank env API key as unconfigured in speech provider A whitespace-only XIAOMI_API_KEY made the Xiaomi MiMo speech provider report configured, then sent an unusable bearer credential from synthesis. - Wrap process.env.XIAOMI_API_KEY with trimToUndefined in isConfigured so blank values are treated as not configured - Wrap process.env.XIAOMI_API_KEY with trimToUndefined in synthesize so blank values are rejected locally before any network request - Add test coverage for whitespace-only and blank env key in both paths This matches the blank-credential guard applied in the OpenAI speech provider (PR openclaw#108212). * refactor(xiaomi): centralize speech key resolution --------- 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
XIAOMI_API_KEYmade the Xiaomi MiMo speech provider report configured, then allowed an unusable credential into request construction.This is the same blank-credential class fixed for sibling speech providers.
Why This Change Was Made
resolveSpeechProviderApiKeycontract for trimming and blank rejection.api-keyheader arguments are built.User Impact
Evidence
Focused production-module tests:
Redacted production-module negative probe:
Hosted changed-file gate passed formatting, SDK baseline, plugin boundaries, dependency guards, extension and extension-test types, lint, storage guards, and import cycles:
Risk / Compatibility
Low. Existing configured-key precedence remains unchanged. Only surrounding whitespace and blank values are normalized. No config, persistence, or dependency surface changes.
Changelog
Release-note context only; no contributor-owned root changelog edit.