compare_providers
Compare LLM providers and models by projected cost for a given workload. Ranked by absolute cost, with relative cost percentages against the cheapest option.
Instructions
Project the cost of a hypothetical workload across providers/models.
Returns models ranked by absolute cost ascending, with
relative_cost_pct measured against the cheapest entry
(cheapest = 100%). models, if given, restricts the comparison to
those model names. Cost is computed from input/output tokens only;
RankedEntry.notes is always None in v1 (the field is retained
for future per-row caveats like "tiered pricing approximated").
include_snapshots=False (the default) family-dedups the ranked
list: rows sharing both a model-family root (gpt-5-mini ↔
gpt-5-mini-2025-08-07) AND an identical projected cost collapse
to one representative, with RankedEntry.variant_count recording
how many catalog rows the entry stands for. Set
include_snapshots=True to see every catalog row (each with
variant_count=1) — useful when comparing snapshot-by-snapshot
pricing for production pinning.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| models | No | ||
| include_snapshots | No | ||
| expected_input_tokens | Yes | ||
| expected_output_tokens | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ranked | Yes |