fix(desktop): show Hindsight local_embedded mode + LLM config in settings - #58924
fix(desktop): show Hindsight local_embedded mode + LLM config in settings#58924yingliang-zhang wants to merge 2 commits into
Conversation
Related: #57126 (adds |
tonydwb
left a comment
There was a problem hiding this comment.
Code Review Summary
Verdict: Approved
Good bug fix for Hindsight local_embedded mode display. Well-scoped change to show the correct mode indicator and LLM config in settings. Single concern.
Reviewed by Hermes Agent
|
Thanks for the review @tonydwb. Rebased onto latest main and resolved test conflicts in
All 357 |
862f26e to
06034a4
Compare
teknium1
left a comment
There was a problem hiding this comment.
Thanks for addressing the Desktop declared-schema gap; the premise is confirmed on current main.
Problems
hermes_cli/memory_providers.py:124makesllm_providerfree text. The declared write path only validates selects (hermes_cli/web_server.py:5257-5265), but Hindsight defines a finite provider list (plugins/memory/hindsight/__init__.py:980) and forwards the stored value intoHindsightEmbedded(plugins/memory/hindsight/__init__.py:1031-1040). Please expose this as a select using that supported list.- The changed test at
tests/hermes_cli/test_web_server.py:475covers the raw plugin endpoint. Desktop uses?surface=declared(apps/desktop/src/hermes.ts:522,528). Current main's declared-surface test attests/hermes_cli/test_web_server.py:494-502still asserts the old five-field schema, so it must be updated along with a declared-surface save/secret-status round trip.
Automated hermes-sweeper review.
06034a4 to
27211a8
Compare
27211a8 to
98de302
Compare
…ings The desktop memory-provider schema excluded local_embedded from the mode select, causing the UI to coerce it to cloud (default) and display "API unset" for users with a valid local_embedded config. Saving from the UI would silently overwrite the mode to cloud, breaking the setup. Additionally, the schema only declared HINDSIGHT_API_KEY (cloud) but not HINDSIGHT_LLM_API_KEY (local embedded), so the LLM API key status was invisible. The llm_provider, llm_base_url, and llm_model fields were also missing, making local_embedded configs unviewable and uneditable from the desktop settings panel. Changes: - Add local_embedded to Hindsight mode select options - Add llm_api_key secret field (env_key=HINDSIGHT_LLM_API_KEY) - Add llm_provider, llm_base_url, llm_model text fields - Rename api_key label to "Cloud API key" for disambiguation - Update test_memory_providers.py: expand field set, add llm_api_key test - Update test_web_server.py: accept local_embedded mode, assert new fields Supersedes NousResearch#57126 (which adds local_embedded mode only). This PR also adds the LLM config fields needed for local_embedded to be fully configurable from the desktop UI. Closes NousResearch#7718
98de302 to
6911afc
Compare
Summary
local_embeddedto the Hindsight mode select options in the desktop memory-provider schema.llm_api_key(secret,HINDSIGHT_LLM_API_KEY),llm_provider,llm_base_url, andllm_modelfields so local_embedded configs are fully visible and editable from the desktop settings panel.api_keylabel to "Cloud API key" for disambiguation.test_memory_providers.pyandtest_web_server.pyto match.Why
A valid Hindsight config can use
mode: local_embedded, but the desktop config surface only allowedcloudandlocal_external. The web endpoint therefore treatedlocal_embeddedas an unsupported select value and fell back to the defaultcloud, making the settings panel misleading and risking an accidental save back to cloud mode.Additionally, the schema only declared
HINDSIGHT_API_KEY(cloud) but notHINDSIGHT_LLM_API_KEY(local embedded), so the LLM API key status was invisible. Thellm_provider,llm_base_url, andllm_modelfields were also missing, making local_embedded configs unviewable and uneditable from the desktop settings panel.Relationship to other PRs
Supersedes #57126 (which adds
local_embeddedmode only). This PR also adds the LLM config fields needed for local_embedded to be fully configurable from the desktop UI.Related: #7718 (hindsight-all dependency gap for local_embedded), #48675 (broader schema-driven memory-provider refactor).
Test Plan
python -m pytest tests/hermes_cli/test_memory_providers.py tests/hermes_cli/test_web_server.py -v— 346 passed, 0 failedGET /api/memory/providers/hindsight/configcorrectly returnsmode=local_embedded,llm_api_key.is_set=true, and all LLM field values for a real local_embedded config