GLM-5.3 ハンズオンガイド:常時オンの思考、3つの推論強度、APIサポートマトリクス

2026年8月版のGLM-5.3呼び出しガイドです。reasoning_effortの3段階を備えた常時オンの思考、推論サマリー、並列ツール呼び出し、構造化出力、自動キャッシュを扱い、AIHubMixのChat、Responses、Messages APIで検証した例を掲載しています。

AIHubMix約 7 分で読めます
GLM-5.3 ハンズオンガイド:常時オンの思考、3つの推論強度、APIサポートマトリクス

タイトル: GLM-5.3 ハンズオンガイド:常時オンの思考、3つの推論強度 & APIサポートマトリクス

説明: 2026年8月版のGLM-5.3ガイド:reasoning_effortの3段階を備えた常時オンの思考、推論サマリー、並列ツール呼び出し、構造化出力、自動キャッシュ。検証済みのAIHubMix Chat / Responses / Messagesの例付き。


本記事では、GLM-5.3の主要なAPI変更点と利用上の注意点を扱います。GLM-5.3はZ.aiのフラッグシップモデルで、2026-08-14にリリースされました。GLM-5.2と全く同じベースモデルを使用しており、すべての性能向上はポストトレーニングによるものです。AIHubMixでのモデルIDはcoding-glm-5.3(現在は期間限定のプレビュールート)で、Chat Completions、Responses、Claude互換のMessages APIから利用できます。参考:Z.aiの公式リリースブログ。

各セクションの「検証済み」の結論とサンプル応答は、2026-08-14にAIHubMix API(Chat Completions / Responses / Messages)で実際に行った呼び出しに基づいています。

1. モデル仕様の概要

項目 値
コンテキストウィンドウ 1Mトークン(公式の正確な値:1,048,576)
最大出力 128K(max_tokens の検証済み上限:131,072 — これを超えると400が返されます)
入力モダリティ テキスト
思考 常時オンで、無効化できません。reasoning_effort は3段階あり — low / high / max、デフォルトは max
GLM-5.2との関係 同じベースモデルで、ポストトレーニングにより強化:コーディングと長期タスクの性能が大幅に向上し、サイバー能力も新たに備わりました
AIHubMixのモデルID coding-glm-5.3(期間限定のプレビュールート。公式の商用APIが公開され次第、フォローアップします)
検証済み:max_tokens: 999999 は400を返し、エラー本文に有効範囲が明記されます。上限は実際に検証されており、黙って切り詰められているわけではありません。
# max_tokens=999999 -> HTTP 400
"max_tokens parameter invalid: value must be within [1,131072]"

2. GLM-5.3とGLM-5.2の比較:常時オンの思考と reasoning_effort による強度の調整

項目 GLM-5.2 GLM-5.3
ベースモデル — 5.2と同一(すべての向上はポストトレーニングによる)
thinking.type enabled / disabled — オフにできる enabled のみ — オフにできない
reasoning_effort 7値の互換マッピング(実効レベルは max/high) 3段階 low / high / max、デフォルトは max
位置づけ 汎用フラッグシップ コーディングと長期的なエージェントタスクに強化され、サイバー能力も新たに備わりました

GLM-5.2からGLM-5.3へのAPI変更のうち、特に重要な点は次の2つです:

  1. thinking.type はもう disabled をサポートしません — 思考はオフにできません。公式の移行案内では、{"type": "disabled"} を送っていたアプリケーションは {"type": "enabled"} に切り替え、reasoning_effort を "low" に設定することが推奨されています。
  2. reasoning_effort は3段階に絞られました:low(軽め)/ high(強化)/ max(深い、デフォルト)。GLM-5.2時代の7値の互換マッピングはもう適用されません。Z.aiはコーディングタスクには max を推奨しています。
検証済み:AIHubMix経由で thinking: {"type": "disabled"} を送ると200が返り、思考は依然として行われます(reasoning_content は通常どおり返されます)。この値は拒否されず、公式チャネルの仕様に従って自動的に変換されます。クライアントが「トークンを節約するために思考をオフにする」ことに依存していた場合は、reasoning_effort: "low" に切り替えてください。

検証済み:reasoning_effort の列挙外の値もエラーなく200を返します(公式ドキュメントどおり、デフォルトの max にフォールバック)。同じ算数の問題で、low と max を比べると、思考が軽くなる傾向が見られました(推論トークンは27対39)。

Chat Completions

思考内容は reasoning_content フィールドで返され、ストリーミングでは delta.reasoning_content として届きます。

from openai import OpenAI

client = OpenAI(
    base_url="https://aihubmix.com/v1",
    api_key="<AIHUBMIX_API_KEY>",
)

completion = client.chat.completions.create(
    model="coding-glm-5.3",
    reasoning_effort="max",          # low / high / max, default max
    extra_body={"thinking": {"type": "enabled"}},
    messages=[
        {"role": "user", "content": "Compute the square root of (17*23-19*11), rounded down. Digits only."}
    ],
)

print(completion.choices[0].message.reasoning_content)
print(completion.choices[0].message.content)   # Observed: "13"
検証済み:usage.completion_tokens_details.reasoning_tokens に思考の使用量が報告されます。同じ質問で、reasoning_effort="low" の場合は27、"max" の場合は39でした。

Responses

思考内容は reasoning 出力アイテムとして返され、summary 配列内のテキストは summary_text になります。

from openai import OpenAI

client = OpenAI(
    base_url="https://aihubmix.com/v1",
    api_key="<AIHUBMIX_API_KEY>",
)

response = client.responses.create(
    model="coding-glm-5.3",
    input="What is the capital of France? City name only.",
)

# Observed response.output item types: ["reasoning", "message"]
# reasoning item: {"type": "reasoning", "summary": [{"type": "summary_text", "text": "The user is asking..."}]}
# usage.output_tokens_details.reasoning_tokens: 80
検証済み:reasoning パラメータを一切指定しないデフォルトのリクエストでも、summary_text を含む reasoning アイテムが既に含まれます。明示的なオプトインは不要です。

Messages

思考内容はネイティブの thinking コンテンツブロックとして返されます。

from anthropic import Anthropic

client = Anthropic(
    api_key="<AIHUBMIX_API_KEY>",
    base_url="https://aihubmix.com"
)

response = client.messages.create(
    model="coding-glm-5.3",
    max_tokens=4096,
    messages=[
        {"role": "user", "content": "What is the capital of France? City name only."}
    ],
)

# Observed response.content block types: ["thinking", "text"]
検証済み:thinkingブロックはデフォルトで返されます。このAPIでも thinking: {"type": "disabled"} は同様に200を返し、思考は引き続き行われます(「disabledはlowに変換され、リクエストは継続する」という公式チャネルの仕様と一致)。

3. ツール呼び出しと並列ツール

関数呼び出しは3つのAPIすべてで動作することを確認しました。Responses APIでは、1ターン内での並列ツール呼び出しも確認しています(Z.aiはGLM-5.3について supports_parallel_tool_calls: true を明示的に宣言しています)。上流の制限は次のとおりです:tools には最大128個の関数を指定でき、tool_choice はネイティブには auto のみサポートします。

Chat Completions

completion = client.chat.completions.create(
    model="coding-glm-5.3",
    messages=[{"role": "user", "content": "What's the weather in Beijing today?"}],
    tools=[{
        "type": "function",
        "function": {
            "name": "get_weather",
            "description": "Get weather for a city",
            "parameters": {"type": "object", "properties": {"city": {"type": "string"}}, "required": ["city"]},
        },
    }],
)

# Observed: finish_reason "tool_calls", with a get_weather call in tool_calls
検証済み:tool_choice: "none" は機能します。同じ天気の質問に対して、ツール呼び出しなしでプレーンテキストが返されます。

Responses

response = client.responses.create(
    model="coding-glm-5.3",
    input="Check today's weather in Shanghai and Beijing",
    parallel_tool_calls=True,
    tools=[{
        "type": "function",
        "name": "get_weather",
        "description": "Get weather for a city",
        "parameters": {"type": "object", "properties": {"city": {"type": "string"}}, "required": ["city"]},
    }],
)

# Observed: a single turn returns 2 parallel function_call output items (one for each city)
検証済み:1ターンで2つの並列ツール呼び出しが行われ、公式の supports_parallel_tool_calls: true 宣言と一致します。

Messages

response = client.messages.create(
    model="coding-glm-5.3",
    max_tokens=4096,
    tools=[{
        "name": "get_weather",
        "description": "Get weather for a city",
        "input_schema": {"type": "object", "properties": {"city": {"type": "string"}}, "required": ["city"]},
    }],
    messages=[{"role": "user", "content": "What's the weather in Beijing today?"}],
)

# Observed: stop_reason "tool_use"; content contains a tool_use block
❗ 検証済み:このAPIでは、tool_choice: {"type": "none"} を指定した後もモデルは依然としてツール呼び出しを生成します。ツールを無効にするには、tools パラメータを完全に削除するか、代わりにChat Completions APIで tool_choice: "none" を使用してください。

4. 構造化出力

response_format は text と json_object をサポートします。上流では json_schema モードは記載されていません。厳密なスキーマ準拠が必要な場合は、JSON Schemaをプロンプトに埋め込み、クライアント側で検証してください。

Chat Completions

completion = client.chat.completions.create(
    model="coding-glm-5.3",
    messages=[
        {"role": "user", "content": "What is the capital of France? Answer in JSON with the key \"answer\"."}
    ],
    response_format={"type": "json_object"},
)

# Observed response content: {"answer": "Paris"}
検証済み:出力は要求したキーを含む有効なJSONです。

Responses

response = client.responses.create(
    model="coding-glm-5.3",
    input="What is the capital of France? Answer in JSON with the key \"answer\".",
    text={"format": {"type": "json_object"}},
)

# Observed output text: {"answer": "Paris"}

Messages

# Specify the JSON structure in the prompt; observed output is valid JSON
response = client.messages.create(
    model="coding-glm-5.3",
    max_tokens=4096,
    messages=[
        {"role": "user", "content": "What is the capital of France? Answer in JSON with the key \"answer\"."}
    ],
)

# Observed response text: {"answer": "Paris"}

5. コンテキストキャッシュは自動

暗黙的なキャッシュはデフォルトでオンで、渡すパラメータはありません。繰り返される長いプレフィックスは、usageにキャッシュヒットとして報告されます(フィールド名はAPIによって異なります)。

Chat Completions

# usage of the second call with an identical long prefix
"prompt_tokens_details": {"cached_tokens": 960}
検証済み:連続した2回の呼び出しのうち2回目で、960個のキャッシュトークンがヒットしました。

Responses

# usage of the second call with an identical long prefix
"input_tokens_details": {"cached_tokens": 960}

Messages

# hits are reported via usage.cache_read_input_tokens
"cache_read_input_tokens": 0
検証済み:今回のテストでは、このAPIでキャッシュヒットを再現できませんでした(キャッシュはチャネルごとに温まり、ロードバランサーの切り替えでミスが起きることがあります)。ヒット数の会計フィールドはAnthropicの仕様に従います。

6. サンプリングとパラメータ検証

サンプリングはGLMファミリーのエンドポイントの慣習に従います:temperature の範囲は [0, 1]、デフォルトは1.0です(注意:OpenAIプロトコルの [0, 2] より狭い)。top_p の範囲は [0.01, 1]、デフォルトは0.95です。Z.aiは両方を同時に調整しないことを推奨しています。

検証済み:APIによってパラメータ検証は異なります。Messages APIは範囲外の temperature: 3 を、有効範囲 [0,1] を明記した400で拒否しますが、Chat Completions / Responses は同じ範囲外の値を200で黙って受け入れます。APIを移行する際は、サンプリング値の範囲外チェックをゲートウェイに頼らないでください。
# Messages API with temperature=3 -> HTTP 400
"temperature parameter invalid: value must be within [0,1]"

7. 機能 × APIサポートマトリクス

以下のすべてのセルは、2026-08-14にAIHubMixのライブAPIを通じた実際の呼び出しで検証しました。各セルには、APIごとのパラメータ/フィールド名を示しています。

機能 Chat Completions Responses Messages
基本生成 / ストリーミング ✅ ✅ ✅
思考内容 ✅ reasoning_content フィールド ✅ reasoning 出力アイテム(summary_text) ✅ thinking コンテンツブロック
思考の強度 ✅ reasoning_effort(low/high/max、デフォルトは max) ✅ 左と同じ ✅ 200で受理
思考の無効化 ❗ 不可:disabled は200を返し、思考は継続(lowに変換される動作) ➖ 切り替えパラメータなし ❗ Chatと同じ
関数呼び出し ✅ ✅ ✅
並列ツール呼び出し — ✅ 1ターンで function_call アイテム2件 —
ツール呼び出しの無効化 ✅ tool_choice: "none" が機能 ✅ 200(呼び出しは観測されず) ❗ {"type": "none"} の後もツール呼び出しが発生
構造化出力(JSONモード) ✅ response_format: json_object ✅ text.format: json_object ✅ プロンプトの慣習で対応
json_schema の厳密モード ❗ 上流に記載なし — スキーマをプロンプトに埋め込む ❗ 左と同じ ❗ 左と同じ
自動キャッシュの会計 ✅ usage.prompt_tokens_details.cached_tokens ✅ usage.input_tokens_details.cached_tokens ✅ フィールドあり(今回のテストではヒットを再現できず)
最大出力の検証 ✅ 範囲 [1,131072] で400 — —
範囲外のサンプリング値の検証 ❗ 黙って200 ❗ 黙って200 ✅ 範囲 [0,1] で400

FAQ

AIHubMixでのGLM-5.3のモデルIDは何ですか? [1m] サフィックスは必要ですか?
モデルIDは coding-glm-5.3 です。そのまま使用してください。glm-5.3[1m] はZ.ai独自のClaude Codeクライアント向けのモデル名の記法で、AIHubMixの呼び出しとは無関係です。3つのAPIすべてでサフィックスは不要です。

思考をオフにできますか?
いいえ。GLM-5.3の思考は常時オンで、thinking.type は enabled のみサポートします。テストでは、disabled を送っても200が返り、思考は引き続き行われました(公式の仕様どおり low レベルに変換)。思考トークンを節約するには、reasoning_effort: "low" を送ってください。

GLM-5.3はGLM-5.2とどう関係しますか?
同じベースモデルです。すべての向上はポストトレーニングによるものです(公式の表現:「GLM-5.2と同じベースモデルを使用しており、すべての向上はポストトレーニングによるものです」)。APIの大きな変更は2点です:思考はもうオフにできず、reasoning_effort は low/high/max(デフォルトは max)の3段階に絞られました。

厳密な json_schema の構造化出力が必要な場合はどうすればよいですか?
上流では response_format: json_schema モードは記載されていません。テストでは、json_object のJSONモードは3つのAPIすべてで有効なJSONを出力しました。厳密なスキーマが必要な場合は、JSON Schemaをプロンプトに埋め込み、クライアント側で検証してください。

Is coding-glm-5.3 the production release?
It is currently a limited-time preview route (Z.ai's model API docs mark the official API as "coming soon"); AIHubMix will follow up as soon as the commercial API ships. See the model page for current pricing and status.


価格とリアルタイムの状況についてはGLM-5.3モデルページを、その他のモデルについてはモデルギャラリーをご覧ください。

ひとつのゲートウェイで複数のAIプロバイダーへ。 本番運用のために設計。

AIHubMix公式サイトへ