GLM-5

Zhipu AIMCP Tool CallReasoning
zhipuai/glm-5Open Weights

General GLM flagship for coding, analysis, and tool-heavy engineering workflows

Benchmark Pricing$0.60 / 1M in$2.69 / 1M out$0.15 cache read
Context: 204,800 tokens•Max Output: 131,072 tokens•Released: 2026-02-12

TECHNICAL SPECIFICATIONS

Context Window204,800204.8K tokens
Max Output131,072131.1K tokens
LicenseOpen SourceSelf-hostable
Input Modalities
Text
Function / Tool CallingSupported (MCP Ready)
Structured OutputsGuaranteed Schema

MODEL CONTEXT PROTOCOL (MCP) READINESS

✓ GLM-5 natively supports OpenAI / Anthropic format tool calling and is fully compatible with MCP servers and agent loops.

MCP Context Window Recommendations

With a context capacity of 204,800 tokens, this model can handle moderately large MCP tool definitions and multi-turn conversation logs comfortably.

STANDARDIZED BENCHMARKS & EVALS

SWE-Bench Verifiedresolved
72.8
SWE-Atlas Codebase QnAscore
20.5
SWE-Atlas Refactoringscore
24.24
SWE-Atlas Test Writingscore
28.74

API CALL INVOCATION EXAMPLE

// Example: Calling GLM-5 via OpenAI SDK
import OpenAI from "openai";

const client = new OpenAI({
  apiKey: process.env.ZHIPUAI_API_KEY,
});

const response = await client.chat.completions.create({
  model: "zhipuai/glm-5",
  messages: [{ role: "user", content: "Hello! Can you inspect MCP tools?" }],
});

console.log(response.choices[0].message.content);

PRICING BY PROVIDER

15 providers
Zhipu AIglm-5
$0.60 / $2.69$0.15 cache
Cortecsglm-5.3
$0.51 / $2.04$0.15 cache
DInferenceglm-5.1
$1.25 / $3.89
Z.AI Coding Planglm-5.3-highspeed
$0.00 / $0.00$0.00 cache
ClinePasscline-pass/glm-5.3
$1.40 / $4.40$0.26 cache
Fireworks AIaccounts/fireworks/models/glm-5p3-flash
$0.15 / $0.50$0.03 cache
Volcengine Ark Coding Planglm-5.3
$0.00 / $0.00$0.00 cache
NanoGPTz-ai/glm-5.1:thinking
$0.70 / $2.50$0.18 cache
Scalewayglm-5.3
$2.01 / $6.15
Vultrglm-5.3
$0.75 / $3.00
GreenPTglm-5.2-honey-ultra
$1.74 / $5.16$0.45 cache
OpenCode Goglm-5.3
$1.40 / $4.40$0.26 cache
Mistralglm-5-2
$1.40 / $4.40$0.14 cache
TokenGoz-ai/glm-5.3
$1.40 / $4.40$0.26 cache
Charm Hyperglm-5.3
$1.52 / $4.79$0.28 cache

Rates in USD per 1M tokens. Rates synchronized from models.dev public catalog.

Prompt Caching Active

This model supports prompt caching at $0.15 / 1M tokens, saving up to 75% on repetitive MCP tool definitions and system instructions.