-
Notifications
You must be signed in to change notification settings - Fork 2
feat(memory): wire StoreRoutingConfig into build_router() for cost-sensitive routing #2484
Copy link
Copy link
Closed
Labels
P3Research — medium-high complexityResearch — medium-high complexityenhancementNew feature or requestNew feature or requestmemoryzeph-memory crate (SQLite)zeph-memory crate (SQLite)
Description
Context
PR implementing #2444 (cost-sensitive store routing) added StoreRoutingConfig, LlmRouter, HybridRouter, and the AsyncMemoryRouter trait. However, context_manager.rs::build_router() still always returns HeuristicRouter regardless of the [memory.store_routing] config.
Required Change
In zeph-core/src/agent/context_manager.rs, update build_router() to read memory.store_routing config and return the appropriate router:
strategy = "heuristic"→HeuristicRouter(current behavior)strategy = "llm"→LlmRouterconstructed with the configuredrouting_classifier_providerstrategy = "hybrid"→HybridRouterwith configured provider andconfidence_threshold
The router is Arc<dyn MemoryRouter> — async callers in the recall path should downcast to AsyncMemoryRouter when LLM routing is active.
Acceptance Criteria
-
build_router()respects[memory.store_routing] strategy -
strategy = "heuristic"is identical to current behavior - LLM and hybrid strategies call the configured provider
- Fallback to heuristic on LLM failure preserved
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P3Research — medium-high complexityResearch — medium-high complexityenhancementNew feature or requestNew feature or requestmemoryzeph-memory crate (SQLite)zeph-memory crate (SQLite)