feat: Implement Redis LLM Caching and Health Monitor Metrics#626
Conversation
- Replaced `redis` with `ioredis` for robust Redis client management. - Implemented cache invalidation via version prefixes (e.g., `v1`). - Added tracking and reporting for `llm_cache_hit`, `llm_cache_miss`, and `llm_cache_size` in the `health_monitor` MCP server. - Wrote comprehensive end-to-end integration tests and performance benchmarks in `tests/integration/llm_cache_validation.test.ts`. - Updated `docs/LLM_CACHING.md` with Redis config examples and benchmark results. - Marked LLM Call Caching as completed in `docs/ROADMAP.md`. Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
Appended `Date.now() + Math.random().toString()` to the `System prompt` values in `tests/integration/llm_cache_integration.test.ts` and `tests/integration/llm_cache_validation.test.ts`. This ensures that persistent disk files created by the FileCache in `.agent/cache/llm/` during previous test runs do not incorrectly trigger cache hits in subsequent runs (which was causing assertion failures when checking `generateText` spy call counts). Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
This PR finalized the Phase 28 LLM Call Caching task.
It implements the
ioredisbackend, fully integratesllm_cache_hit,llm_cache_miss, andllm_cache_sizeinto thehealth_monitorMCP, ensures TTL and schema version invalidation are respected, and brings the feature under rigorous test validation viallm_cache_validation.test.ts.Test Results
Benchmark Results:
PR created automatically by Jules for task 382324008761007450 started by @stancsz