GLM-5.2

Models

Model details

Model
glm-5.2
Provider
qwen-token-plan-individual
API
openai-completions
Base URL
https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1
Input
text
Reasoning
Yes
Context window
1,000,000
Max tokens
131,072
Show configuration
{
  "providers": {
    "qwen-token-plan-individual": {
      "apiKey": "YOUR_API_KEY",
      "models": [
        {
          "id": "glm-5.2",
          "name": "GLM-5.2",
          "reasoning": true,
          "input": [
            "text"
          ],
          "thinkingLevelMap": {
            "off": null,
            "minimal": null,
            "low": null,
            "medium": null,
            "high": "high",
            "xhigh": null,
            "max": "max"
          },
          "contextWindow": 1000000,
          "maxTokens": 131072,
          "cost": {
            "input": 0,
            "output": 0,
            "cacheRead": 0,
            "cacheWrite": 0
          },
          "compat": {
            "supportsStrictMode": true,
            "thinkingFormat": "qwen",
            "supportsDeveloperRole": false,
            "supportsStore": false,
            "supportsReasoningEffort": true
          }
        }
      ],
      "api": "openai-completions",
      "baseUrl": "https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1"
    }
  }
}

Pricing

USD per million tokens. A tier is selected from the total input tokens in each request and applies to that entire request.

Pricing rates for GLM-5.2
Request inputInputOutputCache readCache write
All requests$0$0$0$0

Session cost calculator

Estimate the requests made during an agent session. A user turn can make several model calls while using tools, so costs are calculated per model request.

Session shape
Rounded median shapes from recent Pi agent sessions.
Warm-request cache reuse
Effective token reuse combines partial hits and occasional complete misses.
Estimated session$0.00
Uncached input
—
Cache reads
—
Uncached prefixes
—
Cache writes
—
Output
—
Without caching
—

The first request starts cold unless marked otherwise. Output is billed separately from context growth because reasoning tokens are not always retained. This remains a directional estimate: providers differ in eligibility, rounding, and retention.

Compatibility flags

Effective values after applying Pi's API defaults and model overrides.

Effective compatibility flags for GLM-5.2
FeatureValue
supportsStoreNo
supportsDeveloperRoleNo
supportsReasoningEffortYes
supportsUsageInStreamingYes
maxTokensFieldmax_completion_tokens
requiresToolResultNameNo
requiresAssistantAfterToolResultNo
requiresThinkingAsTextNo
requiresReasoningContentOnAssistantMessagesNo
thinkingFormatqwen
openRouterRoutingEmpty
vercelGatewayRoutingEmpty
chatTemplateKwargsEmpty
zaiToolStreamNo
supportsStrictModeYes
cacheControlFormatNone
sendSessionAffinityHeadersNo
supportsLongCacheRetentionYes