mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-17 14:42:06 +00:00
fix(agent): preserve copilot routed headers
This commit is contained in:
parent
b6a4638b6d
commit
3e354b61db
4 changed files with 53 additions and 0 deletions
|
|
@ -808,6 +808,8 @@ def init_agent(
|
|||
# _custom_headers; older/mocked clients may expose
|
||||
# _default_headers instead.
|
||||
_routed_headers = getattr(_routed_client, "_custom_headers", None)
|
||||
if not _routed_headers:
|
||||
_routed_headers = getattr(_routed_client, "default_headers", None)
|
||||
if not _routed_headers:
|
||||
_routed_headers = getattr(_routed_client, "_default_headers", None)
|
||||
if _routed_headers:
|
||||
|
|
@ -861,6 +863,8 @@ def init_agent(
|
|||
if _provider_timeout is not None:
|
||||
client_kwargs["timeout"] = _provider_timeout
|
||||
_fb_headers = getattr(_fb_client, "_custom_headers", None)
|
||||
if not _fb_headers:
|
||||
_fb_headers = getattr(_fb_client, "default_headers", None)
|
||||
if not _fb_headers:
|
||||
_fb_headers = getattr(_fb_client, "_default_headers", None)
|
||||
if _fb_headers:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue