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
English
简体中文English
Prompts and workflows

GLM-5.2 · configuration

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

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..

Source not verifiedZ.AI API migration from GLM-5.1/5/4.x

Prerequisites and inputs

  • old request
  • new model ID
  • streaming flags
  • regression task

Complete templates

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

Tabbit editorial adaptation; not the original source prompt
Migrate {{BASELINE_REQUEST}} to {{NEW_MODEL_ID}}; compare {{SAMPLING_FIELDS}}, {{STREAM_FLAGS}}, and {{TOOL_STREAM}} on {{REGRESSION_TASK}}, saving {{REQUEST_DIFF}}.

Replace before running: {{BASELINE_REQUEST}}, {{NEW_MODEL_ID}}, {{SAMPLING_FIELDS}}, {{STREAM_FLAGS}}, {{TOOL_STREAM}}, {{REGRESSION_TASK}}, {{REQUEST_DIFF}}

Save a baseline request from GLM-5.1/5/4.x and change model ID, temperature/top_p, thinking, stream, and tool_stream one at a time. Compare text, tool calls, and errors on the same regression task before removing old fields; roll back one change when it fails.

Read the source research notes

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.

Source and dates

Z.ai official developer documentation (docs.z.ai, Get Started / Migrate) · Source date: 2026-06 · Edited: 2026-09-20

Read the original source
Variable checklist

Still to replace: 7

{{BASELINE_REQUEST}}{{NEW_MODEL_ID}}{{SAMPLING_FIELDS}}{{STREAM_FLAGS}}{{TOOL_STREAM}}{{REGRESSION_TASK}}{{REQUEST_DIFF}}

Related prompts

GLM-5.2 Official Documentation: Overview and API Quick Start (docs.z.ai)GLM-5.2 Thinking Mode Configuration: Default Thinking / Interleaved Thinking / Preserved Thinking / Turn-level Thinking (Official)Using GLM-5.2 (zai-glm-5-2) Through Mistral: Third-Party Hosting Configuration and PricingGLM-5.2 Role-Playing (RP) System Prompt: Evening-Truth Complete Dark-Version Prompt

Related reviews

NIST CAISI's Independent Capability Assessment of Z.ai GLM-5.2Semgrep IDOR Benchmark: GLM-5.2 Results with a Prompt-Only Setup in Security Code AuditingGLM-5.2 Official Release Notes and Complete Benchmark Table (Z.ai Blog)Reddit Blind Code Review: GLM-5.2's Production-Readiness Score and Multi-Judge Recheck

Read the full analysis

Overview · English

GLM-5.2: What It Is, What It Costs, and Where It Fits

A sourced GLM-5.2 overview covering the June 2026 release, 1M context, open-weight deployment, API pricing boundaries, coding evidence and a safer pilot path.

GLM-5.2

Use GLM-5.2 in Tabbit

Run this guide in the environment listed above. Downloading does not transfer the template or establish model availability for your account.