You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
OpenAI accepts this shape. Several other LLM backends do not, including the ones MemOS already documents/configures (minimax, plus Anthropic-compatible endpoints like the MiniMax Anthropic gateway):
Backend
Endpoint
Response
MiniMax Text API
https://api.minimax.io/v1/chat/completions
HTTP 400 invalid params, chat content is empty (2013)
MiniMax Anthropic-compat
https://api.minimax.io/anthropic/v1/messages
HTTP 400 invalid params, messages must not be empty (2013)
Anthropic native
https://api.anthropic.com/v1/messages
(same — system is a top-level field, messages[] must have ≥1 user turn)
Per MiniMax's own minimal example in the official docs, even system-only is rejected:
Split the prompt into a short system persona and a user message containing the actual instruction. OpenAI accepts this; MiniMax/Anthropic require it.
message_list= [
{"role": "system",
"content": "You generate suggestion queries based on the user's recent memories."},
{"role": "user",
"content": suggestion_prompt.format(memories=memories)},
]
This is a strict widening — every backend that accepts the original system-only shape also accepts the split shape. No behaviour change for existing OpenAI/Azure deployments.
Other handlers in src/memos/api/handlers/ should be audited for the same [{role: system, content: ...}] pattern; I only fixed suggestion_handler in this PR but happy to extend.
Activity
Memtensor-AI commentedon Jun 3, 2026
🤖 AutoDev 已接管此 issue,开始处理。
任务 ID:
17b71cc74829e6eb工作分支:
autodev/MemOS-1527目标分支:
main流程: opsp(系分 → 编码 → 自测 → PR)
完成后我会在此回贴 PR 链接;若需要补充信息,我会在本 issue 评论中向您反问。
fix: split system-only messages into system+user for MiniMax/Anthropi…
Memtensor-AI commentedon Jun 3, 2026
🚀 AutoDev task
17b71cc74829e6ebpushed commit.Summary: 已修复 Issue #1527:suggestion_handler 和 chat_handler 中 3 处 system-only 消息调用现已拆分为 system + user 结构,确保 MiniMax 和 Anthropic API 兼容性。
修改文件:
src/memos/api/handlers/suggestion_handler.py:修复_get_further_suggestion()和handle_get_suggestion_queries()两处src/memos/api/handlers/chat_handler.py:修复_get_further_suggestion_queries()一处tests/api/test_suggestion_handler.py:新增测试覆盖消息结构验证验证结果:
风险评估:低风险,局部修改,无 API 合约变更,无数据库迁移,向后兼容。
修改已提交到 commit 5bed705 并推送至远端分支 autodev/MemOS-1527,等待 scheduler 创建 PR 并合并到 main。
Base branch:
mainBranch:
autodev/MemOS-1527Commit:
5bed705I will create the PR next and post the PR link here.
Memtensor-AI commentedon Jun 3, 2026
✅ AutoDev task
17b71cc74829e6ebcompleted.Summary: 已修复 Issue #1527:suggestion_handler 和 chat_handler 中 3 处 system-only 消息调用现已拆分为 system + user 结构,确保 MiniMax 和 Anthropic API 兼容性。
修改文件:
src/memos/api/handlers/suggestion_handler.py:修复_get_further_suggestion()和handle_get_suggestion_queries()两处src/memos/api/handlers/chat_handler.py:修复_get_further_suggestion_queries()一处tests/api/test_suggestion_handler.py:新增测试覆盖消息结构验证验证结果:
风险评估:低风险,局部修改,无 API 合约变更,无数据库迁移,向后兼容。
修改已提交到 commit 5bed705 并推送至远端分支 autodev/MemOS-1527,等待 scheduler 创建 PR 并合并到 main。
Base branch:
mainBranch:
autodev/MemOS-1527Commit:
5bed705PR: #1868
Assigned to: @MatthewZhuang, @CarltonXiang, @syzsunshine219
Reviewers: @MatthewZhuang, @CarltonXiang, @syzsunshine219
Fix #1527: [Bug] suggestion_handler sends system-only message — fails…