{% extends "settings_base.html" %} {% import "_connection_summary.html" as summaries %} {% import "_status_badge.html" as badges %} {% block summary_cards %} {{ summaries.summary_card("RT", "Active routes", summary.active_routes | compact_number, "Across startup and settings") }} {{ summaries.summary_card("FB", "Default provider", fallback.provider_name | default("No provider", true), "Used for fallback", true) }} {{ summaries.summary_card("MD", "Default model", fallback.model | default("No model", true), "Fallback send-as model") }} {{ summaries.summary_card("DB", "Stored rows", summary.stored_rows | compact_number, (summary.rows_older_than_retention | compact_number) ~ " older than " ~ summary.retention_days ~ " days") }} {% endblock %} {% block settings_content %}

Route Registry

Exact routes win first; prefix routes must end with *.

Add route
{% for route in model_routes %} {% else %} {% endfor %}
Incoming model Match type Route upstream URL Send as model Provider Fallback Priority Status Actions
{{ route.model }}{{ "Settings" if route.editable else "Startup" }} {{ route.match_type }} {{ route.upstream_url }} {{ route.upstream_model }} {{ route.provider_name | default(route.provider_slug | default("Auto", true), true) }} {{ "Override" if route.override_fallback else "Default" }} {{ route.priority }} {{ badges.status_badge("Active" if route.active else "Inactive") }} {% if route.editable %}
{% else %} Locked {% endif %}
No model routes are configured.

Selected Route

Click an editable row to load it here, or save a new route.

{{ badges.status_badge("Editable") }}

Requests matching this pattern will be sent to the selected upstream; prefix patterns should be entered like local-*.

Fallback Routing Behavior

Resolution runs startup routes, editable routes, then fallback.

{{ badges.status_badge("Enabled" if fallback_enabled else "Inactive") }}

Route Simulator / Diagnostics

Preview how an incoming model name resolves before sending traffic.

Simulation results will appear here.

Recent Route Usage

Requests matched since local midnight.

View requests
{% for row in route_usage %} {% else %} {% endfor %}
Route Requests today Last matched
{{ row.route }} {{ row.requests_today | compact_number }} {{ row.last_matched_at | default("-", true) }}
No route matches recorded today.
{% endblock %}