Repository navigation
fix(gradium): treat blank env API key as unconfigured in synthesis paths - #108800
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed July 16, 2026, 5:08 AM ET / 09:08 UTC. Summary PR surface: Source 0, Tests +22. Total +22 across 2 files. Reproducibility: yes. from source: set 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 the shared Do we have a high-confidence way to reproduce the issue? Yes, from source: set Is this the best way to solve the issue? Yes. Normalizing the credential at both request-time resolution points is the narrowest maintainable fix and matches the existing AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against b5377757d79f. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source 0, Tests +22. Total +22 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
|
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]>
17c3bd4 to
cc493b8
Compare
|
Maintainer proof complete on head
|
|
Merged via squash.
|
…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]>
…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
GRADIUM_API_KEYcould be treated differently by readiness, normal synthesis, and telephony synthesis. The synthesis paths could pass unusable credentials toward the Gradium API.Why This Change Was Made
User Impact
Evidence
node scripts/run-vitest.mjs extensions/gradium/speech-provider.test.ts— 10 tests passedGradium API key missing; fetch count 0node scripts/check-changed.mjs -- extensions/gradium/speech-provider.ts extensions/gradium/speech-provider.test.ts— passed on Blacksmith Testbox: https://github.com/openclaw/openclaw/actions/runs/29501438267Risk / Compatibility
Low. Only surrounding whitespace and blank credential values are normalized. Valid config credentials still take precedence over the environment.