Files
openclaw/extensions/xiaomi
lsr911 df7fcef4b5 fix(xiaomi): treat blank env API key as unconfigured in speech provider (#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 #108212).

* refactor(xiaomi): centralize speech key resolution

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-16 05:05:03 -07:00
..