openclaw - 💡(How to fix) Fix [xai-auth] bootstrap config fallback noise for unconfigured xAI provider [5 comments, 5 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#57380Fetched 2026-04-08 01:50:25
View on GitHub
Comments
5
Participants
5
Timeline
9
Reactions
3
Author
Timeline (top)
commented ×5subscribed ×3mentioned ×1

The gateway logs [xai-auth] bootstrap config fallback: no config-backed key found on every incoming WhatsApp voice message, even though the xai provider is not configured anywhere in openclaw.json.

The message is gated by shouldTraceProviderAuth() which hardcodes provider === "xai". During audio message processing, the model provider auth bootstrap iterates through built-in providers including xAI, finds no key, and logs the warning.

Root Cause

The gateway logs [xai-auth] bootstrap config fallback: no config-backed key found on every incoming WhatsApp voice message, even though the xai provider is not configured anywhere in openclaw.json.

The message is gated by shouldTraceProviderAuth() which hardcodes provider === "xai". During audio message processing, the model provider auth bootstrap iterates through built-in providers including xAI, finds no key, and logs the warning.

RAW_BUFFERClick to expand / collapse

Description

The gateway logs [xai-auth] bootstrap config fallback: no config-backed key found on every incoming WhatsApp voice message, even though the xai provider is not configured anywhere in openclaw.json.

The message is gated by shouldTraceProviderAuth() which hardcodes provider === "xai". During audio message processing, the model provider auth bootstrap iterates through built-in providers including xAI, finds no key, and logs the warning.

Steps to Reproduce

  1. Configure WhatsApp channel with voice message support
  2. Have openai-whisper-api skill configured with an OpenAI key
  3. Do NOT configure any xai provider
  4. Send a voice message via WhatsApp
  5. Observe logs: [agents/model-providers] [xai-auth] bootstrap config fallback: no config-backed key found

Expected Behavior

No log noise for providers that are not configured. The auth bootstrap should skip providers with no corresponding config entry in models.providers.

Environment

  • OpenClaw version: 2026.3.28
  • Running in Docker
  • Configured providers: openai-codex, zai
  • No xai provider in config

Suggested Fix

Gate the shouldTraceProviderAuth trace behind a check for whether the provider actually exists in models.providers or auth profiles. Alternatively, only trace providers that have been explicitly configured.

extent analysis

Fix Plan

To resolve the issue, we need to modify the shouldTraceProviderAuth function to check if the provider exists in models.providers before logging the warning.

Here are the steps:

  • Update the shouldTraceProviderAuth function to accept the models.providers object as an argument.
  • Check if the provider is present in the models.providers object before logging the warning.

Example Code

function shouldTraceProviderAuth(provider, modelsProviders) {
  // Check if the provider is configured
  if (modelsProviders[provider]) {
    // Only log the warning if the provider is configured and the key is missing
    if (provider === "xai" && !modelsProviders[provider].key) {
      return true;
    }
  }
  return false;
}

In the auth bootstrap logic, pass the models.providers object to the shouldTraceProviderAuth function:

if (shouldTraceProviderAuth("xai", models.providers)) {
  // Log the warning
  logger.warn("[xai-auth] bootstrap config fallback: no config-backed key found");
}

Verification

To verify the fix, follow these steps:

  • Send a voice message via WhatsApp.
  • Check the logs for the warning message.
  • The warning message should not be present if the xai provider is not configured.

Extra Tips

  • Make sure to update the shouldTraceProviderAuth function in all places where it is used.
  • Consider adding a check for other providers to avoid similar issues in the future.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING