import requests


def get_models_json(service):
    """Get the models/versions from the service along with service version."""
    r = requests.get(service + 'models?format=json')
    service_version = r.headers['User-Agent'].split(' ')[0].split('/')[1]
    return r.json(), service_version