mirror of
https://github.com/OpenHands/OpenHands.git
synced 2026-03-22 13:47:19 +08:00
Add runtime size configuration feature (#5805)
Co-authored-by: openhands <openhands@all-hands.dev> Co-authored-by: amanape <83104063+amanape@users.noreply.github.com>
This commit is contained in:
@@ -57,6 +57,13 @@ async def store_settings(
|
||||
# LLM key isn't on the frontend, so we need to keep it if unset
|
||||
if settings.llm_api_key is None:
|
||||
settings.llm_api_key = existing_settings.llm_api_key
|
||||
|
||||
# Update sandbox config with new settings
|
||||
if settings.remote_runtime_resource_factor is not None:
|
||||
config.sandbox.remote_runtime_resource_factor = (
|
||||
settings.remote_runtime_resource_factor
|
||||
)
|
||||
|
||||
await settings_store.store(settings)
|
||||
|
||||
return JSONResponse(
|
||||
|
||||
@@ -15,3 +15,4 @@ class Settings:
|
||||
llm_model: str | None = None
|
||||
llm_api_key: str | None = None
|
||||
llm_base_url: str | None = None
|
||||
remote_runtime_resource_factor: int | None = None
|
||||
|
||||
Reference in New Issue
Block a user