Back to Home
Model Selection10 min readSource: Admesh 技术团队

Model Selection and Cost Governance: From 'Always Use the Strongest' to Task-Based Tiering

In the same product, using a flagship model for everything is usually the most expensive approach. This article presents a task-based tiering method for model selection: how to break down tasks, how to use an evaluation set to verify whether downgrading is safe, and how to switch models in the same codebase with a unified gateway.

Why 'Always Use the Strongest Model' Is a Cost Trap

Model capabilities are tiered: flagship models excel at long-chain reasoning, complex code, and multi-constraint instructions; lightweight models are often already sufficient for classification, extraction, format conversion, and short Q&A. Yet the unit price gap between the two can reach ten times or more.

Anthropic's current pricing page and OpenAI's [API pricing](https://developers.openai.com/api/docs/pricing) both divide their models into several tiers; taking Anthropic's published [pricing](https://claude.com/pricing) as an example, the Opus, Sonnet, and Haiku tiers target tasks of different intensity, with obvious unit price differences. Handing hundreds of thousands of simple classification requests per day to a flagship model is the most easily overlooked waste.

Implement Task Tiering in Code

  1. List the LLM calls in the system by 'task type' (classification / extraction / summarization / generation / reasoning / code).
  2. Choose a default tier for each task type and put it in configuration, rather than model names scattered everywhere.
  3. Prepare 50–200 fixed evaluation samples for each task type, including typical hard cases.
  4. Run a baseline with the default tier first, then try downgrading and compare accuracy / format compliance rate.
  5. Keep the downgrade only when the quality loss is below the threshold; otherwise return to the previous tier.

Stepped Routing: Cheap First, Expensive Later

A practical pattern is 'cheap first, expensive later': process with a lightweight model first, and escalate to the flagship model when the following signals appear—

  • The output cannot be parsed (broken JSON, missing fields).
  • The model itself declares uncertainty, or confidence is below the threshold.
  • A business-side quality check is triggered (for example, the generated SQL cannot be executed).
  • The request's complexity metrics exceed the threshold (input length, number of referenced documents).

This way most traffic stays on the cheap tier, and only the truly difficult parts pay for the flagship tier. Note that escalation counts should be included in monitoring: if the escalation rate stays high for a long time, it means the model selection should be re-evaluated.

Things to Confirm Before Cross-Vendor Switching

Different vendors are not consistent in output style, tool-calling format, and refusal policies for the same task. Before switching a task type from vendor A to vendor B, at least confirm:

  • Structured output: whether the support level for JSON mode / strict schema is consistent.
  • Tool-calling format: parameter structure, parallel calls, and error return methods.
  • Context length and truncation behavior: whether overly long input errors out or is silently truncated.
  • Content policy differences: the same input is refused by one model and works normally on another.

Tiering Within the Same Gateway

Admesh maintains OpenAI-compatible protocols externally, and models are exposed in the form of namespace/model (for example, anthropic/…, openai/…, deepseek/…). This means task tiering only requires maintaining a 'task type → model' mapping table in configuration, and the code always only changes the model parameter.

Because routing only occurs within the channel pool of the same public_model, it will not silently replace your anthropic/xxx with another vendor's model—tiering is your explicit choice, not something the gateway decides for you.

Admesh live rates (excerpt)

Prices come from the live Admesh configuration, in USD per million tokens. See the model catalog for the full list.

Admesh.ai Model Price List: Prices and Context Windows for 8 Enabled Models
Model Name and IDContext WindowEnter price / 1MOutput Price / 1MCache Hits / 1M
Claude Fable 5anthropic/claude-fable-5
1M$3.25 / 1M$16.25 / 1M$0.325 / 1M
Claude Fable 5.1anthropic/claude-fable-5-1
1M$3.25 / 1M$16.25 / 1M$0.08125 / 1M
Claude Haiku 4.5anthropic/claude-haiku-4-5-20251001
200K$0.325 / 1M$1.625 / 1M$0.0325 / 1M
Claude Haiku 5.5anthropic/claude-haiku-5-5
1M$0.0325 / 1M$0.1625 / 1M$0.00325 / 1M
Claude Opus 4.5anthropic/claude-opus-4-5-20251101
200K$1.625 / 1M$8.125 / 1M$0.1625 / 1M
Claude Opus 4.6anthropic/claude-opus-4-6
1M$1.625 / 1M$8.125 / 1M$0.1625 / 1M
Claude Opus 4.7anthropic/claude-opus-4-7
1M$1.625 / 1M$8.125 / 1M$0.1625 / 1M
Claude Opus 4.8anthropic/claude-opus-4-8
1M$1.625 / 1M$8.125 / 1M$0.1625 / 1M

The above are the standard unit prices for public channels; billing is based on actual token usage. View the complete model catalog

View the model list API →

FAQ

How do I determine whether a task can use a lightweight model?
The most reliable way is to test with a fixed evaluation set, not to look at model leaderboards. Leaderboards measure general capabilities, while your task often uses only a very small part of them. It is recommended to collect 50–200 real samples, run a baseline, then downgrade tier by tier and record changes in accuracy and format compliance rate.
Will stepped routing make responses slower?
There will be some increase: escalating after a lightweight model fails means two calls. You can enable stepped routing only for 'offline or high-tolerance' requests, and have interactive requests directly use a tier determined through evaluation.
Is cross-vendor fallback safe?
It is relatively safe between models of the 'same tier and same capability', but the output style will change. For structured output or tool-calling scenarios, it is recommended to add a format validation layer after fallback to prevent downstream systems from crashing due to format differences.

References

Call these models through one gateway

Admesh provides a unified OpenAI-compatible API: one Base URL and one key for Claude, GPT, DeepSeek and more. New accounts get trial credit that never expires.