mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-05 08:07:05 +00:00
The mcp_tool_search virtual tool only did substring token matching, so a native MCP client asking for "FX" could not find a tool described as "foreign exchange rates" even though the same catalog is ranked by embeddings on /responses and /chat/completions. Adds litellm_settings.mcp_tool_search (embedding_model, top_k, similarity_threshold, core_tools). With an embedding model the caller's authorized catalog from _list_mcp_tools is ranked by cosine similarity of name plus description; configured core tools the caller can reach come first and do not consume top_k. Without an embedding model the keyword fallback keeps the old behavior. Settings are hot-reloadable from the DB, exposed on /get and /update mcp_tool_search_settings, and editable from the Admin UI under MCP Servers > Tool Search. The embedding index is shared with agent_search via a new SemanticTextIndex. Resolves LIT-6751 Co-authored-by: yassin <yassin@berri.ai> Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
38 lines
437 B
JSON
38 lines
437 B
JSON
{
|
|
"LIT001": {
|
|
"limit": 22358
|
|
},
|
|
"LIT002": {
|
|
"limit": 26774
|
|
},
|
|
"LIT003": {
|
|
"limit": 269
|
|
},
|
|
"LIT004": {
|
|
"limit": 40
|
|
},
|
|
"LIT005": {
|
|
"limit": 0
|
|
},
|
|
"LIT006": {
|
|
"limit": 1039
|
|
},
|
|
"LIT007": {
|
|
"limit": 0
|
|
},
|
|
"LIT008": {
|
|
"limit": 945
|
|
},
|
|
"LIT009": {
|
|
"limit": 0
|
|
},
|
|
"LIT010": {
|
|
"limit": 16494
|
|
},
|
|
"LIT011": {
|
|
"limit": 5535
|
|
},
|
|
"LIT012": {
|
|
"limit": 4495
|
|
}
|
|
}
|