Multimodal LLM Selection: Cost, Capabilities, and Agent Testing
Once multimodal LLMs move into production, model selection should not be reduced to context length, parameter count, or unit price. This article presents a reusable engineering method for choosing candidates: define input formats and acceptance criteria first, decompose total cost beyond token pricing, set practical boundaries for context and output budgets, compare candidates on the same agent task set, and validate through small stratified retests before canary rollout.
Once multimodal large language models enter production, model selection is often reduced to “who has a longer context, more parameters, or a lower unit price.” What really determines project success, however, is not a single specification on a leaderboard. It is whether a candidate can consistently pass acceptance validation under the given input formats and control rework cost across multi-turn tool calls. This becomes especially important when tasks combine file reading, code writing, tool invocation, and image or video understanding, because differences in output budget, reasoning mechanism, failure recovery, and pricing basis are amplified.
This article does not focus on any specific product. Instead, it abstracts model selection into a reusable engineering method: define inputs and acceptance first, then break down cost, and finally retest candidates with the same agent task set.
1. Define Inputs and Acceptance Criteria Before Discussing Specs
The first step in model selection is not to open a pricing page. It is to list the input formats used by business tasks. Text, images, video, long documents, structured tables, and tool return results impose very different requirements on candidate models. If the workload is mainly batch image-text processing and structured extraction, the focus should be on image understanding stability, output format constraints, per-task cost, and error rate under high concurrency. If the business needs to understand video directly, first filter for candidates that support video input, and then compare the total cost of frame extraction versus direct video input. Direct video input is not inherently cheaper, because it may require a larger input budget and more complex acceptance logic.
Acceptance metrics must also be defined in advance. Common metrics include first-pass rate for structured output, validity rate of tool-call parameters, multi-step task completion rate, multi-turn consistency, average latency, human review rate, and total per-task cost. Do not ask only “can it answer?” Ask “can it deliver in the agreed format, recover after a tool failure, and maintain key constraints in a long context?” A practical approach is to divide acceptance into three layers: format and fact validation, business rule validation, and human spot checks. Specifications only become meaningful when all three layers are stable.
2. Pricing Basis: Beyond Unit Price, There Is Rework Cost
Model cost is usually not a simple sum of input unit price and output unit price. A more reasonable estimate should include input tokens, output tokens, thinking tokens, retry count, human review, and failed rework. Reasoning mode consumes generation budget, and for some candidates the thinking process and final answer share the output limit. The context window may also be a total window shared by input and current-turn generation; it should not be understood as “fill the input, then output the same amount.” These rules directly affect the actual cost of long-document tasks and multi-turn agent tasks.
The following pseudo-code can be used to establish a per-task cost baseline:
function estimate_task_cost(candidate, task):input_tokens = count_tokens(task.input)expected_output = count_tokens(task.expected_output)thinking_tokens = candidate.thinking_enabled? estimate_thinking_tokens(task): 0total_cost = 0for attempt in 1..max_retry:total_cost += input_tokens * candidate.input_pricetotal_cost += (expected_output + thinking_tokens)* candidate.output_priceresult = run(candidate, task)if validate_format(result)and validate_business_rules(result):breaktotal_cost += review_cost(task) * review_ratereturn total_cost
The point of this pseudo-code is not the specific price. It reminds teams that if a cheap candidate has a low first-pass rate, retries and human review will bring the cost back up. An expensive candidate that significantly reduces rework may not have a higher total cost. During evaluation, record the cost of successful tasks, the cost of failed tasks, and the secondary cost after failed samples are fed back into the process.
3. Engineering Boundaries for Context and Output Budgets
Million-token context is a common selling point, but engineering teams need to verify three things: maximum usable input, single-turn output budget, and whether input and output share the same window. If a long-document task places an entire manual into the input at once, it may trigger truncation or compression. If an agent task carries the full history in every turn, input cost will rise quickly. A more robust approach is layered context: fixed system constraints, a rolling task-state summary, on-demand retrieval of raw evidence, and only key fields retained from tool results. This preserves traceability while controlling the input budget.
Output budgets also need constraints. For structured extraction, candidates should be asked to output short fields rather than long explanations. For code generation, limit file scope and patch format. For multi-step agents, require a state summary and next action at each step. If a candidate supports reasoning mode, clarify whether the thinking budget counts toward output and whether it shares a cap with the answer, and record the pass-rate difference between reasoning on and off during evaluation. Do not equate a large output budget with a long final answer, or a long context with long-task stability.
4. Comparison Dimensions for Agent Scenarios
The core of agent tasks is not single-turn question answering. It is planning, tool selection, parameter generation, error recovery, and state maintenance. Evaluation should use the same task set covering simple single-tool tasks, multi-tool chains, tool failure retries, retrieval from long documents before tool calls, image information extraction before tool calls, and video content understanding followed by structured output. For each scenario, record tool call count, parameter validity rate, task completion rate, average turns, failure reason distribution, and per-task cost.
Multimodal tasks should distinguish between “direct understanding” and “understanding after preprocessing.” When images can be input directly, focus on stability for small text, tables, screenshots, and receipts. When video can be input directly, focus on temporal localization, keyframe understanding, and long-video summarization. If frame extraction plus text description is used, include frame extraction cost, description error, and secondary call cost in the calculation. For tool calls, focus on whether the candidate can consistently output parseable parameters, switch strategies after a tool error, and maintain business constraints across turns. Specification sheets cannot prove these capabilities; only retesting can.
| Evaluation dimension | Key question | Evidence source | Suggested weight |
|---|---|---|---|
| Input modality | Does it cover text, images, video, and combined inputs? | Task set testing | High |
| Acceptance pass rate | Are format, fact, and business rule layers stable? | Automated validation plus spot checks | High |
| Tool calling | Parameter validity, failure recovery, multi-step completion rate | Agent task set | High |
| Cost basis | Total cost across input, output, thinking, retries, and review | Cost script and billing | Medium-high |
| Context engineering | Long-document truncation, state compression, retrieval augmentation effectiveness | Long-task stress testing | Medium |
| Operability | Logs, monitoring, rate limiting, canary rollout, and rollback | General cloud environment validation | Medium |
5. Trial Order and Retesting Method
The trial order should serve business risk rather than pursuing a one-time final selection. For high-frequency image-text and structured tasks, start with a cost-controllable candidate that supports image input to establish a cost baseline. For budget-sensitive scenarios that need a larger generation budget, add a candidate with a looser output budget as a control. For direct video input, first filter candidates that support video, then compare direct input with frame extraction. The final choice for complex agents must be decided by running the same task set; do not draw conclusions directly from a name suffix or specification number.
For retesting, use a small stratified task set. Prepare 20 to 50 real, desensitized tasks stratified by input modality, tool count, context length, and acceptance difficulty. Run the same tasks for each candidate with fixed randomness and timeout settings. Record successes, failures, retries, and human reviews. Classify the causes of failed samples and feed them into the next evaluation round. Evaluation data, logs, and result summaries can be stored in general-purpose object storage and logging services. When deploying on Baidu AI Cloud, its general object storage, logging, and monitoring capabilities can be used for data retention and alerting, without relying on a specific model API. The final decision should use a weighted matrix: quality weight above price weight, and price weight above specification weight. Pilot first, then canary, then scale, while continuously monitoring first-pass rate and total per-task cost.
6. Implementation Recommendations
The selection conclusion should be written as an executable configuration, not as a sentence saying “model X is better.” For each business scenario, define the candidate pool, input preprocessing strategy, output constraints, retry strategy, human review threshold, and cost ceiling. For each candidate, record the version, evaluation date, and failure samples. For production traffic, set a canary ratio and rollback conditions. Specifications are the entry ticket, acceptance validation is the judge, cost is the constraint, and agent retesting is the final evidence. Only by putting inputs, acceptance, cost, and retesting into the same decision table can teams avoid being misled by a single metric and select a model combination that truly fits the business.
