Repository navigation
fix(config): enable tools.media.image for Discord image processing (#506) - #92
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the production OpenClaw configuration to add image/media processing settings under the top-level tools block, intended to make Discord image attachments visible to the agent.
Changes:
- Adds
tools.media.image.enabled. - Sets image size, timeout, and multi-attachment policy for production config.
Comments suppressed due to low confidence (2)
config/openclaw.prod.json5:439
- This 10 MB limit will not apply for the current production primary model when it supports native vision:
runCapabilityskips image understanding before applying thismaxBytes, and the native image-injection path uses the separate 6 MBMAX_IMAGE_BYTESlimit. As a result, 6–10 MB Discord images can still be ignored despite this config saying 10 MB per image; either align the native limit/config path or use an explicit media-understanding model path that honors this setting.
maxBytes: 10485760, // 10 MB per image
config/openclaw.prod.json5:443
- This attachment policy only affects the media-understanding runner. For vision-capable active models, image understanding is skipped and the later native image-injection path loads image references from the media note without using
tools.media.image.attachments, so messages with more than 5 Discord images can still bypass this cap. Please apply the same limit to native image injection or configure a non-native media-understanding model path if this cap is required.
attachments: {
mode: "all", // "all" = process all attached images
maxAttachments: 5, // max images per message
Comment on lines
+434
to
+438
| // Enables Discord image attachments to be processed by the agent | ||
| // Refs: Piboonsak/Openclaw#506 (bug: NongKung ไม่เห็นรูปภาพที่แนบใน Discord message) | ||
| media: { | ||
| image: { | ||
| enabled: true, |
| maxBytes: 10485760, // 10 MB per image | ||
| timeoutSeconds: 30, | ||
| attachments: { | ||
| mode: "all", // "all" = process all attached images |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🔗 Linked Issue
Closes Piboonsak/Openclaw#506 (bug: NongKung ไม่เห็นรูปภาพที่แนบใน Discord message)
📝 Summary
Root Cause
Production config (
config/openclaw.prod.json5) was missing thetools.media.imagesection entirely. Without it, OpenClaw defaults to disabled image processing — all Discord image attachments were silently ignored.Fix
Added
tools.mediasection insidetoolsblock:KI Gate
tools.mediais a new top-level field undertools(not underagents.defaults). The deploy workflow's selective merge step syncstools.exec.*but may not synctools.media.*. This needs to be verified in the deploy workflow after merge.🏷️ Change Type
docs/cicd/03-pre-fix-protocol.md→04→05→06)📋 CI/CD Compliance
deploy-hotfix-openclaw-github-private-secrets.yml(no build needed)mediasection, trigger hotfix redeploy