openclaw - ✅(Solved) Fix Media Understanding config lacks apiKey source documentation, causing setup failure [1 pull requests, 1 comments, 2 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#51054Fetched 2026-04-08 01:04:55
View on GitHub
Comments
1
Participants
2
Timeline
2
Reactions
0
Author
Participants
Timeline (top)
commented ×1cross-referenced ×1

Error Message

  1. Observe error: apiKey cannot be found

Root Cause

Problem Description

When configuring tools.media for audio/video understanding following the Media Understanding docs, the feature fails to work because it cannot find the apiKey. The documentation does not explain where the apiKey should be configured.

Fix Action

Fix / Workaround

Current Workaround

Configure apiKey in models.providers for each provider used:

PR fix notes

PR #51089: docs: clarify Media Understanding apiKey sources

Description (problem / solution / changelog)

Summary

  • document that tools.media provider entries do not take inline apiKey
  • clarify the supported credential sources for Media Understanding provider entries
  • explain that provider auto-detection only treats providers as available when auth resolves successfully

Validation

  • attempted pnpm format:docs:check, but docs tooling was unavailable in the temp clone because local deps were missing
  • attempted pnpm install, but registry/network resolution was blocked in this environment

Closes #51054

Changed files

  • docs/nodes/media-understanding.md (modified, +17/-0)

Code Example

{
  tools: {
    media: {
      audio: {
        enabled: true,
        models: [
          { provider: "openai", model: "gpt-4o-mini-transcribe" }
        ]
      },
      video: {
        enabled: true,
        models: [
          { provider: "moonshot", model: "kimi-k2.5" }
        ]
      }
    }
  }
}

---

{
  models: {
    providers: {
      openai: {
        baseUrl: "http://10.200.1.6:3000/v1",
        apiKey: "sk-xx"
      },
      moonshot: {
        baseUrl: "http://10.200.1.6:3000/v1",
        apiKey: "sk-xx"
      },
      google: {
        baseUrl: "http://10.200.1.6:3000/v1beta",
        apiKey: "sk-xx"
      }
    }
  }
}
RAW_BUFFERClick to expand / collapse

Problem Description

When configuring tools.media for audio/video understanding following the Media Understanding docs, the feature fails to work because it cannot find the apiKey. The documentation does not explain where the apiKey should be configured.

Steps to Reproduce

  1. Configure tools.media with providers and models as per documentation:
{
  tools: {
    media: {
      audio: {
        enabled: true,
        models: [
          { provider: "openai", model: "gpt-4o-mini-transcribe" }
        ]
      },
      video: {
        enabled: true,
        models: [
          { provider: "moonshot", model: "kimi-k2.5" }
        ]
      }
    }
  }
}
  1. Send an audio or video message
  2. Observe error: apiKey cannot be found

Actual Behavior

The code looks up apiKey from models.providers[<provider_name>], but:

  • The documentation does not mention that apiKey must be configured in models.providers
  • There is no apiKey field in tools.media configuration
  • Users expect the configuration to inherit from global settings or support direct apiKey specification

Expected Behavior

One of the following:

  1. Documentation update: Clearly state that media understanding apiKey must be configured in models.providers
  2. Configuration enhancement: Support apiKey field directly in tools.media.<capability>.models[]
  3. Inheritance mechanism: Support inheriting apiKey from global or other provider configurations

Current Workaround

Configure apiKey in models.providers for each provider used:

{
  models: {
    providers: {
      openai: {
        baseUrl: "http://10.200.1.6:3000/v1",
        apiKey: "sk-xx"
      },
      moonshot: {
        baseUrl: "http://10.200.1.6:3000/v1",
        apiKey: "sk-xx"
      },
      google: {
        baseUrl: "http://10.200.1.6:3000/v1beta",
        apiKey: "sk-xx"
      }
    }
  }
}

Suggestion

Please prioritize updating the documentation to add a note in the "Config overview" or "Model entries" section explaining the apiKey configuration location and lookup logic. This will help other users avoid the same issue.

Related Documentation

extent analysis

Fix Plan

To fix the issue, update the configuration to include the apiKey for each provider in models.providers.

Here are the steps:

  • Add a models section to the configuration if it doesn't exist.
  • Inside models, add a providers section.
  • For each provider used in tools.media, add an entry in providers with the apiKey and baseUrl.

Example configuration:

{
  "tools": {
    "media": {
      "audio": {
        "enabled": true,
        "models": [
          { "provider": "openai", "model": "gpt-4o-mini-transcribe" }
        ]
      },
      "video": {
        "enabled": true,
        "models": [
          { "provider": "moonshot", "model": "kimi-k2.5" }
        ]
      }
    }
  },
  "models": {
    "providers": {
      "openai": {
        "baseUrl": "http://10.200.1.6:3000/v1",
        "apiKey": "sk-xx"
      },
      "moonshot": {
        "baseUrl": "http://10.200.1.6:3000/v1",
        "apiKey": "sk-xx"
      }
    }
  }
}

Verification

To verify the fix, send an audio or video message and check that the media understanding feature works without errors related to the apiKey.

Extra Tips

For a more robust solution, consider adding documentation updates to explain the apiKey configuration location and lookup logic, as suggested in the issue report. This will help other users avoid the same issue.

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

openclaw - ✅(Solved) Fix Media Understanding config lacks apiKey source documentation, causing setup failure [1 pull requests, 1 comments, 2 participants]