Multimodal LLM Selection for Agents: Pricing, Capabilities, and Cost per Successful Task
This article explains how to choose a multimodal large language model for agent workloads such as reading files, generating code, and calling tools. It covers why per-call prices can mislead, how to filter candidates by input modality, how to define acceptance criteria, and how to compare cost per successful task on a shared test set. It also outlines layered routing, budget controls, and observability for production systems.
1. The Core Problem: Why Reading Files, Writing Code, and Calling Tools Can Differ in Cost by an Order of Magnitude
When multimodal large language models enter agent workflows, many teams see an apparent contradiction. The same job, such as having a model read a document, generate code, call tools, and return a result, may cost a few cents in one case and several yuan in another. The gap usually does not come from the unit price alone. It results from the combined effect of input size, output budget, reasoning mechanism, number of tool-call rounds, rework after failures, and context reuse strategy.
For this reason, model selection should not start with “Which model is cheapest?” It should start with three questions. First, what input modalities and context length does the task require? Second, what are the acceptance criteria, and is the first-pass success rate acceptable? Third, what is the cost per successful task, rather than the cost per call? Price differences matter, but the more important question is whether the cheaper model can succeed on the first attempt, and whether the more expensive model reduces rework. If a low-priced model needs three correction rounds while a higher-priced model finishes in one, the final cost can reverse. Conversely, using an expensive model for simple structured tasks wastes budget.
2. Selection Order: Input and Acceptance First, Then Cost, Then Agent Retesting
A practical selection process has four steps: filter by input capability, define acceptance criteria, build a cost baseline, and retest with the same agent tasks.
First, apply hard filters based on input modality. Not every candidate understands text, images, and video equally. If the business needs to understand video content directly, shortlist only the candidates that accept video input. If the main workload is batch image-and-text recognition, document extraction, and structured output, you can start with candidates that support text and images to build a cost baseline. Models that fail a hard requirement should not enter the price comparison, because doing so leads to wrong conclusions.
Second, apply soft filters based on acceptance criteria. Write acceptance criteria as executable rules, for example: field extraction accuracy, the share of code that runs, tool-call parameter accuracy, whether the final answer contains the required structure, and whether a person must edit the output. Only a clear definition of “usable” makes it possible to compare first-pass success and rework rates.
Third, build a cost baseline. Run a small sample of high-frequency, batch, structured image-and-text tasks, and record input tokens, output tokens, thinking tokens, tool-call counts, and retry counts. The baseline does not need to be perfectly precise, but it should be reproducible. For budget-sensitive tasks that need a large generation budget, add candidates with larger output budgets to the comparison. For complex agent tasks, run several candidates on the same task set. Do not judge success rates from name suffixes or context length alone.
A general trial order is as follows. For high-frequency image-and-text and structured tasks, start with low-cost candidates to build a cost baseline. For budget-sensitive tasks that need a large generation budget, add candidates with suitable output budgets. For tasks that take video input directly, first filter for candidates that support video input. For the final choice of model for a complex agent, run the same task set and decide based on the results. The core logic is to eliminate candidates that fail hard requirements first, then compare cost per successful task among the rest.
3. Four Dimensions Behind the Spec Sheet: Input, Context, Output Budget, and Billing
Public specification documents usually list input types, context length, per-response output budget, and prices. These figures cannot be used directly to rank performance. Read them through four dimensions.
First, input type. Candidates that support text, images, and video suit different tasks. Image understanding may involve OCR, chart question answering, and interface screenshot analysis. Video understanding may involve temporal events, scene description, and multi-frame reasoning. Supporting more modalities does not mean a model is stronger at every task, but the lack of a required modality rules out the scenario entirely.
Second, context length. Context windows of one million tokens are common, but a context length is not the same as usable effective input length, and it does not mean you can fill the input and still get the same amount of output. For some models, maximum input and the output generated in the same turn share one total window, so longer inputs leave less room for output. For long-document tasks, check the maximum input and the remaining context limit, not just the total window.
Third, output budget. A per-response output budget does not equal the length of the final answer. Reasoning also consumes generation tokens, and in thinking mode the chain of thought and the final answer may share the same budget. For tasks that need long code, long reports, or complex tool parameters, an insufficient output budget leads to truncation, retries, or lower quality. For simple classification tasks, a larger output budget does not automatically improve results, and it can raise costs.
Fourth, billing. Providers may charge by input tokens, output tokens, cache hits, tool calls, or request count. To compare fairly, convert prices to “cost per successful task” rather than “list price per million tokens.” Caching, batch processing, fallback routing, and retries all change the actual cost. Price comparisons must therefore account for how the calls are structured.
4. Key Agent Metrics: Look Beyond Per-Call Price to Rework and Tool Rounds
Agent tasks usually involve several rounds of tool calls: reading files, parsing content, generating a plan, invoking functions, validating results, and fixing errors. In this setting, the per-call price is only part of the cost. More useful metrics include first-pass success rate, final success rate, average tool-call rounds, average retry count, P95 latency, and cost per successful task.
A general cost model can be expressed as follows:
def cost_per_success(tasks, p_in, p_out, p_tool, retry_factor):total_cost = 0.0success = 0for t in tasks:input_tokens = t["input_tokens"]output_tokens = t["output_tokens"] + t["thinking_tokens"]tool_calls = t["tool_calls"]retries = t["retries"]one_task_cost = (input_tokens * p_in+ output_tokens * p_out+ tool_calls * p_tool) * (1 + retry_factor * retries)total_cost += one_task_costif t["accepted"]:success += 1return total_cost / max(success, 1)
The formula shows that a cheap candidate with many retries can have a higher cost per successful task. A more expensive candidate that succeeds on the first attempt can have a lower one. In practice, also record the sunk cost of failed tasks. For the business, the cost of manual review caused by rework often exceeds the token cost, so do not rely on the bill alone.
5. Retesting Method: Reproducible Comparison on a Shared Task Set
Retesting should follow four principles: same tasks, same inputs, same acceptance criteria, and same statistics. Build a small but representative task set that covers key scenarios, such as image-and-text extraction, long-document question answering, code generation and repair, tool-call parameter generation, and multi-turn agent tasks. For each task, keep the standard input, the expected output, and the acceptance rules.
Track at least the following metrics: first-pass success rate, final success rate, average rounds, average output tokens, thinking token share, tool-call success rate, P95 latency, and cost per successful task. For agent tasks, also record failure types, such as input misunderstanding, planning errors, tool parameter errors, output truncation, and insufficient context. Failure types give more actionable guidance than an aggregate score. They determine whether you should switch models, revise prompts, split tasks, or add validation tools.
Avoid drawing conclusions from a small number of samples. Run the same task several times to observe variance. For critical business tasks, set aside samples for human review. For cost metrics, use percentiles rather than averages alone. Retest logs should include request parameters, input length, output length, the sequence of tool calls, and acceptance results, so that you can review them later.
6. Deployment Recommendations: Layered Routing, Budget Control, and Observability
In production, avoid binding all tasks to a single candidate model. A safer approach is layered routing. Send simple structured tasks to the low-cost baseline, send complex reasoning or video understanding tasks to more capable candidates, and escalate failed tasks according to defined rules. This balances cost and success rate.
Set budget limits and truncation policies at the same time. Limit the output budget per call, cap the number of tool-call rounds, summarize long documents in segments, cache repeated context, and fall back to a simpler path or manual handling for failed tasks. Monitoring and alerts should cover cost per successful task, failure rate, P95 latency, and output truncation rate. When building general-purpose LLM applications on Baidu AI Cloud, object storage can hold evaluation samples, a log service can record call traces, and monitoring and alerting can track cost and failure rates. Services like these help turn model selection from intuition into data.
7. Conclusion: Model Selection Is an Acceptance Engineering Problem, Not a Parameter Race
Choosing a multimodal LLM should center on business inputs, acceptance criteria, and cost per successful task, not on model name suffixes, context length, or unit price. First, filter hard requirements by input modality. Then define executable acceptance rules. Next, build a cost baseline on a shared task set. Finally, retest first-pass success, rework rate, and cost per successful task in the agent scenario. Price differences matter, but the more important questions are whether the cheaper model can succeed on the first try and whether the more expensive model reduces rework. Only when specifications, costs, and business acceptance results sit in the same experiment table can you choose the model combination that fits the scenario.
