[Fix]: Plumb provider tokens to runtime (#7247)

Co-authored-by: openhands <openhands@all-hands.dev>
Co-authored-by: Engel Nyst <enyst@users.noreply.github.com>
This commit is contained in:
Rohit Malhotra
2025-03-20 18:43:27 -04:00
committed by GitHub
parent 6f204fd557
commit 41efa100f0
16 changed files with 686 additions and 188 deletions

View File

@@ -16,6 +16,7 @@ from openhands.core.exceptions import (
)
from openhands.core.logger import openhands_logger as logger
from openhands.events import EventStream
from openhands.integrations.provider import PROVIDER_TOKEN_TYPE
from openhands.runtime.builder.remote import RemoteRuntimeBuilder
from openhands.runtime.impl.action_execution.action_execution_client import (
ActionExecutionClient,
@@ -47,6 +48,7 @@ class RemoteRuntime(ActionExecutionClient):
attach_to_existing: bool = False,
headless_mode: bool = True,
user_id: str | None = None,
git_provider_tokens: PROVIDER_TOKEN_TYPE | None = None,
):
super().__init__(
config,
@@ -58,6 +60,7 @@ class RemoteRuntime(ActionExecutionClient):
attach_to_existing,
headless_mode,
user_id,
git_provider_tokens,
)
if self.config.sandbox.api_key is None:
raise ValueError(