From 123e556fedc0e2ae01f3229127cc956cc211c0bf Mon Sep 17 00:00:00 2001 From: Tim O'Farrell Date: Thu, 19 Feb 2026 09:27:35 +0000 Subject: [PATCH] Added endpoint for readiness probe (#12927) --- openhands/server/routes/health.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/openhands/server/routes/health.py b/openhands/server/routes/health.py index 58c72c6b93..3bfb57bbdb 100644 --- a/openhands/server/routes/health.py +++ b/openhands/server/routes/health.py @@ -14,6 +14,8 @@ from openhands.runtime.utils.system_stats import get_system_info def add_health_endpoints(app: FastAPI): @app.get('/alive') async def alive(): + """Endpoint for liveness probes. If this responds then the server is + considered alive.""" return {'status': 'ok'} @app.get('/health') @@ -23,3 +25,11 @@ def add_health_endpoints(app: FastAPI): @app.get('/server_info') async def get_server_info(): return get_system_info() + + @app.get('/ready') + async def ready() -> str: + """Endpoint for readiness probes. For now this is functionally the same as + the liveness probe, but should be need to establish further invariants in + the future, having a separate endpoint will mean we don't need to change + client code.""" + return 'OK'