def check_session_api_key(
    session_api_key: str | None = Depends(_SESSION_API_KEY_HEADER),
):
    """
    Check the session API key and throw an exception if incorrect. Having this as a dependency
    means it appears in OpenAPI Docs
    """
    if session_api_key != _SESSION_API_KEY:
        raise HTTPException(status.HTTP_401_UNAUTHORIZED)

    Check the session API key and throw an exception if incorrect. Having this as a dependency
    means it appears in OpenAPI Docs
    
openhands/server/dependencies.py