mirror of
https://github.com/HKUDS/nanobot.git
synced 2026-04-02 17:32:39 +00:00
fix(tools): add Accept header for MCP SSE connections (#2651)
This commit is contained in:
parent
7fad14802e
commit
8682b017e2
@ -170,7 +170,11 @@ async def connect_mcp_servers(
|
||||
timeout: httpx.Timeout | None = None,
|
||||
auth: httpx.Auth | None = None,
|
||||
) -> httpx.AsyncClient:
|
||||
merged_headers = {**(cfg.headers or {}), **(headers or {})}
|
||||
merged_headers = {
|
||||
"Accept": "application/json, text/event-stream",
|
||||
**(cfg.headers or {}),
|
||||
**(headers or {}),
|
||||
}
|
||||
return httpx.AsyncClient(
|
||||
headers=merged_headers or None,
|
||||
follow_redirects=True,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user