[Bug] Memory extraction parse_error: flash-tier models intermittently update non-existent memory fields (schema-level, not fence wrapping)
Issue Origin
Local deployment of OpenViking v0.4.22 (macOS), VLM via DashScope compatible-mode (qwen3.8-flash, enable_thinking: false), observed during session_commit of large sessions (100–600 messages). Session content redacted throughout.
Bug Description
Memory extraction intermittently fails with:
Phase 2 step long_term failed: Final response could not be parsed as operations after 4 iterations (failure_kind=parse_error)
The underlying parse error shows a field-level schema violation, not a formatting problem:
error=Line 2: memory field 'content' is unavailable; editable fields on cases_1: case_name, evidence, input, rubric, task_signature
i.e. the model emits cases_1.content.update(...)-style operations referencing a field that does not exist on the target memory type. The retry loop re-runs 4 times and fails identically each time (the parse error is never fed back into the retry prompt, so the model repeats the same illegal field reference).
Distinct from #5514
#5514 covers models wrapping ops in a ```python fence (formatting — strippable). This report is a semantic schema violation: the op parses fine once fences are handled, but references a non-existent field. Fence normalization alone will not fix this class.
Evidence (sanitized)
Model-tier matrix, same pipeline, large sessions:
| VLM | thinking | result |
|---|---|---|
| qwen3.8-flash | off | parse_error (field-level, reproducible per session) |
| deepseek-v4.1-flash | off | parse_error (2 iterations, same class) |
| qwen3.8-flash | on | intermittent — some large sessions pass, others still parse_error |
| qwen3.8-max | off | passes consistently (3/3 large sessions) |
DashScope qwen3.8-flash supports response_format: json_schema with strict: true (OpenAI-compatible). Tested with an enum-constrained schema mirroring the case above:
{"op": {"type": "string", "enum": ["update", "write"]},
"target": {"type": "string"},
"field": {"type": "string", "enum": ["case_name", "evidence", "input", "rubric", "task_signature"]},
"value": {"type": "string"}}
Under strict mode the same flash model selects only legal fields from the enum — the violation disappears. This suggests the fix is enforcement, not prompt wording.
Ask
- Would the extractor consider
response_formatjson_schema strict for operations (DashScope and OpenAI both support it), or at least enum-constrain the field selection forupdateops? - Alternatively / incrementally: feed the previous iteration's parse error plus the editable-fields whitelist back into the retry prompt — the current loop retries blind and repeats the identical illegal field 4 times.
Environment
OpenViking v0.4.22 local; VLM qwen3.8-flash / qwen3.8-max via DashScope compatible-mode; thinking disabled via extra_request_body.enable_thinking: false. Session content and identifiers redacted; can share a sanitized raw model response if useful.