Commit ac005426 authored by Your Name's avatar Your Name

Fix: Filter URLs from default model listing

- Skip URLs when listing the default model in list_models()
- This prevents download URLs from appearing in available models list
parent 096b75d2
......@@ -2704,12 +2704,14 @@ class MultiModelManager:
# Add default model(s)
if self.default_model:
model_id = self.default_model
# Also add short name
short_name = self.default_model.split("/")[-1] if "/" in self.default_model else self.default_model
if short_name != self.default_model:
models.append(ModelInfo(id=short_name))
models.append(ModelInfo(id=model_id))
models.append(ModelInfo(id="default"))
# Skip URLs - they are download sources, not model identifiers
if not (model_id.startswith("http://") or model_id.startswith("https://")):
# Also add short name
short_name = self.default_model.split("/")[-1] if "/" in self.default_model else self.default_model
if short_name != self.default_model:
models.append(ModelInfo(id=short_name))
models.append(ModelInfo(id=model_id))
models.append(ModelInfo(id="default"))
# Add aliases for first/default models
if self.audio_models:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment