{# SETTINGS · Providers & Models (R4b, READ-ONLY dynamic catalog). A live, grouped catalog of every model each provider offers. OpenRouter's public list (no auth) is ALWAYS fetched — it's the richest source AND the cross-reference that backfills pricing for the key-only providers. Providers whose API key is set in System (Anthropic / OpenAI / Fireworks) are live-fetched + merged. The catalog is cached ~15 min server-side (app.providers.get_catalog); a network failure degrades to cached/empty + a note (never a crash). This tab is READ-ONLY in legacy mode. Provider keys are managed in the Providers surface when it is enabled for this edition. Context: catalog : view model from app.providers.view_catalog(): {groups:[{provider,label,count,configured,note,brand_svg,rows:[...]}], total, configured_count, notes:[...], age_human, from_cache, openrouter_count} where each row is {id, display_name, type, reasoning, has_reasoning, price_in, price_out, window, max_output, source, source_tag:{label,css}, deprecated} selected_key : current project key (kept on the refresh URL) #}
Models
A live catalog of every model each configured provider offers — grouped by provider with type, reasoning tiers, input/output price (per 1M tokens), and context window. OpenRouter's public list is always shown (and backfills pricing for the others). Read-only — add providers & API keys in the Providers surface when it is enabled for this edition.
{# read-only / where-to-add-keys banner #}
Read-only. This catalog is fetched live from each provider's model API. To enable a provider's own models, add its API key in the Providers surface when it is enabled for this edition — OpenRouter needs no key and is always listed.
{# catalog meta strip: counts + freshness + a manual refresh #}
{{ catalog.total }} model{{ 's' if catalog.total != 1 else '' }} · {{ catalog.configured_count }} provider{{ 's' if catalog.configured_count != 1 else '' }} live · {{ 'cached' if catalog.from_cache else 'live' }} · updated {{ catalog.age_human }}
{# global notes (e.g. OpenRouter unreachable, serving stale cache) #} {% if catalog.notes %} {% endif %} {# ---------------------------------------------------------------------- Grouped catalog. Each provider is a COLLAPSIBLE card reusing the System tab's
/ pattern (visual parity). Collapsed BY DEFAULT — the summary still carries the model count (e.g. "OpenRouter · 312 models") so a collapsed row is fully readable without scrolling past hundreds of rows to reach the next provider. ---------------------------------------------------------------------- #} {% for g in catalog.groups %}
{{ g.label }} {% if g.note %}{{ g.note }}{% endif %} {% if g.configured %} {{ g.count }} model{{ 's' if g.count != 1 else '' }} {% else %} not configured {% endif %}
{% if g.rows %}
{% for m in g.rows %} {% endfor %}
Model Type Reasoning In / Mtok Out / Mtok Context Source
{{ m.display_name }} {{ m.id }} {{ m.type }} {% if m.has_reasoning %} {{ m.reasoning }} {% else %} {% endif %} {{ m.price_in }} {{ m.price_out }} {{ m.window }} {{ m.source_tag.label }}
{% else %}
{% if g.note %}{{ g.note }}{% else %}No models returned.{% endif %}
{% endif %}
{% endfor %}

Pricing & reasoning gaps for key-only providers are backfilled from OpenRouter's public catalog ({{ catalog.openrouter_count }} models) and tagged live + suppl. / supplement. Live on load, cached ~15 min.