Add native Exa-backed web_search support (#29342)

Co-authored-by: Xinyuan Tong <115166877+JustinTong0323@users.noreply.github.com>
This commit is contained in:
jonah-berman
2026-06-27 14:41:09 +01:00
committed by GitHub
co-authored by Xinyuan Tong
parent 3306233961
commit 2f34dbe372
10 changed files with 737 additions and 51 deletions
@@ -337,6 +337,10 @@ async def lifespan(fast_api_app: FastAPI):
tool_server = MCPToolServer()
await tool_server.add_tool_server(server_args.tool_server)
elif envs.EXA_API_KEY.get():
from sglang.srt.entrypoints.openai.tool_server import NativeToolServer
tool_server = NativeToolServer()
try:
from sglang.srt.entrypoints.openai.serving_responses import (
@@ -381,6 +385,8 @@ async def lifespan(fast_api_app: FastAPI):
try:
yield
finally:
if tool_server is not None and hasattr(tool_server, "aclose"):
await tool_server.aclose()
warmup_thread.join()