Prompting GLM
Choose text or visual coding models and configure thinking explicitly for GLM-5.3 workflows.
Model selection
| Model or service | Use case | Model ID or access |
|---|---|---|
| GLM-5.3 | Text reasoning and code | glm-5.3 |
| GLM-5.3-Flash | Visual coding and multimodal work | glm-5.3-flash |
| GLM-5.3-FlashX | Higher-throughput hosted variant | glm-5.3-flashx |
Which model to choose
Use the text model for source-based work and Flash when screenshots are part of the acceptance check. Benchmark both with the same task and tool budget.
Using the chat or local app
For a UI task, attach both the current screenshot and the expected behavior. Give the agent the route to open and the interactions to verify.
Using the API
GLM-5.3 and Flash require thinking.type enabled; select low, high or max reasoning effort. For Flash add image_url content blocks for images. Preserve thinking across tool turns using the documented clear_thinking setting; FlashX availability differs between Model API and Coding Plan.
POST https://api.z.ai/api/paas/v4/chat/completions
{
"model": "glm-5.3",
"messages": [
{
"role": "user",
"content": "Review {{diff}} for regressions and provide triggering inputs."
}
],
"thinking": {
"type": "enabled"
},
"reasoning_effort": "high"
}Prompting advice
- Give the relevant file paths and a repeatable failure case.
- For visual work, ask the agent to inspect the rendered result after a change.
Example prompt template
Fix the layout at {{route}} to match {{reference}}. Preserve the existing components. Verify the search flow, menu keyboard behavior and horizontal overflow at 390px.