Tabbit
ResourcesBlogModels
Tabbit LogoTabbit

Tabbit — The AI Browser that Works for You

Topics

  • AI Browser Resources
  • Agentic Browser Resources
  • Browser Downloads and Install Guides
  • Browser Comparisons
  • AI Browser Alternatives
  • Browser Productivity Resources

Popular Guides

  • AI Browser
  • Agentic Browser Download
  • Best AI Browser 2026: Top 9 Tested & Ranked
  • AI Browser Download
  • Free AI Browser
  • Best AI Browser 2026
  • AI Browser Comparison 2026
  • AI Browser for Windows
  • AI Browser for Mac
  • Chrome Alternative 2026

Events

  • Tabbit Skill Competition
  • KPOP SBTI Fandom Personality Test
  • Tabbit Campus Creator Program
  • fifi's Picks: AI Skills for Research Papers
  • User Survey

About

  • Tabbit Blog
  • Press & Media
Prompt guide
MediaGLM-5.2

Official Configuration Guide for Migrating from GLM-5.1 / GLM-5 / GLM-4.x to GLM-5.2

Original source

Z.ai official developer documentation (docs.z.ai, Get Started / Migrate)

AuthorZ.ai (Zhipu International)

Source date2026-06

Tabbit curation2026-08-19

Read original

One-sentence takeaway

The official GLM-5.2 migration checklist and parameter configuration: change the model ID to glm-5.2; use the default temperature of 1.0 or default top_p of 0.95 (tune only one of the two); enable thinking by default; use high or max for reasoning_effort; configure streaming and streaming tool calls (stream=true + tool_stream=true) as specified by the official guidance; and use the included Python migration example directly.

Use cases

  • Suitable tasks: Migrating existing applications from GLM-5.1, GLM-5, GLM-4.7/4.6/4.5, and other older models to GLM-5.2; Agent or coding products that need streaming output, streaming tool calls, or access to thinking content; and backend integrations that need explicit sampling parameters and thinking levels.

  • Unsuitable tasks: Legacy logic that relies on "turning off thinking to save tokens" (thinking is enabled by default in GLM-5.2, so use reasoning_effort to control cost instead); assumptions from the GLM-4.7 era that thinking is "forced" (GLM-5.2 automatically determines whether thinking is needed).

  • Applicable model version: GLM-5.2 (the parameters in this note also apply to the GLM-5.1/GLM-5 series, with the same default thinking behavior).

  • Applicable client, Agent, or API: Z.ai Chat Completions API (OpenAI-compatible); streaming clients that use delta.reasoning_content / delta.content / delta.tool_calls.

  • Recommended reasoning levels and parameters: thinking: {"type": "enabled"} (recommended for complex reasoning/coding); reasoning_effort: high (enhanced reasoning) or max (deep reasoning, default); tune only one of temperature and top_p; set max_tokens according to the task (maximum 128K).

Ready-to-use content

Official migration checklist (excerpt)

  • Change the model identifier to glm-5.2

  • Sampling parameters: temperature defaults to 1.0 and top_p defaults to 0.95; tuning only one is recommended

  • Deep thinking: use thinking={"type": "enabled"} as needed for complex reasoning/coding

  • Reasoning level: choose between high (enhanced reasoning) and max (deep reasoning, default) for reasoning_effort

  • Streaming response: stream=true; correctly process delta.reasoning_content and delta.content

  • Streaming tool calls: stream=true + tool_stream=true; concatenate delta.tool_calls[*].function.arguments across chunks

  • Maximum output and context: set max_tokens as needed (GLM-5.2 supports up to 128K output and 1M context)

  • Prompt optimization: use clearer instructions and constraints together with deep thinking

  • Development environment validation: regression tests should focus on randomness, latency, and the completeness of streaming tool parameters

Update sampling parameters (official example)

# Plan A: Use temperature (recommended)
resp = client.chat.completions.create(
    model="glm-5.2",
    messages=[{"role": "user", "content": "Write a more creative brand introduction"}],
    temperature=1.0
)

# Plan B: Use top_p
resp = client.chat.completions.create(
    model="glm-5.2",
    messages=[{"role": "user", "content": "Generate more stable technical documentation"}],
    top_p=0.8
)

Deep thinking and reasoning levels (official example)

resp = client.chat.completions.create(
    model="glm-5.2",
    messages=[{"role": "user", "content": "Design a three-tier microservice architecture for me"}],
    thinking={"type": "enabled"},
    reasoning_effort="max"
)

Streaming output + streaming tool calls (official example, ready to copy)

response = client.chat.completions.create(
    model="glm-5.2",
    messages=[{"role": "user", "content": "How's the weather in Beijing"}],
    tools=[
        {
            "type": "function",
            "function": {
                "name": "get_weather",
                "description": "Get current weather conditions for a specified location",
                "parameters": {
                    "type": "object",
                    "properties": {
                        "location": {"type": "string", "description": "City, eg: Beijing, Shanghai"},
                        "unit": {"type": "string", "enum": ["celsius", "fahrenheit"]}
                    },
                    "required": ["location"]
                }
            }
        }
    ],
    stream=True,
    tool_stream=True,
)

# Initialize streaming collection variables
reasoning_content = ""
content = ""
final_tool_calls = {}
reasoning_started = False
content_started = False

# Process streaming response
for chunk in response:
    if not chunk.choices:
        continue

    delta = chunk.choices[0].delta

    # Streaming reasoning process output
    if hasattr(delta, 'reasoning_content') and delta.reasoning_content:
        if not reasoning_started and delta.reasoning_content.strip():
            print("\n🧠 Thinking Process:")
            reasoning_started = True
        reasoning_content += delta.reasoning_content
        print(delta.reasoning_content, end="", flush=True)

    # Streaming answer content output
    if hasattr(delta, 'content') and delta.content:
        if not content_started and delta.content.strip():
            print("\n\n💬 Answer Content:")
            content_started = True
        content += delta.content
        print(delta.content, end="", flush=True)

    # Streaming tool call information (parameter concatenation)
    if delta.tool_calls:
        for tool_call in delta.tool_calls:
            idx = tool_call.index
            if idx not in final_tool_calls:
                final_tool_calls[idx] = tool_call
                final_tool_calls[idx].function.arguments = tool_call.function.arguments
            else:
                final_tool_calls[idx].function.arguments += tool_call.function.arguments

# Output final tool call information
if final_tool_calls:
    print("\n📋 Function Calls Triggered:")
    for idx, tool_call in final_tool_calls.items():
        print(f"  {idx}: Function Name: {tool_call.function.name}, Parameters: {tool_call.function.arguments}")

GLM-5.2 new features (from a migration perspective)

  • Maximum context: 1M; maximum output: 128K.

  • Added streaming output for the tool-calling process (tool_stream=true), allowing tool-call parameters to be received in real time.

  • Deep thinking thinking={"type":"enabled"}: once enabled, the model automatically determines whether to think (unlike GLM-4.7's forced thinking).

  • Added the reasoning_effort parameter to control the thinking level.

  • Stronger coding and reasoning capabilities.

Notes and limitations

  • The official source describes "deep thinking enabled by default": thinking is activated by default in the GLM-5.2/5.1/5/4.7 series (see the thinking-mode documentation), unlike the default hybrid-thinking behavior of GLM-4.6.

  • Post-migration regression priorities: whether output randomness is excessive or overly conservative, whether streaming tool-call concatenation works correctly, and latency and cost under long contexts and deep thinking.

Curated by Tabbit

Prompt material is summarized from public sources and Tabbit editorial notes. Check the original licensing and intended use before copying it.

GLM-5.2

Use in Tabbit

GLM-5.2

Related prompts

MediaZ.ai official developer documentation (docs.z.ai)2026-06-16

GLM-5.2 Official Documentation: Overview and API Quick Start (docs.z.ai)

MediaZ.ai Official Developer Documentation (docs.z.ai, Capabilities / Thinking Mode)

GLM-5.2 Thinking Mode Configuration: Default Thinking / Interleaved Thinking / Preserved Thinking / Turn-level Thinking (Official)

CommunityX.com (Twitter), @arena (official Arena.ai account)2026-06-27

Arena.ai Frontend Coding Head-to-Head: 10 Single-shot Generation Examples Comparing GLM-5.2 (Max) and Claude Opus 4.8 (Thinking)

Mediarentry.org (the author's self-hosted prompt library, recommended by the SillyTavernAI community)2026-08-07

GLM-5.2 Role-Playing (RP) System Prompt: Evening-Truth Complete Dark-Version Prompt

GLM-5.2

Related reviews

OfficialZ.ai official blog2026-06-16

GLM-5.2 Official Release Notes and Complete Benchmark Table (Z.ai Blog)

MediaNIST (National Institute of Standards and Technology) official news site2026-07-17

NIST CAISI's Independent Capability Assessment of Z.ai GLM-5.2

Mediarentry.org (a page describing the author's personal prompt library)2026-03-09

Evening-Truth's Complaints About Z.AI Coding Plan Response Quality and Quantization Suspicions

MediaHugging Face official blog (Security incident disclosure)2026-07

Hugging Face Security Incident Forensics: GLM-5.2 Used for Self-Hosted Attack Log Analysis (Real-World Project Report)