Fronset with LiteLLM
LiteLLM gives you one OpenAI-shaped interface to your providers, as a Python SDK or a self-hosted proxy. Fronset is an LLM routing API that can sit behind it: you name a task, and each call runs on the cheapest model that graded outputs of that task show is good enough. How to call Fronset from LiteLLM, and what each one does.
The short version. LiteLLM and Fronset do different jobs, and they work together. LiteLLM
is an open-source Python SDK and a self-hosted gateway (the proxy) that put one OpenAI-shaped
interface in front of 100+ LLM providers, with virtual keys, budgets, spend tracking, retries
and fallbacks 1. Fronset is one of the endpoints it can call: an OpenAI-compatible
API where model names a task, and each call runs on the cheapest model that graded outputs of
that task show is good enough. Keep LiteLLM as your gateway, and add Fronset as a model in it
for the pipeline steps you want routed on evidence.
A disclosure. We have proposed Fronset as a named LiteLLM provider, so that
fronset/<task> works without setting an API base
(BerriAI/litellm#55216, open and not yet
merged as of 1 December 2026). Until it is merged, use LiteLLM’s built-in openai/ route with
our API base, as below. Everything on this page works that way today.
Calling Fronset from LiteLLM
The part after openai/ is a task slug, not an LLM name. There are two kinds of task, and
they take different requests:
- One of our tasks (listed by
GET https://api.fronset.ai/v1/models) builds the prompt from its own template. Sendmessages=[]and your content as the template’s variables inextra_body. Messages sent to such a task are refused with a 400 that names the variables. - A task of your own that passes your messages through. Create it first (quickstart), then call the slug it returned, with one user message.
SDK:
from litellm import completion
FRONSET = {"api_base": "https://api.fronset.ai/v1", "api_key": "llmb_i_…"}
# one of our tasks: its template builds the prompt from your variables
response = completion(
model="openai/structured-content-summarization",
messages=[],
extra_body={"llmbench": {"prompt_vars": {
"content_text": article_text,
"content_title": article_title,
"content_type": "news article",
"content_url": article_url,
"summary_structure": "## Key points\nThe three facts a reader needs.",
}}},
**FRONSET,
)
# a pass-through task of your own: your message is the prompt
response = completion(
model="openai/3.press-release-claims",
messages=[{"role": "user", "content": release_text}],
**FRONSET,
)
# which model answered, and what Fronset bills for the call
headers = response._hidden_params["additional_headers"]
print(headers.get("llm_provider-x-llmbench-model"))
print(response._hidden_params["response_cost"])
Proxy (config.yaml):
model_list:
- model_name: summarize
litellm_params:
model: openai/structured-content-summarization
api_base: https://api.fronset.ai/v1
api_key: os.environ/FRONSET_API_KEY
- model_name: press-release-claims
litellm_params:
model: openai/3.press-release-claims
api_base: https://api.fronset.ai/v1
api_key: os.environ/FRONSET_API_KEY
Clients of the proxy call summarize with messages: [] and an llmbench object at the root of
the request body (in the OpenAI SDK, extra_body={"llmbench": {...}}); the proxy passes it
through. Our response headers come back from the proxy prefixed llm_provider-, for example
llm_provider-x-llmbench-model.
Spend tracking. Every successful response carries x-litellm-response-cost, which LiteLLM
records as the call’s cost ahead of its own price list. It is what Fronset bills for
the call: the model usage plus the per-call fee, or the fee alone on your own provider keys
(what the header carries). Where we can’t state the amount as the call
answers, for example on an account without prepaid credit, the header is absent and LiteLLM
records zero. Our invoice is final. In the SDK, read response._hidden_params["response_cost"];
litellm.completion_cost() raises on a Fronset response, because it reads only LiteLLM’s price
list.
We checked the SDK and proxy calls above on 1 December 2026 with LiteLLM 1.113.0: the request
body reached our API with messages: [] and the llmbench object intact, and the model header
and the cost came back on both.
What each one does
| LiteLLM | Fronset | |
|---|---|---|
| What it is | An open-source Python SDK, and a gateway you host yourself 1 | A hosted API at https://api.fronset.ai/v1 |
What you put in model | A provider and model, such as anthropic/<model>, or an alias from your proxy config | A task. We choose the model |
| How the model is chosen | You list the deployments behind each alias; the router spreads calls across them by weight, rate limits, load, latency or price, with fallbacks 2. Auto Routing (beta) classifies each request with rules, a classifier or your own plugin, and sends it to the model or pool you mapped to its tier 3 | From graded outputs of the task: panels of LLM judges score the answers, each model gets an evidence band, and the cheapest model that meets the task’s quality step serves the call |
| What Fronset adds | — | Each answer checked against the task’s schema, then repaired or retried on another model. Every response names the model and provider that answered, its cost, and its evidence band on the task |
| Spend tracking, budgets, virtual keys | Yes, across all your providers 4 | Per account: what each call cost, in the response and in usage reports |
| Streaming, tools, conversations | Yes, where the provider supports them | No. One turn per call, text in and text or JSON out |
Why the choice has to keep being made
A model you put behind an alias runs until you change the config. Models are updated, re-priced and retired, new ones arrive every few weeks, your inputs drift, and what counts as a good answer changes. Fronset keeps grading your task and re-makes the choice on every call (why a model picked once doesn’t stay the right one). Behind a LiteLLM alias, that means the alias keeps its name while the model behind it changes with the evidence.
When Fronset is not for you
These are limits of what Fronset does:
- You need streaming, tools, multi-turn conversations or images. Fronset runs one turn per call,
text in and text or JSON out. A LiteLLM call with
stream=Trueortoolsgets our 400. - You must run one exact model version for good. On a task of your own you can pin one model, but then there is no failover, and on our tasks you cannot pin at all.
We last checked the facts about LiteLLM on 1 December 2026 from its public documentation, which the footnotes link. Features change. If something here is out of date, write to benchmark@fronset.ai and we’ll correct it.
LiteLLM: Getting started. Fetched 2026-12-01. ↩︎ ↩︎
LiteLLM: Router, load balancing and routing strategies. Fetched 2026-12-01. ↩︎
LiteLLM: Auto Routing (beta). Fetched 2026-12-01. ↩︎
LiteLLM: Spend tracking. Fetched 2026-12-01. ↩︎