Repository: Project-MONAI/MONAI
File: monai/bundle/scripts.py (Python)

Code before:
                **_net_override,
            )
        else:
            warnings.warn(f"Cannot find the config file: {bundle_config_file}, return state dict instead.")
            return model_dict
        if _workflow is not None:
            if not hasattr(_workflow, "network_def"):
                warnings.warn("No available network definition in the bundle, return state dict instead.")
                return model_dict
            else:
                model = _workflow.network_def
    elif net_name is not None:
        net_kwargs["_target_"] = net_name
        configer = ConfigComponent(config=net_kwargs)
        model = configer.instantiate()  # type: ignore

    model.to(device)  # type: ignore

    copy_model_state(
        dst=model, src=model_dict if key_in_ckpt is None else model_dict[key_in_ckpt], **copy_model_args  # type: ignore
    )

    return model


@deprecated_arg_default("tag", "hosting_storage_v1", "dev", since="1.3", replaced="1.5")
def _get_all_bundles_info(
    repo: str = "Project-MONAI/model-zoo", tag: str = "hosting_storage_v1", auth_token: str | None = None
) -> dict[str, dict[str, dict[str, Any]]]:
    if has_requests:
        if tag == "dev":
            request_url = f"https://raw.githubusercontent.com/{repo}/{tag}/models/model_info.json"
        else:
            request_url = f"https://api.github.com/repos/{repo}/releases"
        if auth_token is not None:
            headers = {"Authorization": f"Bearer {auth_token}"}
            resp = requests_get(request_url, headers=headers)
        else:
            resp = requests_get(request_url)
        resp.raise_for_status()
    else:
        raise ValueError("requests package is required, please install it.")
    releases_list = json.loads(resp.text)
    bundle_name_pattern = re.compile(r"_v\d*.")
    bundles_info: dict[str, dict[str, dict[str, Any]]] = {}

    if tag == "dev":
        for asset in releases_list.keys():
            asset_name = bundle_name_pattern.split(asset)[0]
            if asset_name not in bundles_info:
                bundles_info[asset_name] = {}

Review comment (suggestion):
we can set it to `since="1.2"` to start using the new logic now, `since="1.3"` means using it after tagging v1.3

```suggestion
@deprecated_arg_default("tag", "hosting_storage_v1", "dev", since="1.2", replaced="1.5")
```

Code after:
                **_net_override,
            )
        else:
            warnings.warn(f"Cannot find the config file: {bundle_config_file}, return state dict instead.")
            return model_dict
        if _workflow is not None:
            if not hasattr(_workflow, "network_def"):
                warnings.warn("No available network definition in the bundle, return state dict instead.")
                return model_dict
            else:
                model = _workflow.network_def
    elif net_name is not None:
        net_kwargs["_target_"] = net_name
        configer = ConfigComponent(config=net_kwargs)
        model = configer.instantiate()  # type: ignore

    model.to(device)  # type: ignore

    copy_model_state(
        dst=model, src=model_dict if key_in_ckpt is None else model_dict[key_in_ckpt], **copy_model_args  # type: ignore
    )

    return model


@deprecated_arg_default("tag", "hosting_storage_v1", "dev", since="1.2", replaced="1.5")
def _get_all_bundles_info(
    repo: str = "Project-MONAI/model-zoo", tag: str = "hosting_storage_v1", auth_token: str | None = None
) -> dict[str, dict[str, dict[str, Any]]]:
    if has_requests:
        if tag == "hosting_storage_v1":
            request_url = f"https://api.github.com/repos/{repo}/releases"
        else:
            request_url = f"https://raw.githubusercontent.com/{repo}/{tag}/models/model_info.json"

        if auth_token is not None:
            headers = {"Authorization": f"Bearer {auth_token}"}
            resp = requests_get(request_url, headers=headers)
        else:
            resp = requests_get(request_url)
        resp.raise_for_status()
    else:
        raise ValueError("requests package is required, please install it.")
    releases_list = json.loads(resp.text)
    bundle_name_pattern = re.compile(r"_v\d*.")
    bundles_info: dict[str, dict[str, dict[str, Any]]] = {}

    if tag == "hosting_storage_v1":
        for release in releases_list:
            if release["tag_name"] == tag:
                for asset in release["assets"]: