Repository navigation
fix(session-memory): honor configured slug model - #97007
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed July 11, 2026, 1:02 AM ET / 05:02 UTC. Summary PR surface: Source -3, Tests -7, Docs +3. Total -7 across 6 files. Reproducibility: yes. from source: current Review metrics: 1 noteworthy metric.
Stored data model Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Risk before merge
Maintainer options:
Next step before merge
Maintainer decision needed
Security Review detailsBest possible solution: Keep the embedded runner as the single model-resolution owner and merge after redacted current-head runtime evidence confirms a non-default slug model is selected, or after an explicit maintainer proof override. Do we have a high-confidence way to reproduce the issue? Yes from source: current Is this the best way to solve the issue? Yes. Forwarding the raw optional model into the established embedded-runner resolver is the narrowest maintainable fix and avoids a parallel hook-specific routing implementation. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against c47ceb0f3dcc. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source -3, Tests -7, Docs +3. Total -7 across 6 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
Review history (4 earlier review cycles)
|
9967f3e to
8ae536b
Compare
8ae536b to
95d6a56
Compare
|
Land-ready at final exact head Maintainer cleanup centralized model selection in the embedded runner, compacted the regression coverage, corrected alias semantics, and added the public hook documentation. The final diff is 35 additions and 42 deletions across six files. Proof:
Proof gap: no authenticated live provider call was run. The changed routing boundary is directly covered by the handler and slug-generator tests; the unchanged embedded runner owns provider/model resolution. Thanks @SunnyShu0925 for the contribution. |
…ator When llmSlug is enabled with a model override in the session-memory hook config, that model was ignored — slug generation always resolved the agent default model via resolveDefaultModelForAgent. Add an optional model parameter to generateSlugViaLLM and pass hookConfig.model from the session-memory handler. When a hook model is provided, only the model is forwarded (provider is omitted) so runEmbeddedAgent's built-in resolveInitialEmbeddedRunModel chain handles alias, provider-qualified ref, and bare-name resolution through a single source of truth — avoiding the routing drift that blocked prior PRs. Fixes openclaw#89551 Co-Authored-By: Claude Opus 4.8 <[email protected]>
Honor the session-memory slug model override while keeping default, alias, and provider-qualified model selection in the embedded runner. Co-authored-by: SunnyShu <[email protected]>
95d6a56 to
ed5b80b
Compare
|
Merged via squash.
|
* [AI] fix(session-memory): forward hook config model to LLM slug generator When llmSlug is enabled with a model override in the session-memory hook config, that model was ignored — slug generation always resolved the agent default model via resolveDefaultModelForAgent. Add an optional model parameter to generateSlugViaLLM and pass hookConfig.model from the session-memory handler. When a hook model is provided, only the model is forwarded (provider is omitted) so runEmbeddedAgent's built-in resolveInitialEmbeddedRunModel chain handles alias, provider-qualified ref, and bare-name resolution through a single source of truth — avoiding the routing drift that blocked prior PRs. Fixes openclaw#89551 Co-Authored-By: Claude Opus 4.8 <[email protected]> * fix(session-memory): centralize slug model resolution Honor the session-memory slug model override while keeping default, alias, and provider-qualified model selection in the embedded runner. Co-authored-by: SunnyShu <[email protected]> --------- Co-authored-by: Claude Opus 4.8 <[email protected]> Co-authored-by: Peter Steinberger <[email protected]>
Fixes #89551
What Problem This Solves
Fixes an issue where users enabling LLM-generated session-memory slugs could not select a dedicated slug model:
hooks.internal.entries.session-memory.modelwas accepted but ignored, so/newand/resetalways used the agent's primary model.Why This Change Was Made
The session-memory hook now forwards its optional model override to the embedded runner. The runner remains the single owner of configured aliases, bare model IDs, provider-qualified refs, and agent-default fallback; no duplicate model-selection path is kept in the hook.
The bundled hook guide and public hooks documentation describe the supported model forms. No config migration, provider behavior, session format, or timestamp fallback changes.
User Impact
Users can set
hooks.internal.entries.session-memory.modelto a configured alias such assonnet, a bare model ID on the agent's default provider, or aprovider/modelref. When omitted, slug generation still uses the agent's default model; failures still fall back to timestamp filenames.Evidence
9967f3e7603084782a47d28023912e51ce4a1991: focused hook tests, 46/46 passed (run_536260e8afbc).95d6a56b554f12d327b59cc2fd915376f6072f7b: focused hook tests, 44/44 passed (tbx_01kx7r7y05qk69r36br5zd561n; run 29140268648).ed5b80b4ee06f5fccc84737c0bbfa072e2065343: no accepted/actionable findings, confidence 0.96.oxfmt --checkon all six changed files andgit diff --check: passed.ed5b80b4ee06f5fccc84737c0bbfa072e2065343.No authenticated live provider call was run; routing is covered at the handler-to-embedded-runner boundary, while the runner's existing model-selection contract owns the provider call.