You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(memory): inherit unset memory.extended.llm fields from main LLM
memory.extended.llm was all-or-nothing: without base_url AND model it
fell back to the main client entirely, so operators could not override a
single knob (e.g. thinking) without duplicating the parent connection
settings.
ResolveLLM now inherits empty fields (base_url, api_key, model,
thinking, max_tokens, temperature) from the main *llm.Client before
building the dedicated client, enabling partial overrides such as:
"llm": {"thinking": "disabled"} // same model, no reasoning for memory
"llm": {"model": "qwen2.5:7b"} // cheaper model, same backend
Fallback semantics are preserved: if base_url/model are still empty
after inheritance, it warns and reuses the main client as before.
Also patch the docker configs (godmode + restricted) to disable thinking
for extended memory calls via the new partial override, and document the
inheritance behavior in CONFIG.md and EXTENDED_MEMORY.md.
Copy file name to clipboardExpand all lines: docs/CONFIG.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -434,7 +434,7 @@ The `memory` section controls the persistent memory system (see [docs/MEMORY.md]
434
434
|`nudge_cooldown_hours`|`24`|`ODEK_MEMORY_EXTENDED_NUDGE_COOLDOWN_HOURS`| — | Per-kind cooldown before a nudge of the same kind can fire again. |
435
435
|`nudge_stale_goal_days`|`7`|`ODEK_MEMORY_EXTENDED_NUDGE_STALE_GOAL_DAYS`| — | Days without activity before a goal/intent atom counts as stale for nudges. |
436
436
|`nudge_open_question_min_age_hours`|`24`|`ODEK_MEMORY_EXTENDED_NUDGE_OPEN_QUESTION_MIN_AGE_HOURS`| — | Minimum age before a `question` atom may become a nudge candidate (younger questions are usually about to be answered). |
437
-
|`llm`| omitted | — | — | Dedicated memory LLM. If omitted, the main agent LLM is reused. A warning is emitted if that model has thinking enabled. |
437
+
|`llm`| omitted | — | — | Dedicated memory LLM. If omitted, the main agent LLM is reused. A warning is emitted if that model has thinking enabled. Fields left empty inside `llm` are inherited from the main agent LLM, so a partial override such as `"llm": {"thinking": "disabled"}` reuses the parent `base_url`/`api_key`/`model`/`max_tokens`/`temperature` while disabling reasoning for memory calls. |
438
438
|`embedding`| omitted | — | — | Dedicated embedding backend for atoms. If omitted, inherits `memory.embedding` or the shared top-level `embedding`. |
439
439
440
440
### `embedding` — real semantic embeddings (optional)
Copy file name to clipboardExpand all lines: docs/EXTENDED_MEMORY.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -113,6 +113,8 @@ Extended Memory can use its own LLM, separate from the main agent. This is ideal
113
113
114
114
If `memory.extended.llm` is omitted, the module **MUST** use the default global model. The default global model is the fully resolved main agent LLM after all config layers have been merged: top-level `model`, `base_url`, `api_key`, `thinking`, `max_tokens`, `temperature`, and `timeout` from `~/.odek/config.json`, `ODEK_*` environment variables, and CLI flags. Extended Memory does not read any of those values again; it reuses the exact `llm.Client` instance constructed for the main agent loop.
115
115
116
+
When `memory.extended.llm` is present, any field left empty (`base_url`, `api_key`, `model`, `thinking`, `max_tokens`, `temperature`) is inherited from that same main agent client, so a partial override reuses the parent connection while changing only what it sets. For example, `"llm": {"thinking": "disabled"}` keeps the main model and endpoint but disables reasoning for memory calls, and `"llm": {"model": "qwen2.5:7b"}` switches to a cheaper model on the same backend.
117
+
116
118
If the default global model has reasoning/thinking enabled, memory extraction and reranking may be expensive. In that case the operator should configure a dedicated `memory.extended.llm` for cost isolation; a warning is emitted when thinking is enabled and no dedicated memory LLM is configured.
0 commit comments