fix(agent): preserve copilot routed headers
This commit is contained in:
parent
b6a4638b6d
commit
3e354b61db
4 changed files with 53 additions and 0 deletions
|
|
@ -3557,6 +3557,9 @@ class AIAgent:
|
|||
import httpx as _httpx
|
||||
import socket as _socket
|
||||
|
||||
if "api.githubcopilot.com" in str(base_url or "").lower():
|
||||
return _httpx.Client()
|
||||
|
||||
_sock_opts = [(_socket.SOL_SOCKET, _socket.SO_KEEPALIVE, 1)]
|
||||
if hasattr(_socket, "TCP_KEEPIDLE"):
|
||||
_sock_opts.append((_socket.IPPROTO_TCP, _socket.TCP_KEEPIDLE, 30))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue