cheapest_model
Return the cheapest LLM API models that meet a constraint, ranked by blended $/M-token cost. Use this to route an agent to the lowest-cost model with enough context that is currently operational. Filter by minimum context window and provider; weight input vs output cost for your workload.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | How many to return (default 10). | |
| provider | No | Restrict to one provider slug (openai, anthropic, google, ...). | |
| in_weight | No | Relative weight of input-token price (default 1). | |
| out_weight | No | Relative weight of output-token price (default 3, output-heavy). | |
| min_context | No | Minimum context window (tokens), e.g. 128000. | |
| operational_only | No | Drop providers with a major/critical status indicator. |