fix(runtime): correctly set session_api_key for local runtime (#10506)

This commit is contained in:
Xingyao Wang
2025-08-20 15:51:19 -04:00
committed by GitHub
parent bc8b995dd3
commit 4a3f5dd9b4

View File

@@ -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: