{% from "_macros.html" import icon, model_avatar %} {# Model picker. A real dropdown rather than a , because a cannot show an image, a description or capability badges -- browsers render only text in an . The hidden input is what actually carries the value, so the control still behaves like a form field. Inside a chat it PATCHes the chat; on /chat it navigates, because there is no chat row to patch yet. #} {% if current_model %} {{ model_avatar(current_model, cls="picker__avatar") }} {{ current_model.label }} {% else %} Choose a model {% endif %} {{ icon("chevron-down", "icon--sm picker__chevron") }} {% if models|length > 8 %} {% endif %} {% for model in models %} {{ model_avatar(model, cls="picker__avatar") }} {{ model.label }} {% if model.pinned %}{{ icon("pin", "icon--sm picker__pin") }}{% endif %} {% if model.description %} {{ model.description }} {% endif %} {% for name, on in (model.capabilities_json or {}).items() %} {% if on %}{{ name }}{% endif %} {% endfor %} {% if current_model and model.model_id == current_model.model_id %} {{ icon("check", "icon--sm picker__tick") }} {% endif %} {% endfor %} No model matches that. {% if chat %} {# Changing the value fires the PATCH; htmx serialises the hidden input. #} {% else %} {# No chat yet: selecting navigates so the whole composer re-renders with the right vision warning and the right hidden model_id. #} {% endif %}
No model matches that.