Skip to content

Fix OpenClaw Mem0 custom categories payload#5345

Open
mjzcng wants to merge 1 commit into
mem0ai:mainfrom
mjzcng:codex/fix-openclaw-mem0-custom-categories
Open

Fix OpenClaw Mem0 custom categories payload#5345
mjzcng wants to merge 1 commit into
mem0ai:mainfrom
mjzcng:codex/fix-openclaw-mem0-custom-categories

Conversation

@mjzcng
Copy link
Copy Markdown

@mjzcng mjzcng commented Jun 2, 2026

Summary

Fixes OpenClaw Mem0 auto-capture category overrides so they match the Mem0 SDK/platform list shape.

OpenClaw stores customCategories as a category-name-to-description map, while mem0ai@3.0.3 expects customCategories to be an array of single-key category objects. Passing the map directly causes platform validation errors during capture.

Changes

  • Adds customCategoryMapToList() to convert OpenClaw category maps into the Mem0 SDK list shape.
  • Uses that conversion when building auto-capture add options.
  • Updates the internal AddOptions.custom_categories type to the list shape.
  • Adds regression tests for the conversion and platform SDK forwarding.

Validation

  • ./node_modules/.bin/vitest run tests/providers.test.ts
  • ./node_modules/.bin/tsc --noEmit
  • ./node_modules/.bin/vitest run
  • ./node_modules/.bin/tsup

Fixes #5344

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Jun 2, 2026

CLA assistant check
All committers have signed the CLA.

@mjzcng mjzcng force-pushed the codex/fix-openclaw-mem0-custom-categories branch from 2411989 to df7b126 Compare June 3, 2026 02:23
@mjzcng mjzcng marked this pull request as ready for review June 3, 2026 02:34
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.

OpenClaw Mem0 auto-capture sends custom_categories as object, causing platform validation error

2 participants