mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-06-17 10:15:27 -04:00
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:
@@ -818,7 +818,6 @@ async def startup_event():
|
|||||||
from src.tool_index import get_tool_index
|
from src.tool_index import get_tool_index
|
||||||
idx = await asyncio.to_thread(get_tool_index)
|
idx = await asyncio.to_thread(get_tool_index)
|
||||||
if idx:
|
if idx:
|
||||||
await asyncio.to_thread(idx.index_builtin_tools)
|
|
||||||
await asyncio.to_thread(idx.get_tools_for_query, "warmup", 8)
|
await asyncio.to_thread(idx.get_tools_for_query, "warmup", 8)
|
||||||
logger.info("[startup] Tool index pre-warmed")
|
logger.info("[startup] Tool index pre-warmed")
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
|||||||
Reference in New Issue
Block a user