{"record":{"id":"e4796d2b58b49aee","repo":"bytedance/deer-flow","slug":"deermem-memory-update-requested-but-no-llm-is-conf","errorCode":null,"errorMessage":"DeerMem memory update requested but no LLM is configured (set memory.backend_config.model in config).","messagePattern":"DeerMem memory update requested but no LLM is configured \\(set memory\\.backend_config\\.model in config\\)\\.","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"critical","filePath":"backend/packages/harness/deerflow/agents/memory/backends/deermem/deermem/core/updater.py","lineNumber":1482,"sourceCode":"            # reference only turns the LLM will actually see. The admission-time\n            # ``signals`` (detected on the full conversation in DeerMem) already\n            # served their purpose (backpressure admission at enqueue); the hint\n            # is a soft nudge and must not point at turns the watermark excluded.\n            feed_signals = detect_signals(feed_messages, patterns_dir=self._config.patterns_dir)\n            prepared = self._prepare_update_prompt(\n                messages=feed_messages,\n                agent_name=agent_name,\n                signals=feed_signals,\n                user_id=user_id,\n            )\n            if prepared is None:\n                return False\n\n            current_memory, prompt = prepared\n            model_name = self._config.model.model\n            model = self._llm\n            if model is None:\n                raise RuntimeError(\"DeerMem memory update requested but no LLM is configured (set memory.backend_config.model in config).\")\n            invoke_config: dict[str, Any] = {\"run_name\": \"memory_agent\"}\n            # Pre-LLM-call observability hook (e.g. langfuse): merge trace\n            # metadata into invoke_config before the call so a tracer emits a\n            # span at the LLM boundary. None = no tracing (langfuse not\n            # hard-required). Subsumes the former backend_config.tracing_callback.\n            if self._callbacks is not None:\n                self._callbacks.on_memory_llm_call(\n                    invoke_config,\n                    thread_id=thread_id,\n                    user_id=user_id,\n                    trace_id=trace_id,\n                    model_name=model_name,\n                )\n            logger.info(\"Invoking memory-update LLM (thread=%s trace_id=%s)\", thread_id, trace_id)\n            attempted = True\n            started = time.monotonic()\n            try:\n                response = model.invoke(prompt, config=invoke_config)","sourceCodeStart":1464,"sourceCodeEnd":1500,"githubUrl":"https://github.com/bytedance/deer-flow/blob/1dd6ba1acb03700589994b0366c5d1c7d05e2eff/backend/packages/harness/deerflow/agents/memory/backends/deermem/deermem/core/updater.py#L1464-L1500","documentation":"DeerMem's LLM-driven memory update (fact extraction from conversation) requires a model; if the updater was constructed without one (self._llm is None) it raises this RuntimeError naming the fix: set memory.backend_config.model in config.yaml. Everything up to prompt preparation succeeds, so the failure surfaces exactly at the LLM call boundary.","triggerScenarios":"Enabling the deermem memory backend without a memory.backend_config.model entry in config.yaml, or a config where backend_config.model is present but empty/null so no LLM client is built.","commonSituations":"Fresh installs that copied config.example.yaml but skipped the memory section, switching memory backend from a non-LLM one (e.g. file-based) to deermem without adding model config, or environment-specific configs that diverge.","solutions":["Add memory.backend_config.model to config.yaml, e.g. model: {model: gpt-4o-mini, ...} (copy the block from config.example.yaml)","Restart the Gateway after editing config.yaml — config is read at startup","Run `make doctor` to validate the config before starting"],"exampleFix":"# config.yaml — before\nmemory:\n  backend: deermem\n# after\nmemory:\n  backend: deermem\n  backend_config:\n    model:\n      model: gpt-4o-mini\n      api_key: ${LLM_API_KEY}","handlingStrategy":"validation","validationCode":"import yaml\n\ncfg = yaml.safe_load(open(\"config.yaml\"))\nmodel_cfg = (cfg.get(\"memory\", {}).get(\"backend_config\", {}) or {}).get(\"model\")\nif cfg.get(\"memory\", {}).get(\"backend\") == \"deermem\" and not model_cfg:\n    raise SystemExit(\"deermem requires memory.backend_config.model in config.yaml\")","typeGuard":null,"tryCatchPattern":"try:\n    memory.update_thread_memory(...)\nexcept RuntimeError as e:\n    if \"no LLM is configured\" in str(e):\n        logger.error(\"Config error: set memory.backend_config.model in config.yaml and restart\")\n    raise","preventionTips":["Run `make doctor` after enabling the deermem backend","Add a startup assertion that backend_config.model is set when backend is deermem"],"tags":["memory","deermem","configuration","llm","startup"],"backgroundTag":null,"analyzedSha":"1dd6ba1acb03700589994b0366c5d1c7d05e2eff","analyzedAt":"2026-08-14T21:20:34.804Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}