Skip to content

[Bug]: add semantic memory background process hit exception openai.LengthFinishReasonError #1146

Description

@tomw-mv

Describe the bug

run amemgym benchmark using memmachine semantic memory.
after running benchmark, look at docker logs for memmachine.
although no issues observed in restapiv2 responses, found exception in docker logs.

2026-02-26 22:55:20,531 [ERROR] memmachine.common.language_model.openai_chat_completions_language_model - [call uuid: 7e4c4c3c-27f9-4710-b107-301cdce72540] Giving up generating response due to non-retryable LengthFinishReasonError

...

File "/app/.venv/lib/python3.12/site-packages/openai/lib/_parsing/_completions.py", line 100, in parse_chat_completion
raise LengthFinishReasonError(completion=chat_completion)
openai.LengthFinishReasonError: Could not parse response content as the length limit was reached - CompletionUsage(completion_tokens=16384, prompt_tokens=8034, total_tokens=24418, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_prediction_tokens=0), prompt_tokens_details=PromptTokensDetails(audio_tokens=0, cached_tokens=2944))
2026-02-26 22:55:20,546 [ERROR] memmachine.semantic_memory.semantic_ingestion - Failed to process message 168 for semantic type profile
Traceback (most recent call last):
File "/app/.venv/lib/python3.12/site-packages/memmachine/common/language_model/openai_chat_completions_language_model.py", line 146, in generate_parsed_response
response = await self._client.with_options(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...

Steps to reproduce

how to run amemgym benchmark is in this message:
https://memverge.slack.com/archives/C0A0Z69UC8L/p1771976896651179

Expected behavior

no errors

Environment

build is 2/25 main 46d7a05

Additional context

01-logs.txt

Activity

  1. added theissue type on Feb 27, 2026
  2. self-assigned this
    on Feb 27, 2026
  3. added a commit that references this issue on Mar 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions