perf(planner): add tool description compressor with Redis cache (#5065)#5822
Merged
mrveiss merged 1 commit intoDev_new_guifrom Apr 24, 2026
Merged
perf(planner): add tool description compressor with Redis cache (#5065)#5822mrveiss merged 1 commit intoDev_new_guifrom
mrveiss merged 1 commit intoDev_new_guifrom
Conversation
New module autobot-backend/tools/description_compressor.py:
- compress_description(tool_name, tool_spec) — async; cache-first via Redis
- SHA-256 keyed cache (tool_desc:{name}:{hash16}), 30-day TTL
- Ollama POST to config.ollama_url/api/generate for compression
- Falls back to raw description on any failure
Extended ToolRegistry.get_compressed_descriptions() — gathers all tools
concurrently via asyncio.gather.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This was referenced Apr 24, 2026
Open
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
autobot-backend/tools/description_compressor.pywithcompress_description(tool_name, tool_spec):tool_desc:{name}:{sha256_16}key, 30-day TTLPOST /api/generateusingconfig.ollama_url+config.llm.system_modelToolRegistry.get_compressed_descriptions()— gathers all tools concurrently viaasyncio.gatherTest Plan
python -m py_compile autobot-backend/tools/description_compressor.pypassespython -m py_compile autobot-backend/tools/tool_registry.pypassesCloses #5065
🤖 Generated with Claude Code