diff --git a/callbacks.py b/callbacks.py index a441782..bb526e8 100644 --- a/callbacks.py +++ b/callbacks.py @@ -31,6 +31,8 @@ async def select_provider_callback(callback: CallbackQuery): i = 0 shown = set() + auto_entries = expand_auto_models() + for model in MODELS.get(provider): base_model = model.split("*")[0] if "*" in model else model if base_model in shown: @@ -38,12 +40,17 @@ async def select_provider_callback(callback: CallbackQuery): shown.add(base_model) i += 1 - m_trust = round(get_display_trust([provider, base_model])) full_model = f"{provider}*{base_model}" - if full_model == user_model or user_model.startswith(full_model + "*"): - text = f"{base_model} ({m_trust}%) ✅" + in_auto = any(e == full_model or e.startswith(full_model + "*") for e in auto_entries) + if in_auto: + m_trust = round(get_display_trust([provider, base_model])) + model_text = f"{base_model} ({m_trust}%)" else: - text = f"{base_model} ({m_trust}%)" + model_text = base_model + if full_model == user_model or user_model.startswith(full_model + "*"): + text = f"{model_text} ✅" + else: + text = model_text if MODELS[provider][model].get("alias"): base_model = MODELS[provider][model].get("alias")