LLM Model Selection in Practice: Cost Calculation and Multimodal Evaluation Methods

    A low per-token price does not guarantee low total cost, and a high leaderboard score does not guarantee good business outcomes. This article explains, from a developer's perspective, how to standardize cost accounting, break down capability dimensions, and build a repeatable evaluation pipeline so that model selection decisions are backed by data.

    A low unit price does not mean low total cost, and a high benchmark score does not mean better business results. This article explains, from a developer’s perspective, how to standardize cost accounting, break capabilities into measurable dimensions, and build a repeatable evaluation pipeline so that your model selection conclusions are supported by data.

    1. Standardize Cost Accounting First

    Unit price is only one input to your bill. What actually determines spending is total token volume and the number of API calls, which can be estimated with the following formulas:

    Cost per task = input tokens × input unit price + output tokens × output unit price
    Total spend = cost per task × number of calls (including retries and repeated sampling)

    Some models perform multi-step reasoning internally, and this “thinking” content is usually billed as output tokens. As a result, a model with a lower unit price may generate far more output on complex tasks. Another source of cost comes from the application layer: retries after failures and repeated sampling for stability both directly multiply the number of calls. These two categories of overhead should be tracked separately; otherwise, you cannot tell whether the problem lies with the model or with your calling strategy.

    The recommended core metric is “cost per unit at target pass rate,” i.e., total spend divided by the number of tasks that pass acceptance. Suppose Model A has a low unit price but only a 70% pass rate, while Model B costs more per token but passes 95% of tasks. When you compare cost per successful task, the conclusion may be the opposite of the unit-price ranking. If your workload contains large amounts of repeated input, you also need to account for cache hit rates. Cached input is typically billed at a lower price, so effective input cost should be calculated separately for cache hits and misses.

    A/B testing is the most direct way to validate these numbers:

    1. Send the same batch of real requests with the same prompts to both candidate models.
    2. Run a full business cycle—for example, seven consecutive days—covering both peak and off-peak hours.
    3. Log input/output tokens, latency, failure reasons, and the final bill for every call.
    4. Judge results against the same acceptance criteria, then compute cost per successful task.

    For tasks that can be deferred—such as batch case generation or overnight data processing—you can use scheduled cloud jobs to run them off-peak, reducing concurrency pressure during busy hours. Call logs must be retained; otherwise, there is no way to trace the source of an unexpected cost spike afterward.

    2. Break Down Capability Dimensions

    An aggregate benchmark score only reflects average performance across a fixed set of problems. For model selection, capabilities should be split into business-relevant subsets and measured separately.

    2.1 Coding Ability

    For routine scripts, API wrappers, and simple page components, most mainstream models perform adequately, and differences tend to show up in the details. Complex business logic and long-context dependencies are more error-prone, so generated code must go through unit tests and human review before deployment. During evaluation, record first-pass rate, number of revision rounds, and test coverage.

    2.2 Agentic Ability

    Agentic tasks require the model to call tools, decompose steps, and recover from failures. Relevant metrics include task success rate, average number of steps, tool-call error rate, and the proportion of errors the model recovers from. When comparing models, you must use the same task set and the same environment; otherwise, score differences cannot be attributed to the models themselves.

    2.3 Visual Multimodal Ability

    Multimodal testing can be divided into subsets such as image question answering, chart data extraction, UI screenshot-to-code reproduction, and information extraction from receipts or tables. For each subset, record the sample size, annotation method, and scoring criteria. For example, if you measure the runnable rate of generated code across one hundred UI screenshots, the result only applies to that type of screenshot and that scoring rule—it cannot be generalized to other vision tasks.

    Generating front-end code from screenshots is a common use case. Models can quickly produce runnable page drafts, which is useful for prototyping. However, the output still requires human review of layout, accessibility, and security—for instance, whether unnecessary third-party scripts were included or whether injection risks exist.

    3. How to Read a Cost-Performance Quadrant Chart

    A common industry chart plots cost per task on the x-axis and capability score on the y-axis. Models in the upper-left quadrant offer lower cost and higher scores. These charts help quickly shortlist candidates, but several caveats apply.

    First, the cost and scores in the chart must be based on the same test set and the same cost accounting method. Second, when score differences are small, they should not be used for ranking; check confidence intervals to determine whether the gap is meaningful. Third, cost varies with input length, output length, and cache hit rate, so the same data point can look completely different in a different business context.

    A practical selection order is: first, confirm the cost ceiling for your business tasks and eliminate models that exceed the budget; then examine the capability subsets most relevant to your workload; finally, consider factors such as stability, latency, and terms of service.

    Blind testing is an effective way to reduce subjective bias. Hide model names during evaluation so that reviewers only see output content and cost data, keeping the results focused on quality itself. Usage figures and market share numbers from public reports are often cited as evidence of model strength, but before quoting them you should verify the data source, collection period, and methodology. Cases that cannot be verified should not be used as selection criteria.

    4. Building an Evaluation Pipeline

    The evaluation process must be reproducible so it can be rerun quickly after every model update. The basic approach is as follows.

    4.1 Build the Evaluation Set

    Organize real prompts and expected outputs from your business into a table. Each test case should include the following fields: scenario category, prompt, input attachments, reference answer or scoring rubric, weight, and pass threshold. The set should cover typical scenarios such as everyday Q&A, code generation, structured information extraction, and multimodal analysis. Prepare at least a few dozen cases per critical scenario—the smaller the sample, the more likely that observed differences are just random variation.

    4.2 Parallel Testing and Monitoring

    Use scripts to call each model’s API concurrently, with configured limits on concurrency, per-request timeout, and maximum retries. The monitoring dashboard should record median and 95th-percentile response times, failure rate, and token consumption per call.

    Rollback conditions should be defined before testing begins. For example, if a model’s failure rate exceeds the baseline by a certain margin after deployment, or its pass rate falls below a preset threshold, switch back to the original model or adjust the calling strategy. Specific thresholds depend on each team’s risk tolerance; there is no universal number.

    Take front-end page generation as an example: have each model produce several implementations from the same requirements document, then score them on five dimensions—runnability, visual fidelity, accessibility, security, and response time. Hide model names before scoring, have at least two people score independently, and re-review when their assessments diverge significantly.

    4.3 Manual Verification and Summary

    Automated rules can check syntax errors, format deviations, and API return codes, but the visual quality of a page or the accuracy of an analytical report still requires human judgment. It is recommended to manually spot-check a fixed proportion of results in each round and consolidate findings into a single table covering cost, pass rate, latency, and major failure types.

    5. Model Selection Checklist

    1. Have you counted total token volume, including extra calls from retries and sampling?
    2. Have you calculated cost per unit at the target pass rate?
    3. Is your evaluation set drawn from real business scenarios and does it cover critical use cases?
    4. Are vision, agentic, and coding capabilities measured separately?
    5. Are sample sizes, scoring criteria, and scope of applicability documented alongside your conclusions?
    6. Have rollback conditions been defined?

    Conclusion

    There is no single best model for every business. Teams need to compare candidates using the same cost accounting method and the same evaluation set, then decide based on budget, quality requirements, and risk tolerance. Rerunning the evaluation after each model update keeps your conclusions current as both models and business needs evolve.