There is a satisfying way to meet a new coding model: give it a bug whose consequences you already understand.

You can recognize the wrong answer immediately. You know which behavior matters to users. And when the model proposes a fix, you can judge whether it respected the application instead of admiring the explanation.

With GLM-5.5 attracting attention ahead of a possible Thursday announcement, now is a useful time to prepare that kind of first encounter. November 19, 2026 is an anticipated date; the official release index reviewed on November 18 does not confirm a GLM-5.5 launch or public API specifications. The existing Treerouter GLM-5.5 access notice describes the platform's stated plans, which should be distinguished from current availability.

You do not need an unreleased model to start. The challenge below works as a first GLM-5.3 API experiment, and it gives a future model something concrete to attempt when a documented route becomes available.

The exercise is deliberately small. It is an original teaching fixture, not a benchmark result or a claim that one model outperforms another. Its purpose is to reveal how a coding assistant handles requirements that are easy to overlook.

The bug hides in an ordinary helper

Imagine a small application that displays labels for enabled workspace features. A configuration service supplies a list of dictionaries, and the interface expects a clean list of label strings.

Someone wrote this function in labels.py:

def active_labels(items):
    return [item["label"].strip() for item in items if item.get("enabled")]

It looks reasonable on a happy-path example. Pass in a record with a true flag and a padded string, and the function returns a trimmed label. A model asked merely to “improve this code” might produce a shorter version, add type hints, or explain that the original already works.

The problem lives in the application contract. Only the literal Boolean value True activates a record. Missing labels, non-string labels, and blank labels must be skipped. After trimming whitespace, duplicate labels should appear once, preserving their first occurrence. Capitalization remains significant, and the input must remain unchanged. Every item is a dictionary; other input shapes are outside this exercise.

Those requirements create several independent ways to get the patch wrong. A string such as "false" is truthy in Python. The integer 1 compares equal to True, yet the contract excludes it. Converting every label to a string turns invalid data into visible interface text. Sorting a set removes duplicates but changes the order.

None of these mistakes requires a dramatic model failure. They arise when a plausible shortcut quietly changes the user's rules.

Round one: ask for a diagnosis you can check

Before requesting a replacement function, ask the model for a concise description of the violated requirements and a few counterexamples. You are requesting a reviewable explanation, not private reasoning or an elaborate internal transcript.

Save the following as challenge.txt, followed by the original function above:

Review this Python helper against the contract below.
Every input item is a dictionary.
Only enabled is True activates an item; exclude 1 and truthy strings.
Skip missing, non-string, or blank labels.
Trim surrounding whitespace.
Deduplicate exact trimmed strings, preserving first-seen order.
Keep capitalization significant. Do not mutate the input.
Use the Python standard library only.

First give a brief diagnosis with concrete failing inputs.
Then provide the smallest readable replacement function.
Do not broaden or silently change the contract.
Do not claim to have run tests unless you actually executed them.

Notice how much useful information this supplies without making the task large. It defines the data shape, the success condition, and the limits of the requested edit. It also gives you a clear basis for rejecting a confident but incompatible answer.

For the first attempt, keep the conversation fresh. An assistant that has already seen your preferred solution is answering a different question. Save the initial response before giving corrective feedback; otherwise, a successful final patch can hide how much guidance the original answer needed.

Put a current GLM model on the workbench

The current GLM-5.3 documentation describes a text-input model oriented toward software engineering. That makes it a relevant candidate for this code-and-requirements exercise. You do not need to upload an entire repository to investigate a small helper.

If your real bug depends on a rendered interface, a screenshot may contain evidence missing from the source snippet. The GLM-5.3-Flash documentation lists native image input. Keep that as a separate visual exercise, using an appropriately supported route. The comparison of GLM-5.3 and GLM-5.3-Flash provides additional model-selection context.

For API access, use the model identifier, endpoint, and key belonging to your chosen account. Treerouter's Python and Node.js integration guide is a starting point for setup; verify the current console details before copying older examples.

The following Python script illustrates a non-streaming Chat Completions request. Set GLM_CHAT_URL to the complete, verified HTTPS endpoint ending in the appropriate Chat Completions path, GLM_API_KEY to your own key, and GLM_MODEL_ID to an available GLM-5.3 route. It intentionally contains no guessed GLM-5.5 identifier.

# ask_glm.py — run after setting the three environment variables.
import json
import os
from pathlib import Path
from urllib.request import Request, urlopen
from urllib.parse import urlsplit

endpoint = os.environ["GLM_CHAT_URL"]
if urlsplit(endpoint).scheme != "https":
    raise ValueError("Use the HTTPS endpoint documented for your account")

payload = {
    "model": os.environ["GLM_MODEL_ID"],
    "messages": [{
        "role": "user",
        "content": Path("challenge.txt").read_text(encoding="utf-8"),
    }],
    "thinking": {"type": "enabled"},
    "reasoning_effort": "high",
    "stream": False,
}
request = Request(
    endpoint,
    data=json.dumps(payload).encode("utf-8"),
    headers={
        "Authorization": "Bearer " + os.environ["GLM_API_KEY"],
        "Content-Type": "application/json",
    },
    method="POST",
)
with urlopen(request, timeout=90) as response:
    result = json.load(response)

choice = result["choices"][0]
if choice.get("finish_reason") != "stop":
    raise RuntimeError("Inspect the response: generation did not finish normally")
answer = choice["message"].get("content")
if not isinstance(answer, str) or not answer.strip():
    raise RuntimeError("The response contains no answer text to review")
print(answer)

This example requires a route that accepts the illustrated GLM fields. The official Chat Completion reference documents the request family, and the reasoning guide specifies that GLM-5.3 thinking cannot be disabled. Check those semantics against the gateway's current documentation. An unsupported field is an integration problem to investigate before scoring the model's answer.

If you are adapting an older GLM configuration, the GLM-5.3 reasoning migration guide gives relevant background. This article does not claim a live request was executed through your account.

Round two: make the contract executable

Read the generated function before placing it in labels.py. The request script prints a response; it never executes code returned by the model. For this small exercise, manually reviewing and applying the proposed replacement keeps the experiment understandable.

Save the following as test_labels.py beside labels.py:

import copy
import unittest
from labels import active_labels


class LabelContract(unittest.TestCase):
    def test_only_literal_true_enables(self):
        rows = [
            {"enabled": True, "label": "Keep"},
            {"enabled": 1, "label": "Integer"},
            {"enabled": "false", "label": "String"},
            {"enabled": False, "label": "Disabled"},
            {"label": "Missing flag"},
        ]
        self.assertEqual(active_labels(rows), ["Keep"])

    def test_invalid_labels_are_skipped(self):
        rows = [
            {"enabled": True},
            {"enabled": True, "label": None},
            {"enabled": True, "label": 7},
            {"enabled": True, "label": " \t "},
            {"enabled": True, "label": " Ready "},
        ]
        self.assertEqual(active_labels(rows), ["Ready"])

    def test_order_deduplication_and_case(self):
        rows = [{"enabled": True, "label": value}
                for value in [" B ", "A", "B", "a", " A "]]
        self.assertEqual(active_labels(rows), ["B", "A", "a"])

    def test_input_is_unchanged(self):
        rows = [{"enabled": True, "label": " Padded "}]
        original = copy.deepcopy(rows)
        active_labels(rows)
        self.assertEqual(rows, original)

    def test_empty_input(self):
        self.assertEqual(active_labels([]), [])


if __name__ == "__main__":
    unittest.main()

Run the fixture with Python's built-in test runner:

python -m unittest -v test_labels.py

The Python unittest documentation explains the runner and assertion methods. No third-party test package is necessary for this example.

These checks turn a subjective impression into several observable outcomes. The replacement either excludes the integer activation flag or it does not. It either preserves first-seen order or it does not. A helpful explanation cannot compensate for changing the function's contract.

Keep the limitation visible: a handful of tests cannot establish general coding ability. A model can pass this exercise and struggle with your application's architecture. It can also fail once and recover after useful feedback. Both observations can inform a developer's workflow without becoming a broad model ranking.

The reference patch is intentionally unremarkable

Try your model's answer before reading this replacement. The reference below is an author-written solution for the stated contract, not an output attributed to GLM-5.3 or GLM-5.5.

def active_labels(items):
    result = []
    seen = set()
    for item in items:
        if item.get("enabled") is not True:
            continue
        label = item.get("label")
        if not isinstance(label, str):
            continue
        label = label.strip()
        if not label or label in seen:
            continue
        seen.add(label)
        result.append(label)
    return result

Its value is easy to inspect. The activation rule is explicit. Invalid labels are discarded before string operations. The set tracks membership while the list preserves order. Trimming creates a local value and leaves the supplied dictionaries alone.

A different implementation can be equally valid. Do not mark an answer wrong because it differs from this patch. Check behavior, readability, and whether the changes remain within the requested scope.

Also watch for unnecessary additions. A model might introduce logging, a new class, configurable normalization, or a dependency to solve a five-line problem. Those additions may be reasonable in another application, but they deserve justification here. Review effort is part of the experience you are evaluating.

Round three: bring back a rule the model missed

If the initial answer fails, send the precise failing case and expected result. Preserve the original contract. Ask the assistant to correct the smallest relevant part of the patch and explain the observable behavior that changed.

This second turn reveals a different quality from first-attempt accuracy: whether the assistant can incorporate feedback without breaking something it already handled. A fix for duplicates should not suddenly lowercase the labels. A fix for missing data should not activate every nonempty flag.

After applying the revision, rerun the entire fixture. Saving only the newly passing test would miss regressions elsewhere. Keep the first patch and revision separately so that you can inspect how the conversation changed the code.

You can then introduce a clearly announced requirement change, such as case-insensitive deduplication that preserves the first spelling. Treat that as a new task with updated expectations. It would be unfair to penalize the original answer for not anticipating a rule you never supplied.

For a larger real-world version, use a sanitized bug from a project you understand: a parser that mishandles an empty field, a filter that changes ordering, or a data transformation that accidentally mutates its input. Familiarity lets you evaluate the answer with more confidence than a generic demonstration does.

Keep a result card for the next GLM release

Record the requested model, endpoint family, request settings, prompt revision, first-attempt test results, and amount of corrective feedback. Keep timing and observed usage separate from correctness. A faster failed response and a slower accepted patch represent different tradeoffs.

If you later add streaming, distinguish an API response arriving from useful answer text appearing in your application. The official streaming documentation describes incremental responses, while this GLM streaming delay investigation helps identify where a client may buffer them. Streaming behavior should not silently change the code task you are comparing.

Once GLM-5.5 has confirmed public documentation and an available account route, reuse the same challenge and review process. If the new model requires different settings, record that difference instead of presenting the comparison as identical. If release plans change, the existing result card remains a useful record of your current GLM workflow.

Broader performance discussions, such as the GLM coding benchmark review, can help identify questions to investigate. Your own small fixture answers a narrower question: how much help did this assistant need on a problem you could verify?

To start through Treerouter, check the current GLM listing, create your own account credentials if needed, and use the documented route for the challenge. No speculative model ID is required. One familiar bug is enough to make the next GLM announcement more meaningful to your development work.

Questions from the workbench

Does passing this challenge prove a model is suitable for my repository?

It shows that one answer satisfied this small contract under the recorded conditions. Follow it with representative project tasks, including dependencies and integration behavior the fixture does not cover.

Should I send the reference patch to the model?

Keep it out of the initial prompt if you want to inspect independent problem solving. You can use it later as an example when discussing implementation choices, but that becomes a different exercise.

Can I run this with GLM-5.5 today?

This article does not establish current GLM-5.5 API access. Use a documented current GLM model, then verify the official release and your platform's live listing before attempting a new model.