Repository navigation
Fix #1527: [Bug] suggestion_handler sends system-only message — fails on MiniMax & Anthropi - #1868
Conversation
…c compatibility Fixes #1527 Changes: - suggestion_handler.py: Split system-only messages in _get_further_suggestion() and handle_get_suggestion_queries() - chat_handler.py: Split system-only message in _get_further_suggestion_queries() - Added test coverage in test_suggestion_handler.py All modified functions now use [system, user] message structure instead of system-only, ensuring compatibility with MiniMax and Anthropic APIs while maintaining OpenAI compatibility.
🤖 Open Code ReviewTarget: PR #1868 🔍 OpenCodeReview found 26 issue(s) in this PR. 1.
|
|
Automated Test Results: PASSED Cloud test-engine rerun against
Manual code review is still required before merge. |
Description
已修复 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。
Related Issue (Required): Fixes #1527
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Executor did not report tests.
Checklist
@MatthewZhuang, @CarltonXiang, @syzsunshine219 please review this PR.
Reviewer Checklist