DocsQuick StartAI News
AI NewsGLM-5.1: The open-source model that can run continuously for 8 hours has arrived
New Model

GLM-5.1: The open-source model that can run continuously for 8 hours has arrived

2026-04-08
GLM-5.1: The open-source model that can run continuously for 8 hours has arrived

Zhipu released its open-source flagship model **GLM-5.1** today, featuring **8-hour long-range task capability**. Its **SWE-bench Pro** performance surpasses **Claude Opus 4.6** and **GPT-5.4**, while its price has increased by **10%**. For coding scenarios, the pricing is now aligned for the first time with leading overseas providers.

Zhipu officially released GLM-5.1 today. In one sentence: this is an open‑source model that can continuously work for 8 hours and beat Claude Opus 4.6 on SWE‑bench Pro.

On the same day, Zhipu’s stock rose nearly 19% intraday, and API prices for the GLM series increased by another 10%. It marks a subtle turning point for domestic LLMs in China—no longer competing on low price, but on value.

Let’s start with the hard numbers

Let’s look directly at the results. This time, Zhipu presented three of the most representative code evaluation benchmarks in the industry:

  • SWE‑Bench Pro: Locates and fixes complex engineering bugs in real GitHub repositories—a benchmark widely regarded as the closest to real software development. GLM‑5.1 set a new world record, surpassing GPT‑5.4 and Claude Opus 4.6.
  • Terminal‑Bench 2.0: Tests a model’s ability to operate the command line to solve problems.
  • NL2Repo: Builds a complete code repository from scratch.

Overall, GLM‑5.1 ranks third globally, first among domestic models, and first among open‑source models.

Comparison chart of GLM‑5.1’s results on SWE‑Bench Pro, Terminal‑Bench 2.0, NL2Repo against GPT‑5.4, Claude Opus 4.6, etc.

A few more words on SWE‑Bench Pro: the reason this benchmark has gained recognition is that it’s not a “fill in the next line of code” toy test. It requires the model to understand a real, historically burdened GitHub project, locate bugs among tens of thousands of lines, and write a patch that passes CI. Scoring high here basically means: this model can serve as a reliable junior engineer.

GLM‑5.1’s surpassing of Opus 4.6 on this test is a first for a Chinese model. Considering that Opus 4.6 has long been the king of coding capability, the achievement is significant.

8‑Hour Long‑Horizon Tasks: From “Can It Do It” to “How Long Can It Keep Doing It”

More noteworthy than the score is GLM‑5.1’s new narrative: Long‑Horizon Task.

For the past two years, LLM competition has been about “who’s smarter” — the higher the benchmark score, the better. Zhipu is now trying to shift the evaluation dimension from intelligence to endurance: models must not only be smart, but able to sustain work.

It’s a very practical idea. Current top models can handle writing a function or fixing a bug well. But if you give them a real engineering task — like “migrate this Python 2 project to Python 3 and raise test coverage from 40% to 80%” — most will start to “zone out” in 30 minutes: losing context, drifting from goals, and repeating mistakes.

Zhipu describes this evolution path clearly:

3 minutes of Vibe Coding → 30 minutes of Agentic Engineering → 8 hours of Long‑Horizon Task

From vibe‑based coding to agentic engineering to long‑horizon tasks, each step broadens not just in duration but in autonomy—planning, executing, and self‑correcting ability.

What does “8 hours” mean? It means you can assign a project before bed, and wake up to a full, production‑quality result. Zhipu puts it this way: “Your 8 hours of sleep are the model’s 8 hours of work.”

That sounds like marketing, but the technical challenge is real. To keep a model stably producing for 8 hours, several key problems must be solved:

  1. Memory management for ultra‑long context: Continuous work produces massive intermediate states; the model must know what to keep and what to discard.
  2. Goal tracking and self‑correction: The longer the duration, the easier it strays; the model must periodically reassess whether it’s still on target.
  3. Multi‑step planning and execution: Instead of one‑off answers, it divides a large task into sub‑tasks, executes them sequentially, and feeds each result forward.
  4. Failure recovery: Errors are inevitable in 8 hours; instead of halting, the model must diagnose, adjust, and continue.

While many models can handle minute‑level agentic tasks, GLM‑5.1 is the first open‑source model claiming stable 8‑hour operation. Of course, real‑world performance of this “8 hours” still needs verification by developers.

A 10% Price Increase: Pricing Logic Has Changed for Chinese LLMs

With GLM‑5.1’s release, Zhipu raised prices 10%. 

That’s unusual in China’s LLM market. Over the last 18 months, domestic players have been slashing prices — 50% cuts, even free tiers. By the end, API rates were so low one had to wonder if they were loss‑leaders.

Zhipu took the opposite path, and not for the first time. From GLM‑5 to GLM‑5.1, this is another round of price hikes.

Interestingly, after the increase, GLM‑5.1’s coding‑scenario cache‑hit token price is close to Anthropic’s Claude Sonnet 4.6. This marks the first time a Chinese LLM has achieved price parity with a global leader in a core use case.

According to 36Kr, the market reacted positively — Zhipu’s stock jumped 19% intraday. Investors’ logic is simple: if you can raise prices, it means you have pricing power; pricing power implies real usage and real value.

For developers, what does this mean?

If you chose the GLM series only for lower cost, you’ll need to re‑evaluate. But if you chose it for its capability and open‑source control, then a 10% premium for SWE‑bench Pro world‑best performance and 8‑hour task endurance seems well worth it.

The Meaning of Open Source: More Than Downloadable Weights

GLM‑5.1 is open‑source — and that alone deserves attention.

All models that beat Opus 4.6 on SWE‑bench Pro had been closed‑source until now. GLM‑5.1 is the first open‑source model to achieve this.

Open source brings real value for developers:

  • Private deployment: Security‑sensitive organizations can run the model on‑premises; no data leaves the network.
  • Fine‑tuning and customization: You can train on domain‑specific data to let it better understand your business.
  • Cost control: At scale, self‑hosting inference is cheaper than API calls.
  • Freedom from vendor lock‑in: No risk of API shutdowns or price surges.

Of course, self‑hosting is not cheap, and for most developers API access is still most efficient. The good news: GLM‑5.1 is already available via multiple APIs and supported on OpenAI Hub, fully compatible with OpenAI’s format — switching cost is almost zero.

Practical Use: How to Call GLM‑5.1

For developers already using OpenAI‑format APIs, integrating GLM‑5.1 is very easy. Example via OpenAI Hub:

from openai import OpenAI

client = OpenAI(
    api_key="your-openai-hub-key",
    base_url="https://api.openai-hub.com/v1"
)

response = client.chat.completions.create(
    model="glm-5.1",
    messages=[
        {
            "role": "system",
            "content": "You are a senior software engineer skilled at locating and fixing complex bugs in large codebases."
        },
        {
            "role": "user",
            "content": "Here is the error log and related Python code; please identify the root cause and propose a fix.\n\nError log:\nTraceback (most recent call last):\n  File 'app/services/auth.py', line 47, in validate_token\n    payload = jwt.decode(token, SECRET_KEY, algorithms=['HS256'])\njwt.exceptions.ExpiredSignatureError: Signature has expired\n\nSee attached code."
        }
    ],
    temperature=0.2,
    max_tokens=4096
)

print(response.choices[0].message.content)

To experience GLM‑5.1’s long‑horizon capabilities, use it with an agent framework triggering continuous loops:

from openai import OpenAI
import json

client = OpenAI(
    api_key="your-openai-hub-key",
    base_url="https://api.openai-hub.com/v1"
)

def run_long_horizon_task(task_description: str, max_iterations: int = 100):
    """Simplified long‑horizon task execution loop"""
    messages = [
        {
            "role": "system",
            "content": (
                "You are an AI engineer capable of completing complex engineering tasks autonomously. "
                "First draft a plan, then execute step by step. After each step, evaluate progress and decide what to do next. "
                "If errors occur, diagnose and fix them yourself."
            )
        },
        {"role": "user", "content": task_description}
    ]

    for i in range(max_iterations):
        response = client.chat.completions.create(
            model="glm-5.1",
            messages=messages,
            temperature=0.3,
            max_tokens=8192
        )

        assistant_msg = response.choices[0].message.content
        messages.append({"role": "assistant", "content": assistant_msg})

        # Check if the model considers the task complete
        if "[TASK_COMPLETE]" in assistant_msg:
            print(f"Task completed after {i+1} iterations")
            break

        # Execute the model’s suggested action and feed back the result
        result = execute_action(assistant_msg)  # your execution logic
        messages.append({"role": "user", "content": f"Execution result:\n{result}"})

    return messages

This is simplified. A real long‑horizon framework would include tool calls, file operations, and Git integration — but the core idea is the same: let the model plan and act iteratively until completion.

How Does GLM‑5.1 Compare to Its Peers?

Here’s the current top‑tier coding‑model landscape:

| Model | SWE‑Bench Pro | Long‑Horizon | Open Source | Notes | |------|:---:|:---:|:---:|------| | GLM‑5.1 | 🥇 World best | 8 hours | ✅ | China #1, Open‑source #1 | | Claude Opus 4.6 | 🥈 | Not disclosed | ❌ | Long‑standing coding leader | | GPT‑5.4 | 🥉 | Not disclosed | ❌ | OpenAI flagship | | Gemini 3 Pro | Second tier | Not disclosed | ❌ | Google flagship |

Note: SWE‑Bench Pro results depend on agent frameworks and prompt engineering; results may vary under different conditions. Zhipu reported official evaluation numbers; community replications may fluctuate.

Based on user testing on Zhihu, feedback shows a clear qualitative leap in coding ability — in some cases a viable alternative to Claude Opus 4.6. For large multi‑file refactors, stability still has room for improvement.

Another noteworthy detail: GLM‑5.1 was trained on Huawei chips. Given current global circumstances, this means the entire tech stack — from training hardware to model weights — is fully self‑reliant. For government or regulated enterprises, this is a major plus.

Industry Impact: The Ceiling for Open Source Just Got Higher

Looking back over the past year, open‑source models have advanced faster than almost anyone expected.

From Llama 3 to DeepSeek‑V3 to GLM‑5.1 today, the gap between open and closed is narrowing rapidly. GLM‑5.1 surpassing Opus 4.6 on SWE‑bench Pro signals that in the most hardcore dimension — programming — open source has caught up and even overtaken closed source.

The impact is profound:

For developers: More choice. Before, top‑tier coding meant Claude or GPT APIs; now there’s an open‑source option — via API or on‑premise.

For enterprises: Procurement becomes more complex; no more simple “closed = strong, open = weak.” Now they must weigh security, cost, and fit.

For Anthropic and OpenAI: Moats are shrinking. When open models match core capabilities, closed‑source players will compete on ecosystem, tool integration, and enterprise support—beyond just raw model power.

A Sober View of Key Questions

Still, no need for overexcitement. A few cautions:

  1. Benchmarks ≠ Real Experience. Top scores on SWE‑bench Pro don’t mean superiority in every coding scenario. Real performance depends on latency, context handling, language support, framework familiarity, etc.
  2. 8‑Hour Tasks Need Testing. Official claims aside, under what tasks does it succeed? At what success rate? Any degradation over time? Community tests must answer these.
  3. Price Hikes Cut Both Ways. Parity with foreign leaders shows confidence, but the “value for money” advantage is gone. GLM‑5.1 must truly earn its keep, or users will walk.
  4. Coding Plan Sell‑outs show capacity constraints. Some users on Zhihu reported immediate sold‑out plans after launch, hurting early access experience.

Final Thoughts

The release of GLM‑5.1 makes the 2026 LLM race much more interesting.

A domestic open‑source model trained on Huawei chips that beats Claude and GPT on the toughest coding benchmark and can run for 8 hours straight — unthinkable two years ago.

But the race is far from over. Anthropic’s Claude 5 series and OpenAI’s next generation are coming. In the open camp, DeepSeek and Llama won’t stand still.

For developers, the best strategy remains: stay informed, try fast, validate with real projects — not just benchmarks. GLM‑5.1 is well worth an afternoon of serious testing.


References

Related Articles

View All

Contact Us

We usually reply quickly during business hours

Scan WeChat

Support: Hub Assistant

WeChat ID: