mirror of
https://github.com/HKUDS/nanobot.git
synced 2026-06-25 20:23:59 +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,
|
timeout: httpx.Timeout | None = None,
|
||||||
auth: httpx.Auth | None = None,
|
auth: httpx.Auth | None = None,
|
||||||
) -> httpx.AsyncClient:
|
) -> 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(
|
return httpx.AsyncClient(
|
||||||
headers=merged_headers or None,
|
headers=merged_headers or None,
|
||||||
follow_redirects=True,
|
follow_redirects=True,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user