mirror of
https://github.com/All-Hands-AI/OpenHands.git
synced 2026-01-09 06:48:02 -05:00
fix(runtime): correctly set session_api_key for local runtime (#10506)
This commit is contained in:
@@ -201,8 +201,14 @@ class LocalRuntime(ActionExecutionClient):
|
||||
|
||||
# If there is an API key in the environment we use this in requests to the runtime
|
||||
session_api_key = os.getenv('SESSION_API_KEY')
|
||||
self._session_api_key: str | None = None
|
||||
if session_api_key:
|
||||
self.session.headers['X-Session-API-Key'] = session_api_key
|
||||
self._session_api_key = session_api_key
|
||||
|
||||
@property
|
||||
def session_api_key(self) -> str | None:
|
||||
return self._session_api_key
|
||||
|
||||
@property
|
||||
def action_execution_server_url(self) -> str:
|
||||
|
||||
Reference in New Issue
Block a user