fix: address ByteRover review feedback#5
Merged
Conversation
terencez127
added a commit
to terencez127/hermes-memory-ui
that referenced
this pull request
Jun 29, 2026
Fixes from code review of the initial OSS patch: #1 & xraysight#2 - Silent swallow + duplicate import bug: Hoist MemoryConfig import above both try blocks, catch ImportError explicitly with a user-facing error. Replace 'pass' fallthrough (which silently called Memory(config=raw_dict) and always crashed) with an explicit error message returned to the dashboard. xraysight#3 - mode:oss with flat config layout ignored: When mem0.json uses {"mode":"oss", "llm":{...}} (flat, no "oss" sub-block), oss_config was None and Memory() was called with no config at all, ignoring user settings. Now: flat layout is detected and the whole file_cfg (minus "mode" key) is used as oss_config. xraysight#4 - agent_id asymmetry between OSS and cloud scope: OSS was always injecting agent_id="hermes" (the default) into filters, causing OSS to return a narrower result set than cloud for the same user. Now: agent_id filter only applied when explicitly set to a non-default value, matching cloud path behaviour. xraysight#5 - rerank not forwarded to OSS search: Memory.search() supports rerank=bool. Now forwarded consistently with the cloud path. xraysight#6 - double file_cfg.get('oss') call: Replaced with a single _oss_block local variable. xraysight#7 - get_all() fetches unbounded, client-side limit only: Memory.get_all() and Memory.search() both support top_k. Now passed server-side so large local vector stores are not over-fetched.
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.
Summary
This is a follow-up to #4 addressing the automated Codex review feedback for the ByteRover dashboard integration.
Changes
Why
Codex flagged three issues in #4: