Pre-submission checklist | 提交前检查
Bug Description | 问题描述
apps/memos-local-plugin currently rejects many otherwise-usable L3 abstraction drafts too early when the model returns partially structured JSON.
In practice, I saw repeated world_model_generate failures where the payload still had usable body / domain_tags / string items, but the validator aborted because:
title was empty
inference / constraints were not arrays
- some list entries came back as strings or
{ body: ... }
This causes the L3 pipeline to fail hard instead of salvaging a draft and letting downstream validation decide whether it is good enough to persist.
How to Reproduce | 如何重现
- Use
apps/memos-local-plugin with an OpenAI-compatible structured-output model that is not perfectly strict on every generation.
- Let the plugin accumulate enough traces/policies to trigger
world_model_generate.
- Check logs for failures like:
l3.abstraction: 'title' must be a non-empty string
l3.abstraction: 'inference' must be an array
l3.abstraction: 'constraints' must be an array
Environment | 环境信息
- MemOS version:
main as of 2026-05-09
- Plugin:
apps/memos-local-plugin
- Example model that reproduced this:
glm-4-flashx-250414 via OpenAI-compatible API
Additional Context | 其他信息
This is not only a model-quality issue.
The current parser is strict enough that slightly malformed but semantically usable drafts are discarded wholesale. A more resilient normalization path for:
- fallback title derivation
- string / object list entry coercion
- string tag splitting
would make L3 much less fragile across providers.
I did not open a PR for this yet because it changes parser policy, not just transport/runtime behavior.
Willingness to Implement | 实现意愿
Pre-submission checklist | 提交前检查
Bug Description | 问题描述
apps/memos-local-plugincurrently rejects many otherwise-usable L3 abstraction drafts too early when the model returns partially structured JSON.In practice, I saw repeated
world_model_generatefailures where the payload still had usablebody/domain_tags/ string items, but the validator aborted because:titlewas emptyinference/constraintswere not arrays{ body: ... }This causes the L3 pipeline to fail hard instead of salvaging a draft and letting downstream validation decide whether it is good enough to persist.
How to Reproduce | 如何重现
apps/memos-local-pluginwith an OpenAI-compatible structured-output model that is not perfectly strict on every generation.world_model_generate.l3.abstraction: 'title' must be a non-empty stringl3.abstraction: 'inference' must be an arrayl3.abstraction: 'constraints' must be an arrayEnvironment | 环境信息
mainas of 2026-05-09apps/memos-local-pluginglm-4-flashx-250414via OpenAI-compatible APIAdditional Context | 其他信息
This is not only a model-quality issue.
The current parser is strict enough that slightly malformed but semantically usable drafts are discarded wholesale. A more resilient normalization path for:
would make L3 much less fragile across providers.
I did not open a PR for this yet because it changes parser policy, not just transport/runtime behavior.
Willingness to Implement | 实现意愿