mirror of
https://github.com/OpenHands/OpenHands.git
synced 2026-03-22 13:47:19 +08:00
Added flag to disable the V1 endpoints inside nested V0 runtimes (#11391)
This commit is contained in:
@@ -90,6 +90,7 @@ app.include_router(settings_router)
|
||||
app.include_router(secrets_router)
|
||||
if server_config.app_mode == AppMode.OSS:
|
||||
app.include_router(git_api_router)
|
||||
app.include_router(v1_router.router)
|
||||
if server_config.enable_v1:
|
||||
app.include_router(v1_router.router)
|
||||
app.include_router(trajectory_router)
|
||||
add_health_endpoints(app)
|
||||
|
||||
@@ -30,6 +30,7 @@ class ServerConfig(ServerConfigInterface):
|
||||
user_auth_class: str = (
|
||||
'openhands.server.user_auth.default_user_auth.DefaultUserAuth'
|
||||
)
|
||||
enable_v1: bool = os.getenv('ENABLE_V1') != '0'
|
||||
|
||||
def verify_config(self):
|
||||
if self.config_cls:
|
||||
|
||||
Reference in New Issue
Block a user