How to Choose a Multimodal LLM and Evaluate Agent Costs

    A practical guide to selecting multimodal large models for AI agents. Learn how input formats, acceptance criteria, context windows, and output budgets affect real costs, plus a four-part cost model and a repeatable evaluation pipeline for comparing model candidates.

    1. Background: Why File Reading, Code Writing, and Tool Calling Can Differ in Cost by Two Orders of Magnitude

    In real engineering work, asking different models to perform the same three tasks—parsing attachments, generating code, and calling external tools—can result in per-turn costs ranging from a few cents to several dollars. Many teams’ first instinct is to “pick the cheapest one,” but the real bill often comes from rework: a single failed output can trigger retries, context replay, result validation, and human intervention, multiplying the cost several times over.

    So the core selection question should not be “which one is cheaper,” but two more engineering-oriented questions:

    • Can the cheaper tier pass acceptance on the target task in a single attempt?
    • Can the more expensive tier lower total cost through fewer turns, shorter outputs, and less rework?

    This article covers four general-purpose model capability forms commonly available in the industry as of November 2026: omni-modal flagship, low-cost high-throughput, ultra-long single-generation, and long-context general-purpose. All of them support image-text understanding, tool calling, and million-level context, but they differ markedly in output budget, reasoning mechanisms, and pricing basis.

    2. Define Inputs and Acceptance First, Then Talk About Price

    The first principle of selection: input format determines the candidate set, and acceptance criteria determine the final choice.

    2.1 Screen Candidates by Input Format

    • Batch image-text and structured extraction (field extraction from invoices, forms, screenshots, and scanned documents): prioritize the low-cost high-throughput tier to establish a cost baseline.
    • Tasks that require directly understanding video (no frame extraction, no upfront transcoding): the candidate range quickly narrows to the omni-modal tier that supports native video input.
    • Pure text long documents and repository-level code understanding: focus on the context window and the constraint that “input plus this turn’s generation share the window.”

    2.2 Write Acceptance Criteria as Executable Assertions

    Do not use “the answer looks good” as acceptance. It is better to express acceptance as a set of programmatically decidable assertions, for example:

    1. task: invoice_field_extraction
    2. acceptance:
    3. - schema_valid: true # Output must pass JSON Schema validation
    4. - field_f1_gte: 0.95 # Lower bound on F1 for key fields
    5. - tool_calls_exact: true # Tool call sequence must exactly match expected
    6. - latency_p95_ms_lte: 8000 # Latency constraint
    7. - cost_per_task_cny_lte: 0.02 # Upper bound on cost per task

    Only when acceptance is quantified does the subsequent price comparison become meaningful.

    3. Spec Comparison: Separate “Context” from “Output Budget”

    At the public documentation level, the four capability forms typically show the following differences (keeping each vendor’s K and M notation, without treating different unit conventions as exactly equal):

    Capability Form Input Types Context Single-Generation Output Budget Notes
    Omni-modal flagship Text, image, video ~1,000,000 tokens ~131,072 non-reasoning; ~262,144 reasoning
    Low-cost high-throughput Text, image 1M, max input ~960k Max ~64k
    Ultra-long single-generation Text, image 1M Max ~384K
    Long-context general-purpose Text, image, video 1,048,576 tokens Default 131,072, limited by remaining context

    3.1 Output Budget Is Not the Final Answer Length

    This is the easiest pitfall: the reasoning process also consumes generation tokens. Some models share the same budget between the chain of thought and the final answer, meaning “max output 262,144” does not mean you will get 260,000 tokens of finished answer.

    3.2 Input and Generation May Share the Total Window

    A typical constraint of the long-context general-purpose form is that input and this turn’s generation share the total window. You cannot interpret it as “fill a million tokens of input first, then output another million.” In engineering, reserve space according to:

    1. usable_input = total_window - reserved_output - safety_margin

    The safety_margin is recommended to be 5%–10% of the total window to absorb tokenization differences and system prompt overhead.

    3.3 Lock Down Model Identifiers and Versions

    In engineering implementation, you must lock the “API identifier + version” rather than relying on display names. Example (vendor-neutral pseudocode):

    1. MODEL_SPEC = {
    2. "flagship_omni": {"id": "<vendor-omni-id>", "version": "pinned"},
    3. "cheap_fast": {"id": "<vendor-fast-id>", "version": "pinned"},
    4. "long_output": {"id": "<vendor-long-id>", "version": "pinned"},
    5. "long_context": {"id": "<vendor-context-id>", "version": "pinned"},
    6. }

    Version drift invalidates evaluation conclusions, so be sure to pin and record versions in a configuration center.

    4. Cost Model: Break the Bill into Four Attributable Items

    Do not look only at “price per million tokens.” Use the following model for attribution:

    1. total_cost = input_cost + output_cost + retry_cost + orchestration_cost
    2. input_cost = (system_prompt + retrieved_chunks + history + current_input) / 1e6 * input_price
    3. output_cost = (reasoning_tokens + structured_output + explanation_text) / 1e6 * output_price
    4. retry_cost = failure_rate * avg_attempts * cost_per_turn
    5. orchestration_cost = hidden overhead of tool round-trips, state management, logging, and monitoring

    Three conclusions are worth emphasizing:

    1. In long-context scenarios, input cost often dominates, and retrieval and deduplication are more effective than switching models;
    2. Bills for reasoning outputs are amplified by “reasoning tokens,” so compressing explanation text yields limited gains;
    3. Failure rate has a multiplicative effect on total cost—improving stability by 10 percentage points is often more worthwhile than a 20% drop in unit price.
    1. Run the low-cost high-throughput form across the full sample set to establish a cost baseline and a set of failure cases;
    2. Introduce the ultra-long single-generation form specifically for tasks that “need to produce long code or long documents in one pass”;
    3. When native video understanding is involved, add the omni-modal flagship form and the long-context general-purpose form for comparison;
    4. The final choice for a complex agent must be decided by the same task set under the same concurrency and latency constraints.

    6. Business Re-Testing Method: A Repeatable Evaluation Pipeline

    1. # Pseudocode: cross-compare under the same task set, assertions, and budget
    2. for model in candidates:
    3. for case in dataset:
    4. resp = call(model, case.input, tools=case.tools,
    5. max_output=case.budget, temperature=0)
    6. ok = evaluate(resp, case.acceptance) # Programmatic assertions
    7. record(model, case, ok, tokens(resp), latency(resp))
    8. report(ranking_by=["pass_rate", "cost_per_task", "p95_latency"])

    Key engineering points:

    • Set temperature to 0 or very low to reduce the interference of randomness on conclusions;
    • Fix the system prompt and tool descriptions to avoid prompt differences contaminating the comparison;
    • Record both reasoning tokens and total generation tokens to help locate budget waste;
    • Classify failure cases by cause: format errors, wrong tool selection, parameter hallucination, and over-length truncation.

    7. Common Pitfalls Checklist

    • Treating context length as agent success rate: a long window only increases “how much information can be held,” not “decision correctness.”
    • Treating naming suffixes as capability tiers: suffixes are product segmentation, not evaluation conclusions.
    • Ignoring unit conventions: K-to-M conversion and counting methods differ across vendors and cannot be treated as equal.
    • Replacing regression with a single demo: agent capability must be continuously validated with a fixed regression set.
    • Neglecting data compliance and audit trails: call chains and inputs/outputs should be auditable, and sensitive fields should be masked before entering the model.

    8. Implementation Recommendations

    If an enterprise has already built a unified model access layer on platforms such as Baidu AI Cloud, it can consolidate the evaluation pipeline above into three components: “model routing + cost attribution + quality gate.” The routing layer selects candidates by input format and budget; the attribution layer breaks down the bill into the four cost items; the gate layer uses the assertion set to block unqualified outputs. This turns selection from a one-time decision into a continuously optimizable engineering capability. The spec sheet reverts to reference information, and what truly determines success or failure is your own task set and acceptance criteria.