test: cover host skill tool scoping

This commit is contained in:
huanghuoguoguo
2026-06-07 07:48:56 +08:00
parent 80485b57ea
commit a9a2c18719
2 changed files with 25 additions and 0 deletions

View File

@@ -71,6 +71,9 @@ def _i18n_to_text(value: Any) -> str:
def _build_tool_detail(tool: Any, requested_tool_name: str | None = None) -> dict[str, Any]:
"""Normalize LLMTool and plugin ComponentManifest objects for tool detail APIs."""
# TODO(litellm): This handler-local adapter is temporary. Once LiteLLM-backed
# tool schema normalization owns tool detail generation, simplify GET_TOOL_DETAIL
# and make ToolManager return one host-level tool detail shape.
if hasattr(tool, 'metadata') and hasattr(tool, 'spec'):
metadata = tool.metadata
spec = tool.spec or {}