Aakib Ansari.
Back to articles
Deep Dive

Inside Meituan LongCat-2.5: 1.6T MoE, 88.4 Terminal-Bench, and Training on Agent Failures

Md Aakib Ansari
Md Aakib AnsariWeb Developer & AI Tools Reviewer
•7 min read
Inside Meituan LongCat-2.5: 1.6T MoE, 88.4 Terminal-Bench, and Training on Agent Failures

During an automated software maintenance benchmark across an 85,000-line full-stack e-commerce monorepo, an engineering team deployed autonomous coding agents to resolve 34 breaking front-end layout bugs and migrate legacy PostgreSQL database schemas. Standard dense LLMs repeatedly stumbled when reconciling visual component mismatches, misinterpreting Figma mockups and generating cascading terminal syntax errors that exhausted agent retry budgets.

When the developers routed the repository through Meituan's newly released LongCat-2.5, the model ingested the full repository, visual component screenshots, and interactive terminal logs simultaneously within its 1-million-token context window. Armed with a curriculum trained explicitly on agent execution failures, LongCat-2.5 detected the layout regressions, executed interactive terminal build passes, and resolved 32 of the 34 issues autonomously without human intervention. That resilience marks a significant milestone in production-grade software agency.

System Vitals & Specifications

SpecificationValueVerification / Sourcing
DeveloperMeituanOfficial announcement reported via TechNode & IT Home
Release StatusActive ReleasePublic API and enterprise developer console
Total Parameters1.6 Trillion (Sparse MoE)Architecture technical disclosure
Active Parameters~48 Billion per tokenSparse Mixture-of-Experts routing
Context Window1,000,000 tokens (1M context)Official documentation
Maximum Output Ceiling128,000 tokensExtended generation support
Native ModalitiesText, Code, Images, GUI ScreenshotsSingle unified token framework
Benchmark SOTA88.4 on Terminal-Bench v2.1Outperforms LongCat-2.0 (70.8) & GPT-5.5
Training InfrastructureDomestic Chinese AI AcceleratorsSovereign infrastructure cluster
Inference QuantizationW4A4 INT4 & W8A8 INT843.3% prefill and 42.77% decode speedups
API Pricing (Input / Output)$0.30 / $1.20 per 1M tokensPublic API platform pricing
Prompt Caching Rate$0.006 per 1M cached tokens98% cache discount
Distribution ChannelsMeituan Chat, API PlatformGitHub & Hugging Face weights planned

Benchmark Breakdown: Autonomous Execution and Architecture

1. Terminal-Bench v2.1: Elevating Interactive Software Engineering

Terminal environments represent the ultimate trial for autonomous software agents because commands require strict syntactic precision, stateful directory awareness, and dynamic error recovery. On Terminal-Bench v2.1, which measures multi-step shell operations and command-line tool usage:

  • LongCat-2.5 scored 88.4, securing one of the highest ratings recorded for open and enterprise-accessible models.
  • This marks a decisive 17.6-percentage-point leap over LongCat-2.0 (70.8), demonstrating the compounding benefits of refined MoE routing.
  • The model outpaced reported baseline results for GPT-5.5, [GPT-5.6 Sol](/models/gpt-5-6-sol), and Claude Opus 4.8 on complex shell script generation and multi-step CLI debugging.

The performance surge stems from the model's capacity to maintain active execution state across up to 128,000 output tokens, allowing it to inspect build outputs, analyze stack traces, and execute corrective commands without stalling.

2. Unified Multimodal Token Ingestion

Unlike conventional agentic pipelines that bolt an external vision encoder onto a frozen language backbone, LongCat-2.5 implements a unified token architecture. Visual inputs—including UI wireframes, software architecture diagrams, and application window captures—are tokenized directly into the core latent space.

This structural choice eliminates cross-attention latency bottlenecks between vision and text sub-networks. In multi-window desktop automation tasks, LongCat-2.5 processes screenshots of terminal sessions alongside code diffs with synchronized spatial coordinate understanding.

3. Curriculum Training on Real Agent Failures

The technical core of LongCat-2.5 is Meituan's failure-trace reinforcement learning pipeline. Traditional coding models trained solely on clean golden code paths often collapse into repetitive loops when tools throw unforeseen errors.

Meituan collected thousands of real-world agent execution breakdowns—such as broken package dependencies, merge conflicts, port collisions, and corrupted lockfiles—and synthesized them into interactive training curricula. Rather than hallucinating fixes, the model learned to inspect environment variables and verify intermediate build artifacts before committing irreversible changes.

4. Domestic Infrastructure and Inference Throughput

LongCat-2.5 was trained entirely on domestically developed Chinese AI accelerators, showcasing notable hardware resilience amid global semiconductor export constraints.

In production serving environments, Meituan introduced an aggressive W4A4 INT4 inference pipeline:

  • Prefill Throughput: Increased by 43.3% compared to standard W8A8 baselines.
  • Decode Latency: Improved by 42.77%, ensuring fluid sub-second token generation during interactive terminal loops.
  • SFT Acceleration: Utilizing Fully Sharded Data Parallel (FSDP) implementations delivered an 86% higher per-device throughput during long-sequence supervised fine-tuning compared to traditional Distributed Data Parallel (DDP) pipelines.

Social Proof & Developer Reactions

Industry observers and developers quickly highlighted the practical implications of Meituan's release:

  • TechNode Technology Desk: "Meituan's LongCat-2.5 underscores the strategic transition of Chinese tech giants from conversational interfaces to production-grade agentic infrastructure. By coupling 1.6 trillion parameters with a 1M context window on domestic silicon, Meituan has positioned LongCat as a formidable competitor to Western frontier developer models."
  • Emergent AI Analysis: "The decision to build training curricula around real agent failure traces addresses the primary pain point in enterprise AI automation: brittleness. LongCat-2.5 demonstrates that error-recovery training is just as vital as raw coding benchmark scores."
  • Daily.dev Research Review: "With an 88.4 score on Terminal-Bench v2.1 and a 98% discount on cached tokens, LongCat-2.5 fundamentally changes the economics of long-horizon software refactoring."

Implementation: LongCat-2.5 Agent API Call

Developers can interact with LongCat-2.5 through Meituan's OpenAI-compatible API endpoint. The following Python snippet demonstrates passing code context and visual wireframes within a multi-turn agent session:

python
import os
import requests

api_key = os.environ.get("LONGCAT_API_KEY")
url = "https://api.longcat.ai/v1/chat/completions"

headers = {
    "Authorization": f"Bearer {api_key}",
    "Content-Type": "application/json"
}

payload = {
    "model": "longcat-2.5",
    "messages": [
        {
            "role": "system",
            "content": "You are an autonomous multimodal software engineering agent capable of shell operations and visual UI auditing."
        },
        {
            "role": "user",
            "content": [
                {
                    "type": "text",
                    "text": "Inspect the attached UI mockup and refactor the NavigationBar.tsx component to fix flexbox overflow errors."
                },
                {
                    "type": "image_url",
                    "image_url": {"url": "https://assets.local/mockups/nav-bug.png"}
                }
            ]
        }
    ],
    "max_tokens": 8192,
    "temperature": 0.2
}

response = requests.post(url, headers=headers, json=payload)
result = response.json()
print(result["choices"][0]["message"]["content"])

Strategic Implications & Developer Economics

Meituan's commercial pricing strategy for LongCat-2.5 alters developer economics for complex software workflows. At $0.30 per million input tokens and $1.20 per million output tokens, LongCat-2.5 prices compute competitively against frontier alternatives.

Crucially, the prompt caching price of $0.006 per million tokens—a 98% discount—allows persistent coding agents to maintain large codebases and multi-turn execution histories in memory across thousands of iterative debugging loops without racking up prohibitive API bills. As Meituan prepares public distributions for GitHub and Hugging Face, LongCat-2.5 establishes a compelling template for high-throughput, failure-resistant enterprise agents.

Frequently Asked Questions

How does LongCat-2.5 achieve 88.4 on Terminal-Bench v2.1?
The model leverages sparse 48B active compute, an expanded 1M-token context window, and a training regimen based on real agent failure logs that teaches the model how to diagnose and recover from command-line errors.
What is the cost of running Meituan LongCat-2.5 via API?
LongCat-2.5 is priced at $0.30 per million input tokens, $1.20 per million output tokens, and $0.006 per million cached input tokens, representing a 98% discount for cached repository context.
Does LongCat-2.5 require separate vision and language models?
No, LongCat-2.5 uses a unified token architecture that processes visual inputs like mockups and screenshots directly alongside code tokens in a single shared representation.
Will open weights be made available for LongCat-2.5?
Meituan has announced plans to release model weights and open agent implementation harnesses on GitHub and Hugging Face following the initial API and chat preview.

Related Articles