How to Choose a Multimodal LLM and Evaluate Agent Costs

    Choosing a multimodal large language model by comparing spec sheets often fails because specs describe capability limits, not business results. This guide presents a reproducible selection and acceptance workflow: align on input modalities first, plan the output budget correctly, break down the full cost structure beyond per-token price, run trials in a staged order, and validate with a shared task set. It includes budget estimation pseudocode, a cost formula, and a sample evaluation record to help teams control both per-round spending and hidden rework costs.

    1. Why Spec-Sheet Selection Often Fails

    When teams evaluate several large models, the most common approach is to compare context length, maximum output per request, and supported input modalities side by side, then pick the one that looks strongest. The problem is that specs describe capability boundaries, not business outcomes. Two models with million-token context windows can perform very differently on long-document extraction. Two models that both claim tool-calling support can have completely different first-pass success rates in multi-round agent orchestration.

    A more practical cost puzzle is this: for the same kind of task—reading files, writing code, and calling tools—one combination may cost very little per round, while another may spend several yuan. Price differences matter, but two engineering questions matter more: can the cheaper option pass acceptance on the first try, and can the more expensive option reduce rework rounds? Total cost in agent scenarios is often determined by “number of retries × cost per round.” Optimizing only the per-round price often leads to a higher total bill.

    This article therefore does not provide a performance ranking. Instead, it offers a reproducible selection and acceptance method: define inputs and acceptance criteria first, then calculate costs, and finally retest with the same set of business tasks.

    2. Align on Inputs First: Modality Differences Determine the Candidate Set

    The first step is not to look at price, but to list the real shape of the business inputs. Mainstream large models currently fall into two categories of input capability: one accepts only text and images, and the other also supports video input. This difference directly determines the size of the candidate set.

    • If the business input is batch images plus text—for example, receipt recognition, product image understanding, or image-text consistency checks—models that support only text and images are sufficient. The candidate range is wider, and you can start with lower-cost options to establish a baseline.
    • If the business input includes video—for example, long-video content understanding, shot-level summarization, or event extraction from video—the candidate set quickly narrows to the few models that support video input. In this case, apply a hard filter based on modality capability first, then move on to cost and performance comparison.

    An often-overlooked detail: supporting an input modality does not mean achieving business-ready accuracy on that modality. Video understanding also involves engineering issues such as frame sampling strategy, temporal alignment, and whether the audio track participates in inference. These need to be verified separately during retesting.

    3. Check the Output Budget: Do Not Treat the Limit as the Answer Length

    A common mistake is interpreting “maximum output tokens per request” as “how long the final answer can be.” In fact, models with a thinking mechanism count the reasoning process toward the generation budget; the chain of thought and the final answer share the same allowance. This means that in tasks requiring long answers, the usable length of the final text is compressed by reasoning consumption.

    At the same time, some models use a design where the input and the current round’s generation share the total window. In this case, you cannot assume “fill a million tokens of input first, then output another million tokens.” The correct approach is capacity planning based on “total window = input + current-round generation.”

    The following illustrative pseudocode explains the basic idea of budget estimation. Actual values should be based on each vendor’s official documentation:

    1. def estimate_budget(total_window, prompt_tokens, thinking_ratio=0.0):
    2. """
    3. total_window: total context window of the model
    4. prompt_tokens: input for the current round (including history and retrieved snippets)
    5. thinking_ratio: proportion of reasoning usage in thinking mode, for planning reference only
    6. """
    7. remain = total_window - prompt_tokens
    8. if remain <= 0:
    9. raise ValueError("Input has filled the window; trim history or retrieved snippets")
    10. reserved_for_thinking = int(remain * thinking_ratio)
    11. answer_budget = remain - reserved_for_thinking
    12. return answer_budget, reserved_for_thinking

    Three engineering practices are recommended: first, compress and truncate conversation history and retrieved snippets to leave room for generation; second, explicitly set output limits for tasks that require long output and use segmented generation; third, include “truncation” and “not passing on the first try” in monitoring metrics instead of waiting for production complaints.

    4. Break Down the Cost Structure: Four Hidden Costs Beyond Unit Price

    When comparing prices across vendors, their notation and rounding conventions for K and M are not always consistent. Treating different units as exactly equal will lead to wrong conclusions. A more reliable approach is to break costs into verifiable items:

    1. Input-side cost: in long-context tasks, input often makes up the main part of the total cost, and repeated billing of history rounds and retrieved snippets is especially noticeable.
    2. Output-side cost: thinking models usually have a higher output unit price, and reasoning content is billed as well.
    3. Retry cost: each drop in first-pass success rate can double the actual cost.
    4. Engineering cost: rate limiting, queuing, failure replay, result validation, and manual sampling are all real expenses beyond the bill.

    Use “total cost per task” rather than “price per token” as the decision metric:

    1. Total cost per task ≈ input cost per round + output cost per round + (number of retries × cost per round) + validation and manual cost

    5. Trial Order by Scenario: Build a Baseline First, Then Compare

    Once the candidate set is determined, proceed in the following order to avoid investing in the most expensive combination from the start:

    • High-frequency image-text and structured extraction tasks: first use low-cost options to establish cost and latency baselines, and clearly record accuracy, field completeness rate, and format compliance rate.
    • Budget-sensitive tasks that need a larger generation budget: introduce options with a more generous output budget for comparison, and observe whether longer output reduces truncation and secondary processing.
    • Tasks involving video input: first filter options that support the modality, then compare extraction accuracy and cost per minute.
    • Complex agent orchestration: do not judge by “large cup / small cup” in the name; you must run the full pipeline with the same task set and compare tool-call success rate, average number of rounds, and failure recovery capability.

    6. Acceptance Method: Pin Down Conclusions with the Same Task Set

    Build a business task set of 50 to 200 items covering typical input lengths, boundary lengths, and abnormal inputs, and define machine-verifiable acceptance criteria for each task, such as field-level exact match, executable code that passes unit tests, or tool-call parameter schema validation. During evaluation, fix parameters such as prompts and temperature, and record first-pass success rate, average rounds, average token consumption, and end-to-end latency.

    1. {
    2. "task_id": "invoice_extract_014",
    3. "input_modal": ["text", "image"],
    4. "acceptance": "field-level exact match",
    5. "metrics": {
    6. "pass_at_first_try": true,
    7. "rounds": 1,
    8. "input_tokens": 8200,
    9. "output_tokens": 640
    10. }
    11. }

    7. Common Pitfalls and Engineering Recommendations

    • Pitfall 1: Longer context is always better. In practice, focus on effective utilization and the quality of retrieved snippets.
    • Pitfall 2: Name suffixes indicate capability tiers. Capability must be supported by retest conclusions.
    • Pitfall 3: Model identifiers can be written from memory. Verify them against the official documentation before calling to avoid call failures caused by incorrect identifiers.
    • Recommendation: encapsulate model calls behind a unified gateway, and handle retries, fallback, budget control, and metric collection centrally; at the same time, build a cost dashboard with logging services and monitoring alerts, and attribute costs by business dimension.

    8. Conclusion

    Selecting a multimodal large model is essentially aligning four things—input shape, output budget, cost structure, and acceptance criteria—and then performing reproducible validation with a unified task set. Specs are only for narrowing candidates and planning capacity; business retesting is for the final decision. Following this process, teams can control per-round costs and reduce hidden expenses from rework. In general engineering practice on cloud platforms such as Baidu AI Cloud, this method applies equally to building model gateways, cost dashboards, and evaluation pipelines.