Provide httpx default context for OS-provided certs (#11505)

Co-authored-by: Pierrick Hymbert <pierrick.hymbert@gmail.com>
This commit is contained in:
Ray Myers
2025-10-27 17:54:20 -05:00
committed by GitHub
parent 818f743dc7
commit 4decd8b3e9
20 changed files with 93 additions and 37 deletions

View File

@@ -36,6 +36,7 @@ from openhands.integrations.service_types import (
)
from openhands.microagent.types import MicroagentContentResponse, MicroagentResponse
from openhands.server.types import AppMode
from openhands.utils.http_session import httpx_verify_option
class ProviderToken(BaseModel):
@@ -174,7 +175,7 @@ class ProviderHandler:
) -> SecretStr | None:
"""Get latest token from service"""
try:
async with httpx.AsyncClient() as client:
async with httpx.AsyncClient(verify=httpx_verify_option()) as client:
resp = await client.get(
self.REFRESH_TOKEN_URL,
headers={