How to Choose a Multimodal LLM and Evaluate AI Agent Costs

    Why two models that appear to do the same work can produce bills that differ by two orders of magnitude, and how to compare them properly. This guide breaks the cost of a single call into input, generation, and rework, then shows how to narrow candidates by input modality, define executable acceptance criteria, read context window and output budget specs correctly, and rank options by effective cost per successful pass rather than by list price or model naming. It also covers evaluation practices specific to AI agents, such as multi-step stability, error recovery, and budget controllability, plus a short list of common mistakes to avoid.

    1. The Problem: Why “Similar Models” Can Differ by Two Orders of Magnitude on the Bill

    A common puzzle in real engineering work: for the same three tasks — reading documents, writing code, and calling tools — some models cost a fraction of a cent per call while others cost several yuan. Many teams’ first instinct is “more expensive means more capable,” so they default to the higher tier. Other teams do the opposite: they always pick the cheapest option, then retry repeatedly when results fall short, and end up with a larger bill.

    To understand this, break the cost of a single call into three parts:

    1. Input cost: prompts, system instructions, conversation history, retrieved document chunks, and the encoded results of images or video all count as input.
    2. Generation cost: this covers not only the final answer but also the generation budget consumed by the thinking process.
    3. Rework cost: malformed output, wrong tool arguments, and second or third retries. This part is often overlooked, yet it is frequently the main driver of the bill.

    So the core selection question is not “which model is cheaper,” but: can the cheaper tier pass acceptance on the first attempt, and can the more expensive tier reduce the number of rework rounds? Only by looking at per-call price and average rounds needed to pass together do you get a meaningful cost figure.

    2. Align on Inputs and Acceptance Criteria Before Talking About Cost

    2.1 Input modality determines the candidate set

    Multimodal capability generally falls into three tiers: text only, text plus images, and text plus images plus video. The first selection step is to classify your business inputs:

    • If inputs are batches of text and images (product photos with captions, receipt screenshots, form photos), the candidate set can be wide, and you should validate the more cost-friendly tiers first.
    • If the business requires direct video understanding (long-video content moderation, structuring lecture recordings, summarizing surveillance clips), the candidate set narrows considerably, because only some models natively support video input.
    • If inputs are plain-text structured extraction and code generation, image and video capability is redundant — unused, but it raises the unit price — and should be excluded deliberately.

    An easily overlooked engineering detail: extracting frames from video and feeding them to a “text plus image” model may look like a way around the modality limit, but it multiplies input tokens and loses temporal information, which usually is not worth it.

    2.2 Acceptance criteria must be executable

    “Good results” is not an acceptance criterion. Executable acceptance includes at least four items:

    • Format compliance rate: whether the JSON parses, whether fields are complete, whether enum values are out of range.
    • Tool call correctness: whether the function name, required parameters, and parameter types are correct, and whether multiple correction rounds are needed.
    • Factual consistency: whether extracted content matches the source and whether anything is fabricated.
    • Latency and stability: P95 performance for time to first byte and for the full round.

    Prepare 50–200 fixed samples per task type as a regression set, and run the same set for every model or parameter change.

    3. Four Key Dimensions: How to Read the Spec Sheet

    The specs in vendors’ public documentation can be grouped into a few categories, as shown below. Vague terms such as “million-level” and “thousand-level” are kept as-is; different unit conventions are not treated as exactly equal.

    Capability dimension Common range Selection implication
    Input modality Text; text + images; text + images + video Determines the candidate set; a hard gate
    Context length Million-token scale; max input may be slightly below the nominal value Affects feasibility of long documents and long conversations
    Single-response output budget Tens of thousands to hundreds of thousands of tokens; differs between thinking and non-thinking modes Affects long-form generation and complex reasoning
    Thinking mechanism Dedicated thinking mode or not; whether the chain of thought shares the budget Affects cost and controllability

    3.1 Output budget is not the final answer length

    This is the easiest point to get wrong and the easiest source of budget misjudgment. The thinking process consumes generation budget too, and for some models the thinking mode cap is that “the chain of thought and the answer share the same budget.” That means if the model thinks for 8,000 tokens, only the budget minus 8,000 is left for the body.

    3.2 Input and generation may share one total window

    Another design has input and the current round’s generation sharing the total window. Here you cannot assume you can “fill a million-level input first, then output another million-level of content.” The right approach is a rough upper-bound estimate:

    1. def estimate_budget(context_window, reserved_output, prompt_tokens):
    2. """Rough estimate of the generation space available this round; the vendor documentation prevails"""
    3. available = context_window - prompt_tokens
    4. return max(0, min(reserved_output, available))
    5. # Example: 1M total window, 131,072 reserved for output, input already at 950,000
    6. print(estimate_budget(1_000_000, 131_072, 950_000)) # 50000

    3.3 Verify model identifiers and versions against official documentation

    A major source of failed calls is a wrong model identifier: the shorthand and run-together forms circulating in communities often differ from the official call name, and the same “Flash” or “Pro” suffix may map to multiple snapshot versions. In engineering, keep model identifiers in a central configuration and validate them in CI instead of scattering them across business code.

    1. # Centralized model configuration example (illustrative, not any vendor's proprietary interface)
    2. models:
    3. baseline: { id: "<official-id-a>", thinking: false }
    4. long_output: { id: "<official-id-b>", thinking: true }
    5. video_input: { id: "<official-id-c>", thinking: true }

    4. A Reusable Trial Sequence

    With no historical data, proceed in the order “establish a baseline, fill the gaps, then decide together”:

    1. Establish a cost baseline: pick a high-frequency text-and-image plus structured task, run the full pipeline on the most cost-friendly tier, and record per-call price and first-attempt pass rate.
    2. Fill the generation budget gap: if the task needs long output (long reports, large blocks of code), bring in a tier with a more generous single-response generation budget for comparison.
    3. Validate video input: when direct video understanding is involved, screen only among candidates that support video input to avoid pointless comparisons.
    4. Decide together: run all candidates on the same regression set and rank by “effective cost = per-call price × average rounds needed,” not by parameter count or naming suffix.

    Note that neither context length nor naming suffix proves the success rate of agent tasks. A long window only solves “does it fit,” not “is it used correctly”; tool-calling ability is just a switch, and the real gap shows up in planning and error correction across multi-step tasks.

    5. Evaluation Methods for Agent Scenarios

    Agent tasks require attention to three additional points:

    • Multi-step stability: whether parameter correctness degrades across 5–10 consecutive tool calls.
    • Error recovery: whether the model can read an error message from a tool and fix it, rather than repeating the same call.
    • Budget controllability: whether the gains from thinking mode outweigh its extra generation cost.

    A simplified evaluation loop looks like this:

    1. def evaluate(candidates, dataset, max_turns=10):
    2. report = {}
    3. for name, model in candidates.items():
    4. passed, turns, tokens = 0, 0, 0
    5. for case in dataset:
    6. ok, t, tk = run_agent(model, case, max_turns)
    7. passed += ok; turns += t; tokens += tk
    8. n = len(dataset)
    9. report[name] = {
    10. "pass_rate": passed / n,
    11. "avg_turns": turns / n,
    12. "avg_tokens": tokens / n,
    13. "cost_per_pass": (tokens / n) / max(passed, 1),
    14. }
    15. return report

    cost_per_pass is the number you can actually decide on: it puts “cheap but repeatedly retried” and “expensive but passed on the first try” on the same scale.

    6. Common Pitfalls

    • Treating the nominal context length as fully available for both input and output.
    • Ignoring the thinking process’s claim on the generation budget.
    • Calling with community shorthand instead of the official identifier.
    • Comparing single-round quality only, without tracking average rounds needed.
    • Forcing a video task into a text-and-image model via frame extraction.
    • Treating the spec sheet as a quality ranking and skipping business re-testing.

    7. Practical Recommendations

    If your team already uses model services on a public cloud, you can hard-code these methods into the engineering pipeline: manage model identifiers and parameters with a unified configuration, store regression samples and call logs in object storage, track first-attempt pass rate, average rounds, and P95 latency with logging and monitoring alerts, and use a container platform to turn evaluation jobs into repeatable pipelines. The general-purpose capability categories offered by Baidu AI Cloud can serve as one way to host this, but selection conclusions should still come from your own regression data.

    In summary, four steps cover most scenarios: filter candidates by input modality, define metrics by acceptance criteria, estimate cost by output budget and thinking mechanism, then decide on the same task set. Specs are only the entry ticket; business re-testing is the basis for the decision.