{"repo":"NousResearch/hermes-agent","public_id":"6259","display_label":"Hindsight integration bug fixes and config corrections","summary":"These items address configuration issues in the Hindsight integration, including a config key mismatch, an API key environment variable typo, base URL support additions, and a memory setup bug related to Hermes.","subsystem":null,"counts":{"members":3,"open_issues":0,"open_issues_distinct":0,"open_prs":0,"closed_issues":1,"merged_prs":1,"attempt_prs":1},"landed_fix":{"status":"merged_to_main","basis":"structural","pr":6282,"merged_at":"2026-04-08T20:46:15+00:00"},"resolution":{"state":"resolved","by":"pr-6282"},"freshness":{"state":"stale","last_verified_at":"2026-04-08T20:46:15+00:00","is_stale":true},"grouping":{"backbone":"STRUCTURAL_SPANNING","link_density":0.6666666666666666},"fix_edges":[{"issue_number":6259,"pr_number":6282,"tier":"verified","basis":"closing_ref","confidence":0.95,"recoverable_from_timeline":true,"pr_merged_at":"2026-04-08T20:46:15+00:00"}],"members":[{"kind":"issue","number":6259,"title":"[Bug]: Hermes memory setup for Hindsight","url":null,"state":"closed"},{"kind":"pr","number":6274,"title":"fix(hindsight): correct API key env var typo and add Base URL support (#6259)","url":null,"state":"closed","close_reason":{"refs":[{"kind":"pr","value":"#6282","number":6282}],"category":"merged_via","implication":"superseded"},"merged":false},{"kind":"pr","number":6282,"title":"fix(hindsight): correct config key mismatch and add base URL support","url":null,"state":"merged","close_reason":{"category":"merged"},"merged":true,"is_fix_pr":true,"fix_tier":"verified","files_changed":["plugins/memory/hindsight/README.md","plugins/memory/hindsight/__init__.py"],"fix_hunks":[{"file":"plugins/memory/hindsight/README.md","hunks":["@@ -73,6 +73,7 @@ Config file: `~/.hermes/hindsight/config.json`\n |-----|---------|-------------|\n | `llm_provider` | `openai` | LLM provider: `openai`, `anthropic`, `gemini`, `groq`, `minimax`, `ollama` |\n | `llm_model` | per-provider | Model name (e.g. `gpt-4o-mini`, `openai/gpt-oss-120b`) |\n+| `llm_base_url` | — | LLM Base URL override (e.g. `https://openrouter.ai/api/v1`) |\n \n The LLM API key is stored in `~/.hermes/.env` as `HINDSIGHT_LLM_API_KEY`.\n ","@@ -92,6 +93,7 @@ Available in `hybrid` and `tools` memory modes:\n |----------|-------------|\n | `HINDSIGHT_API_KEY` | API key for Hindsight Cloud |\n | `HINDSIGHT_LLM_API_KEY` | LLM API key for local mode |\n+| `HINDSIGHT_API_LLM_BASE_URL` | LLM Base URL for local mode (e.g. OpenRouter) |\n | `HINDSIGHT_API_URL` | Override API endpoint |\n | `HINDSIGHT_BANK_ID` | Override bank name |\n | `HINDSIGHT_BUDGET` | Override recall budget |"]},{"file":"plugins/memory/hindsight/__init__.py","hunks":["@@ -235,6 +235,7 @@ def get_config_schema(self):\n             {\"key\": \"api_key\", \"description\": \"Hindsight Cloud API key\", \"secret\": True, \"env_var\": \"HINDSIGHT_API_KEY\", \"url\": \"https://ui.hindsight.vectorize.io\", \"when\": {\"mode\": \"cloud\"}},\n             {\"key\": \"llm_provider\", \"description\": \"LLM provider for local mode\", \"default\": \"openai\", \"choices\": [\"openai\", \"anthropic\", \"gemini\", \"groq\", \"minimax\", \"ollama\"], \"when\": {\"mode\": \"local\"}},\n             {\"key\": \"llm_api_key\", \"description\": \"LLM API key for local Hindsight\", \"secret\": True, \"env_var\": \"HINDSIGHT_LLM_API_KEY\", \"when\": {\"mode\": \"local\"}},\n+            {\"key\": \"llm_base_url\", \"description\": \"LLM Base URL (e.g. for OpenRouter)\", \"default\": \"\", \"env_var\": \"HINDSIGHT_API_LLM_BASE_URL\", \"when\": {\"mode\": \"local\"}},\n             {\"key\": \"llm_model\", \"description\": \"LLM model for local mode\", \"default\": \"gpt-4o-mini\", \"default_from\": {\"field\": \"llm_provider\", \"map\": _PROVIDER_DEFAULT_MODELS}, \"when\": {\"mode\": \"local\"}},\n             {\"key\": \"bank_id\", \"description\": \"Memory bank name\", \"default\": \"hermes\"},\n             {\"key\": \"budget\", \"description\": \"Recall thoroughness\", \"default\": \"mid\", \"choices\": [\"low\", \"mid\", \"high\"]},","@@ -251,12 +252,16 @@ def _get_client(self):\n                 # different loop\" errors during GC — we handle cleanup in\n                 # shutdown() instead.\n                 HindsightEmbedded.__del__ = lambda self: None\n-                self._client = HindsightEmbedded(\n+                kwargs = dict(\n                     profile=self._config.get(\"profile\", \"hermes\"),\n                     llm_provider=self._config.get(\"llm_provider\", \"\"),\n-                    llm_api_key=self._config.get(\"llmApiKey\") or os.environ.get(\"HINDSIGHT_LLM_API_KEY\", \"\"),\n+                    llm_api_key=self._config.get(\"llm_api_key\") or os.environ.get(\"HINDSIGHT_LLM_API_KEY\", \"\"),\n                     llm_model=self._config.get(\"llm_model\", \"\"),\n                 )\n+                base_url = self._config.get(\"llm_base_url\") or os.environ.get(\"HINDSIGHT_API_LLM_BASE_URL\", \"\")\n+                if base_url:\n+                    kwargs[\"llm_base_url\"] = base_url\n+                self._client = HindsightEmbedded(**kwargs)\n             else:\n                 from hindsight_client import Hindsight\n                 kwargs = {\"base_url\": self._api_url, \"timeout\": 30.0}","@@ -311,9 +316,10 @@ def _start_daemon():\n                     # If the config changed and the daemon is running, stop it.\n                     from pathlib import Path as _Path\n                     profile_env = _Path.home() / \".hindsight\" / \"profiles\" / f\"{profile}.env\"\n-                    current_key = self._config.get(\"llmApiKey\") or os.environ.get(\"HINDSIGHT_LLM_API_KEY\", \"\")\n+                    current_key = self._config.get(\"llm_api_key\") or os.environ.get(\"HINDSIGHT_LLM_API_KEY\", \"\")\n                     current_provider = self._config.get(\"llm_provider\", \"\")\n                     current_model = self._config.get(\"llm_model\", \"\")\n+                    current_base_url = self._config.get(\"llm_base_url\") or os.environ.get(\"HINDSIGHT_API_LLM_BASE_URL\", \"\")\n \n                     # Read saved profile config\n                     saved = {}","@@ -326,18 +332,22 @@ def _start_daemon():\n                     config_changed = (\n                         saved.get(\"HINDSIGHT_API_LLM_PROVIDER\") != current_provider or\n                         saved.get(\"HINDSIGHT_API_LLM_MODEL\") != current_model or\n-                        saved.get(\"HINDSIGHT_API_LLM_API_KEY\") != current_key\n+                        saved.get(\"HINDSIGHT_API_LLM_API_KEY\") != current_key or\n+                        saved.get(\"HINDSIGHT_API_LLM_BASE_URL\", \"\") != current_base_url\n                     )\n \n                     if config_changed:\n                         # Write updated profile .env\n                         profile_env.parent.mkdir(parents=True, exist_ok=True)\n-                        profile_env.write_text(\n+                        env_lines = (\n                             f\"HINDSIGHT_API_LLM_PROVIDER={current_provider}\\n\"\n                             f\"HINDSIGHT_API_LLM_API_KEY={current_key}\\n\"\n                             f\"HINDSIGHT_API_LLM_MODEL={current_model}\\n\"\n                             f\"HINDSIGHT_API_LOG_LEVEL=info\\n\"\n                         )\n+                        if current_base_url:\n+                            env_lines += f\"HINDSIGHT_API_LLM_BASE_URL={current_base_url}\\n\"\n+                        profile_env.write_text(env_lines)\n                         if client._manager.is_running(profile):\n                             with open(log_path, \"a\") as f:\n                                 f.write(\"\\n=== Config changed, restarting daemon ===\\n\")\n"]}]}],"trust":{"default_tier":"verified","includes_suggested":false}}