Skip to content

Comments

fix(voice-call): validate provider credentials from env vars#1724

Merged
shakkernerd merged 2 commits intoopenclaw:mainfrom
zerone0x:fix/voice-call-env-var-validation
Jan 26, 2026
Merged

fix(voice-call): validate provider credentials from env vars#1724
shakkernerd merged 2 commits intoopenclaw:mainfrom
zerone0x:fix/voice-call-env-var-validation

Conversation

@zerone0x
Copy link
Contributor

Summary

Fixes #1709

The validateProviderConfig() function now checks both config values AND environment variables when validating provider credentials. This aligns the validation behavior with resolveProvider() which already falls back to env vars.

Problem

Previously, users who set credentials via environment variables would get validation errors like:

plugins.entries.voice-call.config.twilio.accountSid is required (or set TWILIO_ACCOUNT_SID env)

The error message suggested env vars work, but the validation didn't actually check them. The credentials would only be found later in resolveProvider(), which does check env vars.

Changes

  • Updated validateProviderConfig() to check both config and env vars for all three providers:
    • Twilio: TWILIO_ACCOUNT_SID, TWILIO_AUTH_TOKEN
    • Telnyx: TELNYX_API_KEY, TELNYX_CONNECTION_ID
    • Plivo: PLIVO_AUTH_ID, PLIVO_AUTH_TOKEN
  • Added comprehensive test coverage for the validation function

Test Plan

  • Added 12 new tests covering all validation scenarios:
    • Credentials in config only
    • Credentials in env vars only
    • Mixed config/env vars
    • Missing credentials (validation failure)
    • Disabled config (validation skipped)
  • All existing tests pass
  • Lint and build pass

🤖 Generated with Claude Code (issue-hunter-pro)

The `validateProviderConfig()` function now checks both config values
AND environment variables when validating provider credentials. This
aligns the validation behavior with `resolveProvider()` which already
falls back to env vars.

Previously, users who set credentials via environment variables would
get validation errors even though the credentials would be found at
runtime. The error messages correctly suggested env vars as an
alternative, but the validation didn't actually check them.

Affects all three supported providers: Twilio, Telnyx, and Plivo.

Fixes openclaw#1709

Co-Authored-By: Claude <[email protected]>
@shakkernerd shakkernerd merged commit 1da6c05 into openclaw:main Jan 26, 2026
20 of 23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

voice-call plugin: config validation ignores environment variables

2 participants