How to Choose a Multimodal LLM and Evaluate Agent Costs
A practical guide to selecting multimodal large language models and estimating real Agent costs. It explains how to define input types and acceptance criteria before comparing prices, how to read context window and output budget specifications correctly, how to convert unit price into per-task cost, and how to evaluate tool-calling reliability. It also outlines a rollout workflow from offline evaluation to canary release, plus common specification and billing mistakes to avoid.
1. Background: Why the Bill Differs 100x for the Same File Reading, Coding, and Tool Calls
In enterprise applications, LLM adoption often starts with a small requirement: read a document that mixes text and images, generate runnable code, or call an internal API to complete a ticket workflow. During the demo stage, several mainstream multimodal models look nearly identical. Once real traffic arrives, however, bills and rework rates diverge quickly: some tasks cost only a few cents per turn, while others cost several yuan per turn.
The difference is rarely just about whether a model is “good.” It usually comes from three stacked factors:
- Different input formats: plain text, mixed text and images, and video frame extraction consume tokens at completely different scales.
- Different generation budgets: whether long chain-of-thought is required, and whether long code or long reports must be produced in one pass.
- Different failure costs: passing on the first attempt versus multiple rounds of rework determines whether the real cost is “unit price” or “unit price x retry count.”
Therefore, the first principle of model selection should be: define inputs and acceptance criteria first, then calculate cost. Price is a result variable, not the starting point of the decision.
2. Define Inputs and Acceptance Criteria Before Discussing Price
2.1 Input Format Determines the Candidate Set
Multimodal capability can be roughly divided into three tiers: text, text + images, and text + images + video. During selection, first classify business inputs into these three tiers, then eliminate candidates that fail hard input requirements to avoid rework later.
- High-frequency text-and-image and structured extraction: for example, receipts, forms, and screenshot Q&A. Candidates should be prioritized for “stable image-text understanding and reliable structured output.”
- Direct video understanding: for example, surveillance clips, screen recordings of operations, and instructional videos. You must confirm whether a candidate natively supports video input rather than relying on external frame extraction and stitching.
- Long-document and code-base understanding: focus on context window and effective utilization, not the nominal maximum.
2.2 Acceptance Criteria Must Be Written as Executable Assertions
“Works well” cannot be accepted or verified. It is recommended to write acceptance criteria as a set of assertions, for example:
Acceptance assertion example (pseudocode)assert output is valid JSONassert missing required field rate < 1%assert code snippet compilation pass rate > 95%assert average turns per task <= 2assert P95 cost per task <= budget threshold
Only by turning “pass on the first attempt” into quantifiable metrics does the subsequent cost comparison become meaningful.
3. How to Read Specifications: Context and Output Budget Done Right
At the public documentation level, four mainstream multimodal models usually all offer million-level context, but context length and naming suffixes do not prove Agent success rates. When reading specifications, pay attention to three easily misread points.
3.1 Context Is a “Total Window,” Not “Input-Exclusive”
In some implementations, input and the current turn’s generation share the same total window. This means you cannot interpret it as “fill in a million input tokens and then output another million.” In engineering, estimate as follows:
Available generation space ≈ total window - current input usage - reserved safety margin
A reserved safety margin of 10%~20% is recommended to handle fluctuations such as expanding retrieval snippets and oversized tool return bodies.
3.2 Output Budget Is Not the Final Answer Length
In thinking mode, the chain of thought also consumes generation tokens. Some implementations make the chain of thought and the final answer share the same budget cap; others set different caps for non-thinking and thinking modes. Estimating cost by “final answer length” will systematically underestimate the bill.
3.3 Do Not Force Unit Conversions
Different documents may mix K and M notations, and whether conversion uses 1024 may not be consistent. In engineering, keep the original notation and use conservative values for capacity planning. Do not treat different units as exactly equal.
4. Cost Model: Convert “Unit Price” into “Per-Task Cost”
4.1 Per-Task Cost Formula
Per-task cost = input tokens x input unit price+ (chain-of-thought tokens + output tokens) x output unit price+ extra consumption from failed retries
The failed-retry term is often overlooked, yet it is often the main driver of an inflated bill.
4.2 Positioning Four Typical Strategies
Without pointing to any specific product, candidates can be abstracted into four strategy types:
- Cost-baseline type: suitable for high-frequency, short-output, image-text structured tasks, used to establish a cost floor.
- Large-generation-budget type: suitable for scenarios requiring long output with a relatively loose budget.
- Native video understanding type: suitable for direct video input, eliminating the external frame-extraction pipeline.
- Long-context balanced type: suitable for long-document and code-base understanding, with attention to effective utilization.
4.3 A Reusable Trial Order
- Step 1: Use a cost-baseline candidate to run high-frequency image-text and structured tasks, establishing a per-task cost baseline.
- Step 2: Introduce a large-generation-budget candidate to handle long-output and complex reasoning tasks.
- Step 3: When direct video input is involved, keep only native video understanding candidates.
- Step 4: For final selection of a complex Agent, re-test with the same task set before deciding.
5. Agent Scenarios: Tool-Calling Support Is Not Success Rate
Multimodal models generally support tool calling, but there is a big gap between “support” and “stably completing multi-step tasks.” Agent success rate depends on:
- Instruction-following stability: whether it drifts across multiple turns;
- Structured output reliability: whether JSON fields remain stable;
- Error recovery capability: whether it can self-correct after a tool error;
- Context management: whether key constraints are lost under long history.
It is recommended to build a layered evaluation set for Agents:
Evaluation set layersL1 single-step tool call (10~20 cases)L2 two-step chaining (read file -> write result)L3 with failure injection (tool returns error code)L4 long context (retrieval snippets + conversation history)L5 video/image-text mixed input
6. Implementation Workflow: From Offline Evaluation to Canary Release
- Offline evaluation: run the four candidate tiers through a fixed task set, recording success rate, turns, and token consumption.
- Cost accounting: convert using the per-task cost formula rather than comparing unit prices.
- Small-traffic canary: roll out at 5%~10% traffic, monitoring P95 latency and failure rate.
- Routing strategy: route by task type to different candidates rather than using a single global model.
- Continuous regression: re-run the evaluation set after every model version change to prevent silent degradation.
7. Common Mistakes Checklist
- Treating context length as an effectiveness ranking;
- Treating output budget as final answer length;
- Ignoring chain-of-thought consumption of generation tokens;
- Comparing bills directly by unit price;
- Launching an Agent without failure-injection testing;
- Forcing unit conversions across different notations, leading to capacity misjudgment.
8. Conclusion
The core of multimodal LLM selection is not finding the “strongest” model, but finding the combination that best matches input format, acceptance criteria, and cost constraints. Define inputs and acceptance criteria first, then calculate per-task cost, and finally re-test with the same task set. Only then can you avoid specification misreadings and out-of-control bills. If an enterprise already uses Baidu AI Cloud’s general capabilities (such as object storage, log service, and monitoring alerts), it can consolidate evaluation data and cost metrics to form a sustainable, iterative selection loop.
