refactor: remove P generic from Agent, SemanticMemory, CodeRetriever (M24)#423
Merged
refactor: remove P generic from Agent, SemanticMemory, CodeRetriever (M24)#423
Conversation
…(M24) Remove LlmProvider generic parameter from Agent<P,C,T> -> Agent<C,T>, SemanticMemory<P> -> SemanticMemory, CodeRetriever<P> -> CodeRetriever. All now store AnyProvider directly, eliminating monomorphization bloat. Add cached_prompt_tokens for incremental token counting instead of rescanning full message list on every LLM call. Add safetensors header validation before unsafe mmap in candle loader. Add sccache setup guide for macOS developers. Centralize MockProvider in zeph-llm under mock feature flag. Resolves #398, #400, #402, #406, #407, #414
This was
linked to
issues
Feb 17, 2026
Remove local MockProvider/StreamingMockProvider/FailingProvider structs from integration tests. Use centralized zeph-llm mock module with AnyProvider::Mock wrapper. Add mock feature flag to root Cargo.toml. Extend MockProvider with delay_ms for timeout simulation.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Removes the
P: LlmProvidergeneric parameter from core types, completing the M24 architecture improvements epic.Architecture (#398, #407)
Agent<P, C, T>->Agent<C, T>— storesAnyProviderdirectlySemanticMemory<P>->SemanticMemory— storesAnyProviderdirectlyCodeRetriever<P>->CodeRetriever,CodeIndexer<P>->CodeIndexerMemoryState,IndexStatelose P parameterPerformance (#400, #402)
cached_prompt_tokensfield with incremental updates on message push/pop/drain/compactSecurity (#414)
Developer experience (#406)
Testing
MockProviderin zeph-llm undermockfeature flagStats
Breaking changes
Agent<P, C, T>->Agent<C, T>SemanticMemory<P>->SemanticMemoryCodeRetriever<P>,CodeIndexer<P>,IndexWatcher<P>lose Pmockfeature for MockProviderTest plan
Resolves #398, #400, #402, #406, #407, #414
Completes epic #391