Make get time tool use system tool

This commit is contained in:
Xin Wang
2026-02-12 15:39:09 +08:00
parent 39bcd67eac
commit 6744704c7e
3 changed files with 41 additions and 8 deletions

View File

@@ -109,12 +109,6 @@ TOOL_ICON_MAP = {
}
TOOL_HTTP_DEFAULTS = {
"current_time": {
"http_method": "GET",
"http_url": "https://worldtimeapi.org/api/ip",
"http_headers": {},
"http_timeout_ms": 10000,
},
}
@@ -126,7 +120,7 @@ def _normalize_http_method(method: Optional[str]) -> str:
def _requires_http_request(category: str, tool_id: Optional[str]) -> bool:
if category != "query":
return False
return str(tool_id or "").strip() not in {"calculator", "code_interpreter"}
return str(tool_id or "").strip() not in {"calculator", "code_interpreter", "current_time"}
def _validate_query_http_config(*, category: str, tool_id: Optional[str], http_url: Optional[str]) -> None: