Remove duplicate tool index startup warmup

get_tool_index() calls index_builtin_tools() on first init
(src/tool_index.py:469-470), and _warmup_tool_index then calls it
explicitly right after. Every cold boot embeds all 58 built-in tools
twice and double-upserts them into the ChromaDB collection.

The remaining get_tools_for_query call still pre-warms the query path.

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
LittleLlama
2026-06-01 07:07:42 -07:00
committed by GitHub
parent 7711e14f90
commit 74dedcad37

1
app.py
View File

@@ -818,7 +818,6 @@ async def startup_event():
from src.tool_index import get_tool_index
idx = await asyncio.to_thread(get_tool_index)
if idx:
await asyncio.to_thread(idx.index_builtin_tools)
await asyncio.to_thread(idx.get_tools_for_query, "warmup", 8)
logger.info("[startup] Tool index pre-warmed")
except Exception as e: