How to Choose a Multimodal LLM and Evaluate Agent Cost per Successful Task

    Choosing a multimodal model is not about finding the cheapest price per token or the most powerful model, but about minimizing the cost per successful task under your own input distribution and acceptance criteria. This guide abstracts multimodal LLMs with image understanding, tool calling, and million-token context into four capability combinations and presents a practical evaluation framework. It covers how input modality narrows the candidate pool, why acceptance criteria must be defined upfront, how context and output budgets are shared, how to convert token pricing into cost per successful task, and how to run a reusable Agent evaluation. You will learn why cheap models can end up more expensive due to retries, and how to avoid being misled by unit prices or naming suffixes like Max and Flash.

    1. The Problem: Why the Same Document Task Can Cost 100x More

    In real engineering work, we often see this pattern: for the same category of tasks—reading documents, writing code, and calling tools—the cost of a single run can range from a few cents to several dollars depending on the model. Many teams’ first instinct is to “pick the cheapest one,” but the real bill often proves them wrong. A cheap model fails on the first attempt and needs three rounds of retries, so the total cost ends up higher. An expensive model passes on the first try; its unit price looks high, but the cost per successfully delivered task is actually lower.

    So the core selection question should not be “what is the unit price?” It should be two more engineering-oriented questions:

    1. Can the low-cost tier achieve a high first-pass yield?
    2. Can the high-capability tier reduce the rework rate?

    This article does not focus on any specific vendor’s products. Instead, it abstracts large models that support image-text understanding, tool calling, and million-level context into four combinations of capabilities, and provides a practical evaluation framework.

    2. Define Inputs and Acceptance First, Then Calculate Cost

    2.1 Input Modality Determines the Candidate Pool

    Multimodal capabilities usually fall into three tiers: text plus images; text, images, and video; and structured input centered on long documents. The first step in selection is not looking at benchmark scores, but confirming what your data actually looks like:

    • If your data consists of screenshots, scanned documents, or report images, the candidate pool can be broad, and many mid- and low-priced models can handle it.
    • If you must understand video directly (rather than extracting frames and converting them to images), the candidate pool narrows significantly, and you should prioritize validating the few solutions that support native video input.
    • If the input is an extremely long codebase or logs, the focus shifts to the context window and effective context utilization.

    2.2 Acceptance Criteria Must Be Defined Upfront

    “Can it do it” and “does it do it well” are two different things. It is recommended to write acceptance conditions as executable assertions before selection, for example:

    • Structured output field completeness ≥ 99%;
    • Tool call parameter validity rate ≥ 98%;
    • End-to-end success rate per task ≥ target value;
    • Average number of reworks ≤ 1.2.

    Selection without acceptance criteria eventually degrades into “this model feels smarter.”

    3. Context and Output Budget: The Two Easiest Calculations to Get Wrong

    3.1 A Million-Token Context Does Not Mean a Million Input Plus a Million Output

    The million-level context window common in the industry usually means that the input and the current generation share the same budget pool. In other words, you cannot assume that you can fill one million tokens of input and then output another million tokens on top. The actual available output space = total window − input usage − system prompt and tool definition usage.

    3.2 Thinking Also Consumes the Output Budget

    Models with a “thinking mode” or chain-of-thought capability consume generation tokens for their reasoning process as well. Some implementations make the chain of thought share the same output limit as the final answer. This means:

    • After enabling thinking, the budget left for the final answer becomes smaller;
    • In multi-turn calls of a complex Agent, thinking overhead accumulates and amplifies.

    Illustrative pseudocode for estimating the budget of a single call:

    1. def estimate_budget(total_window, input_tokens, tool_schema_tokens, thinking_ratio=0.0):
    2. usable_output = total_window - input_tokens - tool_schema_tokens
    3. final_answer_budget = usable_output * (1 - thinking_ratio)
    4. return usable_output, final_answer_budget
    5. # Example: total window 1,000,000, input 300,000, tool definitions 20,000, thinking ratio 50%
    6. usable, answer = estimate_budget(1_000_000, 300_000, 20_000, 0.5)
    7. print(usable, answer) # 680000 340000

    3.3 Do Not Force Exact Alignment of Unit Conventions

    Different platforms may use different notation and conversion conventions for K and M; some use base 1024, while others use a decimal approximation. When doing capacity planning, it is recommended to keep a safety margin (for example, estimating at 80% availability) and not treat different conventions as exactly equal.

    4. Pricing: Converting Unit Price into Cost per Successful Task

    4.1 Breaking Down Billing Dimensions

    General large model billing usually includes input tokens, output tokens, thinking tokens (if any), and repeated input caused by tool call rounds. What really determines the bill is:

    • Average input length (huge differences in long-document scenarios);
    • Average output length (a model with a large generation budget does not necessarily use it all);
    • Number of retries (models with low success rates have high hidden costs).

    4.2 A Unified Metric: Cost per Successful Task

    It is recommended to convert all candidate models to the same metric:

    1. CostPerTask = (input price × average input + output price × average output) × average call rounds ÷ task success rate

    This formula explains “why the cheap one is actually expensive”: if the success rate is 0.6 and the average retry is 2 rounds, the cost is amplified by more than 3x.

    5. Agent Scenarios: Max and Flash in the Name Do Not Indicate Success Rate

    5.1 Tool Calling Capability Comes Down to Three Things

    • Parsing stability of tool definitions (whether complex nested parameters are error-prone);
    • Multi-turn state retention (whether it “forgets” early constraints under long context);
    • Error recovery (whether it can self-correct after a tool error).

    None of these are related to naming suffixes and must be tested with real business tasks.

    1. High-frequency image-text and structured extraction: first use the low-cost tier to establish a cost baseline;
    2. Budget-sensitive scenarios that need a larger generation budget: add a high-output-budget tier for comparison;
    3. Native video input: keep only the few candidates that support the video modality;
    4. Complex Agents: run the same task set through and decide based on CostPerTask.

    6. Business Re-Testing Method: A Reusable Evaluation Skeleton

    1. tasks = load_tasks("agent_eval_set.jsonl") # includes input, tool schema, acceptance assertions
    2. def run_eval(model_client, tasks):
    3. total_cost, success, rework = 0, 0, []
    4. for t in tasks:
    5. for attempt in range(1, 4):
    6. resp = model_client.call(t.input, tools=t.tools)
    7. total_cost += resp.cost
    8. if verify(resp, t.assertions):
    9. success += 1
    10. rework.append(attempt - 1)
    11. break
    12. return {
    13. "success_rate": success / len(tasks),
    14. "avg_rework": sum(rework) / len(tasks),
    15. "cost_per_task": total_cost / success if success else float("inf"),
    16. }

    The evaluation set should cover five categories: long documents, image tables, video clips, multi-tool chaining, and tool error recovery, avoiding “only testing simple samples.”

    7. Conclusion

    Selection is not about finding the “strongest model,” but about finding the combination with the lowest cost per successful task and controllable rework under your input distribution and acceptance criteria. First lock down the input modality and acceptance assertions, then unify the billing convention, and finally re-test with the same Agent task set. Only then can you avoid being misled by unit prices and naming. If you need to implement this on Baidu AI Cloud, you can combine general cloud product capabilities such as object storage, log services, and monitoring alerts to build an observable and recomputable model evaluation pipeline.