This commit is contained in:
Andrew Ho 2026-04-24 16:33:09 -05:00 committed by GitHub
commit b7c54602e2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1276,8 +1276,8 @@ class AIAgent:
if _provider_timeout is not None: if _provider_timeout is not None:
client_kwargs["timeout"] = _provider_timeout client_kwargs["timeout"] = _provider_timeout
# Preserve any default_headers the router set # Preserve any default_headers the router set
if hasattr(_routed_client, '_default_headers') and _routed_client._default_headers: if hasattr(_routed_client, 'default_headers') and _routed_client.default_headers:
client_kwargs["default_headers"] = dict(_routed_client._default_headers) client_kwargs["default_headers"] = dict(_routed_client.default_headers)
else: else:
# When the user explicitly chose a non-OpenRouter provider # When the user explicitly chose a non-OpenRouter provider
# but no credentials were found, fail fast with a clear # but no credentials were found, fail fast with a clear