mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-10 22:41:41 +00:00
Creating a search tool through the UI only wrote the row; the router was updated solely by the add_deployment job, so the tool was unusable for up to PROXY_CONFIG_RELOAD_INTERVAL_SECONDS (30s by default) even on the worker that served the write. Tools declared in config.yaml load straight into the router at startup, which is why they never showed the delay. The create, update and delete endpoints now refresh the router inline, matching what the MCP server endpoints already do. The refresh is best-effort: the row is already committed, so a failure must not surface as a 500 and push the caller into a retry that creates duplicates. Two related gaps go with it. _init_search_tools_in_db skipped the router update whenever the merged list came back empty, so deleting the last search tool left it live in memory forever. And in store_model_in_db-off deployments the add_deployment job is never scheduled, so DB-backed search tools never reached the router at all; that branch now loads them at startup and keeps them fresh on its own interval, the same way MCP servers already do. |
||
|---|---|---|
| .. | ||
| test_search_tool_management.py | ||