diff --git a/api/config.py b/api/config.py index 0dbc462a71..103a47efc3 100644 --- a/api/config.py +++ b/api/config.py @@ -3807,6 +3807,18 @@ def _read_custom_endpoint_models( "models": models_for_group, } ) + elif pid == "custom" and cfg_base_url: + # Anonymous custom endpoint: /v1/models probe may have + # failed (e.g. llama-server, lightweight relay), but the + # chat endpoint itself may still work. Add the group + # with an empty model list so the user can type a model + # ID manually rather than being blocked by a silent + # probe failure (#2542). + groups.append({ + "provider": provider_name, + "provider_id": pid, + "models": [], + }) else: if default_model: label = _get_label_for_model(default_model, groups) diff --git a/static/index.html b/static/index.html index 9682788c94..fb72a251b2 100644 --- a/static/index.html +++ b/static/index.html @@ -138,6 +138,12 @@ +