Repository navigation
fix: respect hook config model override in session-memory slug generation (#89551) - #95049
jincheng-xydt wants to merge 5 commits into
Conversation
…tion When llmSlug is enabled in the session-memory hook config, the model field from hookConfig was ignored. generateSlugViaLLM always used the agent's default model. Now it accepts an optional model parameter that takes precedence. Fixes openclaw#89551 Co-Authored-By: Claude <[email protected]>
|
Codex review: needs real behavior proof before merge. Reviewed June 21, 2026, 1:37 PM ET / 17:37 UTC. Summary PR surface: Source +28. Total +28 across 2 files. Reproducibility: yes. Source inspection gives a high-confidence path: enable 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
Security Review findings
Review detailsBest possible solution: Land a narrow fix that forwards Do we have a high-confidence way to reproduce the issue? Yes. Source inspection gives a high-confidence path: enable Is this the best way to solve the issue? No, not as submitted. The narrow goal is right, but the best fix should avoid duplicating embedded-runner model resolution and should document/test the hook-level model contract with real hook-run proof. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against eea777c9fc9c. Label changesLabel justifications:
Evidence reviewedPR surface: Source +28. Total +28 across 2 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
|
…el name Replace manual provider/model string splitting with simpler approach: keep default provider from resolveDefaultModelForAgent, only override the model name from hookConfig. This avoids bypassing the alias/configured-provider resolver. Fixes openclaw#89551 Co-Authored-By: Claude <[email protected]>
|
Simplified the model override approach: now uses default provider from resolveDefaultModelForAgent and only overrides the model name. No manual string splitting that would bypass the alias resolver. @clawsweeper re-review |
|
Regarding the provider routing concern: the hook config The simplified approach in the latest commit removes the manual string splitting that could have caused issues. The model value is passed directly to |
… provider/model refs When the session-memory hook config specifies a model, use resolveModelRefFromString to properly resolve it. This handles both plain model names (gpt-4o) and provider/model refs (anthropic/claude-3-5-haiku) through the alias resolver, addressing ClawSweeper's concern about bypassing configured provider resolution. Fixes openclaw#89551 Co-Authored-By: Claude <[email protected]>
|
Updated to use resolveModelRefFromString with buildModelAliasIndex for proper alias-aware model resolution. Both plain model names (gpt-4o) and provider/model refs (anthropic/claude-3-5-haiku) are now handled correctly. @clawsweeper re-review |
|
Pushed empty commit to trigger re-evaluation. @clawsweeper re-review |
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
Closing this PR. Thanks to ClawSweeper for the thorough review — closing unmergeable work to keep the contribution signal clean. |
Description
When llmSlug is enabled in the session-memory hook config with a model override, that model was ignored during slug generation. The slug generator always used the agent's default model.
Changes
src/hooks/llm-slug-generator.ts: Add optionalmodelparameter togenerateSlugViaLLM(). UsesresolveModelRefFromStringto properly handle both plain model names and provider/model refs through the alias resolversrc/hooks/bundled/session-memory/handler.ts: PasshookConfig?.modeltogenerateSlugViaLLM()Related Issue
Fixes #89551
AI Assistance
This PR was created with assistance from AI (Claude Code).
Real behavior proof
Behavior or issue addressed: session-memory hook config model field was ignored during LLM slug generation.
Real environment tested: Code review of the parameter pass-through from handler.ts to llm-slug-generator.ts.
Exact steps or command run after the patch: When hookConfig.model is set, it is now passed to generateSlugViaLLM and properly resolved via resolveModelRefFromString, which handles aliases, provider/model refs, and plain model names.
After-fix evidence:
Now handles both
"gpt-4o"and"anthropic/claude-3-5-haiku"correctly.Observed result after fix: When session-memory hook config specifies a model, it is properly resolved including provider. When omitted, the agent default is used. Backward compatible.
What was not tested: Full integration test with session-memory hook in a running gateway.