feat: enable multi-cube chat (read/write) & unify ChatRequest/ADDRequest normalization#521
Merged
CaralHsi merged 34 commits intoMemTensor:devfrom Nov 26, 2025
Merged
Conversation
## Description <!-- Please include a summary of the changes below; Fill in the issue number that this PR addresses (if applicable); Fill in the related MemOS-Docs repository issue or PR link (if applicable); Mention the person who will review this PR (if you know who it is); Replace (summary), (issue), (docs-issue-or-pr-link), and (reviewer) with the appropriate information. 请在下方填写更改的摘要; 填写此 PR 解决的问题编号(如果适用); 填写相关的 MemOS-Docs 仓库 issue 或 PR 链接(如果适用); 提及将审查此 PR 的人(如果您知道是谁); 替换 (summary)、(issue)、(docs-issue-or-pr-link) 和 (reviewer) 为适当的信息。 --> Summary: (summary) Fix: #(issue) Docs Issue/PR: (docs-issue-or-pr-link) Reviewer: @(reviewer) ## Checklist: - [ ] I have performed a self-review of my own code | 我已自行检查了自己的代码 - [ ] I have commented my code in hard-to-understand areas | 我已在难以理解的地方对代码进行了注释 - [ ] I have added tests that prove my fix is effective or that my feature works | 我已添加测试以证明我的修复有效或功能正常 - [ ] I have created related documentation issue/PR in [MemOS-Docs](https://github.com/MemTensor/MemOS-Docs) (if applicable) | 我已在 [MemOS-Docs](https://github.com/MemTensor/MemOS-Docs) 中创建了相关的文档 issue/PR(如果适用) - [ ] I have linked the issue to this PR (if applicable) | 我已将 issue 链接到此 PR(如果适用) - [ ] I have mentioned the person who will review this PR | 我已提及将审查此 PR 的人
## Description <!-- Please include a summary of the changes below; Fill in the issue number that this PR addresses (if applicable); Fill in the related MemOS-Docs repository issue or PR link (if applicable); Mention the person who will review this PR (if you know who it is); Replace (summary), (issue), (docs-issue-or-pr-link), and (reviewer) with the appropriate information. 请在下方填写更改的摘要; 填写此 PR 解决的问题编号(如果适用); 填写相关的 MemOS-Docs 仓库 issue 或 PR 链接(如果适用); 提及将审查此 PR 的人(如果您知道是谁); 替换 (summary)、(issue)、(docs-issue-or-pr-link) 和 (reviewer) 为适当的信息。 --> Summary: (summary) Fix: #(issue) Docs Issue/PR: (docs-issue-or-pr-link) Reviewer: @(reviewer) ## Checklist: - [ ] I have performed a self-review of my own code | 我已自行检查了自己的代码 - [ ] I have commented my code in hard-to-understand areas | 我已在难以理解的地方对代码进行了注释 - [ ] I have added tests that prove my fix is effective or that my feature works | 我已添加测试以证明我的修复有效或功能正常 - [ ] I have created related documentation issue/PR in [MemOS-Docs](https://github.com/MemTensor/MemOS-Docs) (if applicable) | 我已在 [MemOS-Docs](https://github.com/MemTensor/MemOS-Docs) 中创建了相关的文档 issue/PR(如果适用) - [ ] I have linked the issue to this PR (if applicable) | 我已将 issue 链接到此 PR(如果适用) - [ ] I have mentioned the person who will review this PR | 我已提及将审查此 PR 的人
…emTensor#511) ## Summary Updated [docker/.env.example](cci:7://file:///Users/nowcoder/Desktop/MemOS/docker/.env.example:0:0-0:0) to include all currently used environment variables in the codebase, ensuring users have a complete reference for configuration. ## Source - Related Issue: MemTensor#505 ## Changes - Added missing variables (e.g., `API_SCHEDULER_ON`, `MOS_CUBE_PATH`). - Clarified comments and usage for existing variables. - Verified against [src/memos/api/config.py] and other source files. ## Suggestion To further improve the onboarding experience, I suggest we consider providing multiple preset configuration files (e.g., `.env.simple`, `.env.production`, `.env.dev`) or a `.env.sync` mechanism. This would allow users to quickly choose a configuration that matches their use case without needing to manually toggle every option in a single large file.
…factor chatstream/chatcomplete function
…ut(not tackle with different types yet)
…ta to list[MessagesType]
…c into feat/chat_router
tianxing02
pushed a commit
to tianxing02/MemOS
that referenced
this pull request
Feb 24, 2026
…est normalization (MemTensor#521) * docs: update .env.example with comprehensive variables and comments * hotfix:hotfix * feat: add multi-cube feature to chat * refactor: define ChatRequest and related backups * fix: func name in product models * feat: add 'task_id' in AddRequest(for get async add status later); refactor chatstream/chatcomplete function * feat: add add-mode in API AddRequest * add server router add api example * feat: update server router example * feat: tiny update for simple struct: support MessageType only for input(not tackle with different types yet) * feat: add _coerce_scene_data in simple memreader to transform scenedata to list[MessagesType] * feat: add multi-model reader * feat: init multi-model; update _coerce_scene_data * feat: add chat_time in coerce_scene_data * refactor: tiny adjust function name and remove useless func * feat: adjuct doc process in simple_struct mem-reader * refactor: rename _get_scene_data_info -> get_scene_data_info * feat: finish simple reader * format: update example reader: just better display * feat: update test coarse memory * feat: add MultiModelStruct MemReader * feat: update multi_model_struct, simplify and as a child from SimpleStructReader * feat: update multi_model_struct parser * fix: test bug --------- Co-authored-by: HarveyXiang <harvey_xiang@163.com> Co-authored-by: fancy <fancyboi999@gmail.com> Co-authored-by: fridayL <lcy081099@gmail.com> Co-authored-by: chunyu li <78344051+fridayL@users.noreply.github.com> Co-authored-by: yuan.wang <yuan.wang@yuanwangdebijibendiannao.local>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Summary: This PR introduces multi-cube support for the Chat API and unifies normalization logic across ChatRequest and APIADDRequest. Deprecated fields remain backward-compatible, while the new structure enables proper read/write separation in real multi-cube deployments.
Fix: #(issue)
Docs Issue/PR: (docs-issue-or-pr-link)
Reviewer: @(reviewer)
Checklist: