Choosing a Multimodal LLM: Cost, Capability, and Agent Acceptance Testing
This article explains how to choose a multimodal large language model for image understanding, video understanding, and tool calling. It covers screening candidates by input modality and context limits, estimating cost per successful task, comparing candidates by role, running the same agent test set on each one, and designing routing, caching, and monitoring for production.
1. The first principle: specs set the bar, acceptance decides
More and more multimodal LLMs target image-text understanding, video understanding, and tool calling. Their names often include suffixes such as “high-performance,” “lightweight,” or “long-context.” A suffix alone, however, does not prove success on agent tasks. Context length, input modalities, and the per-response output budget are threshold conditions that decide whether a model can do the job at all. Whether it is worth using depends on pass rate on the first attempt, the number of rework rounds, tool call accuracy, the share of structured outputs that parse correctly, end-to-end latency, and cost per task.
Selection should therefore start by defining business inputs and acceptance criteria, and only then comparing prices. Cost differences usually come from four sources: input tokens, output tokens, generation tokens consumed by thinking (thinking tokens), and hidden costs from tool round trips, retries, and manual takeover. A model with a low per-call price does not necessarily have a low total task cost. If it needs more rework rounds, both the bill and the latency increase. Conversely, a candidate with a higher unit price can be more economical on complex agent tasks if it significantly reduces rework.
For a rough engineering estimate, start with the following general cost model. Exact unit prices should follow your actual billing terms.
Cost per attempt =input tokens × input price+ (output tokens + thinking tokens) × output price+ extra cost from tool calls and retriesCost per successful task =sum of all attempt costs / number of successful tasks
Cost per successful task is closer to the real business cost than the price per call. During evaluation, record both cost per successful task and the cost of failures, so that you do not focus only on unit prices.
2. Screen by input and acceptance first: image-text, video, and long documents need separate filters
The first filter is input modality. Text, images, and video place different demands on a model. Image understanding focuses on layout, tables, charts, and fine-grained text. Video understanding also involves frame sampling, temporal relationships, and context consumed by duration and resolution. If your business requires direct video understanding, verify candidates that support video input first. If you only extract key frames from videos and then apply image-text understanding, native video capability need not be a hard requirement.
The second layer is how context and output budgets are counted. Some candidates offer million-token context windows, but “context length” may refer to the total window, the maximum input, or a window shared across turns. It does not mean you can fill the window with a million tokens of input and still get a million tokens of output. The output budget also does not equal the final answer length. Thinking consumes generation tokens, and in thinking mode the limit is often shared between the chain of thought and the answer. For tasks such as long document summarization, code generation, and report writing, measure the effective input window, the maximum generation budget, and the thinking budget separately.
The third layer is acceptance rules. Break acceptance into observable metrics: task completion rate, first-pass rate, structured output validation pass rate, tool call parameter accuracy, state retention across multi-turn tasks, P95 latency, manual takeover rate, and cost per successful task. For agent scenarios, also check recoverability after a failure. Can the model correct its parameters based on tool error messages? Does it avoid repeated tool calls? Does it keep key state when the context nears its limit?
3. Compare candidates by role, not by name
Set product names aside. You can group candidates into roles, which makes it easier to run the same tests on each.
| Candidate role | Input focus | Output budget considerations | Suitable tasks | Main risks |
|---|---|---|---|---|
| Low-cost, high-throughput image-text | Text, images | Single-response output budget may be small; long answers need splitting | Batch classification, extraction, summarization, structured field generation | Long outputs may be truncated; complex reasoning may need an upgrade |
| Large generation budget | Text, images | Suited to long code, reports, or multi-part structured output | Batch generation, code assistance, long drafts | Thinking tokens count toward cost; the budget must be controlled |
| Native video input | Text, images, video | Video frames and long context share the window | Video Q&A, event localization, assisted content moderation | Frame sampling and duration affect quality and cost |
| Comprehensive long-context | Text, images, some with video | Output is limited by the remaining window; reserve space | Long document Q&A, multi-turn agents, cross-file analysis | Context management is complex; latency may rise |
Testing can follow this order: first establish a cost baseline, then verify the capability ceiling, and finally run complex agents. For frequent image-text and structured tasks, start with a high-throughput, low-cost candidate to set a cost baseline. When the budget is sensitive and a larger generation budget is needed, add a candidate with a large output budget. For direct video input, screen for video-capable candidates first. The final decision for complex agents should come from rerunning the same task set. Running the most expensive candidate on small samples from the start would distort the cost data.
4. Agent retesting: same tasks, same tools, same acceptance rules
For agents, the key question is not whether a model can call tools, but whether it can complete tool chains reliably. Build a layered golden set covering single tool calls, serial multi-tool chains, recovery from tool errors, structured output, long-document retrieval, image and table extraction, and video event Q&A. For each task, record the input modality, tool list, acceptance rule, and budget ceiling.
Pseudocode example:
record TaskCase {id, modality, input, tools, expectedSchema, acceptanceRule, maxBudget}function runEval(candidate, cases):for c in cases:trace = candidate.invoke(input = c.input,tools = c.tools,maxOutput = c.maxBudget)schemaOk = validate(trace.output, c.expectedSchema)taskOk = applyAcceptanceRule(trace, c.acceptanceRule)cost = trace.inputTokens * inputPrice+ (trace.outputTokens + trace.reasoningTokens) * outputPricemetrics.record(success = schemaOk and taskOk,retries = trace.retries,latency = trace.latency,cost = cost,failureType = classifyFailure(trace))return aggregate(metrics)
Keep the same task set, tool definitions, timeout and retry policies, and schema validator across every run. Report success rates as intervals rather than single values, and keep failed samples for root-cause analysis. Classify failures into at least these types: comprehension errors, tool parameter errors, tool selection errors, context loss, output truncation, structured parsing failures, and timeouts. Only clear attribution shows whether to switch models, revise prompts, split tasks, or add validation and retries.
5. Cost and engineering rollout: design routing, caching, and monitoring together
Cost optimization should not rely only on choosing cheaper models. Engineering teams can combine several strategies. They can route by task complexity, sending simple extraction to low-cost candidates and escalating complex reasoning to high-capability ones. They can cache stable inputs and chunk and summarize long documents. They can apply strict validation and limited retries to structured outputs, and make tool calls idempotent so that retries do not cause duplicate side effects. They can also set hard budgets on context so that long windows are not filled with irrelevant content. The evaluation pipeline can run on Baidu AI Cloud’s general compute, object storage, and log services, but selection conclusions should still come from your business task set, not from spec sheets.
After launch, keep monitoring cost per successful task, P95 latency, retry rate, manual takeover rate, structured output failure rate, and tool error rate. During a gradual rollout, route traffic by task type. Ship low-risk tasks first, then gradually increase the share of complex agent tasks. If cost rises, determine whether inputs got longer, outputs got longer, the thinking budget grew, or rework increased. If success rate drops, check whether tool definitions, context truncation, or acceptance rules changed.
6. Conclusion: replace spec rankings with a business feedback loop
A sound selection path works in four steps. First, screen candidates by input modality and context thresholds. Second, estimate cost based on the output budget and thinking behavior. Third, measure agent success rate, latency, and cost per successful task on the same golden set. Fourth, decide based on those results. Low-priced candidates should prove they can pass on the first attempt. High-priced candidates should prove they reduce rework. Spec sheets help rule out unsuitable options, but they cannot replace business acceptance testing. Only when capability, cost, stability, and operability appear in the same evaluation table can you choose a model mix that fits your current stage.
