Quickstart: LiteLLM
One route. Keep LiteLLM for auth, routing, and spend tracking. The race happens beneath it, in your own Airmet sidecar.
# litellm config.yaml
model_list:
- model_name: qwen3-8b-airmet
litellm_params:
model: openai/qwen3-8b
api_base: http://airmet:8080/v1
Route the models you want raced through Airmet and leave the rest untouched.
LiteLLM’s spend log records the leg that answered. The hedge object on
each response says how many upstream requests it made; the second leg’s
tokens land on your provider invoice and in the sidecar’s local records,
not in the hedge object. To keep LiteLLM’s dashboard conservative rather than
blind, set the Airmet route’s model_info price to list × your Airmet cost
ceiling, or route both Airmet legs back through LiteLLM so its spend log sees
every leg. Token spend is not the whole cost on metered upstreams either: each
raced request consumes n upstream requests against provider quota; under the
default the slower leg is not cancelled, so both legs bill (in full, unless the
runaway guard stops one that loops), and under a policy
that cuts the loser the cancelled leg still bills its prompt prefill — see the
cost note in the OpenAI-compatible quickstart.