{% extends "admin_base.html" %} {% block extra_head %} {{ super() }} {% endblock %} {% block admin_content %}

Gateway routing

Map any requested model name onto a provider and target model, each with its own pricing economy and an optional vision model for image to text merging. Image routes use a flat per-image price. Unmapped requests fall through to the default upstream unchanged.

Providers

Named upstreams reused across model routes. A model route with a blank provider uses the default below.

Providers
NameBase URLActiveActions

Add or update provider

Model routes

Each source model maps to a provider and target model with its own economy. Chat uses cache-hit, cache-miss and output prices (USD per 1M tokens); embeddings use the input price; image routes use the input price as a flat USD per image; a vision model adds input and output pricing for the image description merge.

Model routes
SourceProviderTargetKindVisionEconomyActions

Add or update model route

Tiered / off-peak pricing (optional)

Some providers charge a different rate once a request crosses a context-length threshold, or discount a fixed time-of-day window. Leave blank/zero to keep the flat rates above at all times.

Quota rules

Rolling 24h USD caps on /openai/v1/*. A rule scopes by any combination of role, specific user, and app label (the X-App-Reference header); the most specific active match wins, and a rule that omits a dimension pools spend across everyone matching it (e.g. an app-only rule caps that app's combined usage across all callers). With no matching rule, the global defaults below apply per caller. A limit of 0 means unlimited.

Quota rules
ScopeLimit / 24hSpent 24hActiveLabelActions

Add or update quota rule

{% endblock %} {% block extra_js %} {% endblock %}