GLM-5 Is Live: Key Highlights of Zhipu's Latest LLM and How It Performs in Real Coding Work
This article looks at GLM-5, Zhipu's latest large language model, through the lens of AI-assisted software development. It explains how modern coding assistants are moving from generating code snippets to co-designing architecture, unpacks the three technical foundations behind that shift (planning-first reasoning, long-context project understanding, and tool-based closed-loop execution), and walks through a full "delegated development" case: a mobile app with waterfall browsing, upload management, and AI image generation. It then lists the core highlights, the strengths and pitfalls from hands-on use, and a practical six-step collaboration method for working with an AI coding assistant as an "architecture partner."
1. The Shift: From “Writing Code” to “Scaffolding Architecture”
For a long time, many developers have thought of a large model’s coding ability as little more than an “advanced code snippet generator.” You ask it to “build a carousel,” it hands back a block of code, and the stitching, debugging, and gap-filling are still on you. This collaboration model is essentially “humans write code, the model drafts.”
But as requirements grow more complex, a different experience is emerging. One developer asked an AI coding assistant to build a lightweight mobile app with three modules:
- Waterfall image browsing: category filtering, album details, preview, and download;
- User upload management: image upload, storage, and content moderation;
- AI image generation: image analysis, prompt editing, one-tap outfit swap, and image generation.
Faced with this scope, the assistant didn’t rush to pile up code. Instead, it first produced a complete technical plan:
- Page structure: bottom tab navigation dividing the app into three main pages—Home, AI Studio, and Profile;
- Backend form: a serverless architecture, with cloud functions carrying business logic, a cloud database storing structured data, and object storage holding images;
- AI capability layering: a vision model reads images and outputs structured tags, a text model rewrites the tags into prompts, and an image-generation model produces the output;
- Engineering essentials: a feature module list, database table schema, cloud function responsibility split, and the upload-and-compression workflow.
The significance of this change goes beyond “typing a few fewer lines.” The architecture plan makes its decision points visible, so they can be reviewed, revised, or even rejected before any code is written—whereas reworking after dozens or hundreds of files land costs geometrically more. The shift in roles can be summarized as follows:
| Dimension | Snippet Generation Stage | Architecture Collaboration Stage |
|---|---|---|
| Core role | Code completion tool | Solution co-creator |
| Interaction granularity | Single function, single component | Requirements, modules, entire project |
| Main output | Code snippets | Technical plan + multi-file project |
| Developer focus | Coding and debugging | Defining the problem, reviewing the plan, quality gatekeeping |
| Model value | Faster typing | Compressing the path from requirements to a running system |
2. Three Technical Foundations Behind the Capability Leap
2.1 Plan First: Think It Through Before Acting
Traditional code completion chases millisecond-level responses, predicting the next block of code only within the context around the cursor, with almost no room to “think.” Reasoning-enhanced approaches let the model first analyze the requirement and break down the task, then work out a solution step by step—what the industry often calls “plan first, execute later.”
This mechanism brings two direct benefits:
- Less rework: constraints surface at the planning stage instead of erupting all at once during integration;
- Traceable decisions: every layer of the design has a reason behind it, and a person can step in to course-correct at key points.
Take the AI image-generation module. A seemingly simple “image analysis” feature involves at least three decisions at the planning level: use a vision model to read the image, use text capability to organize the prompt, and use image-generation capability to produce the result. Step-by-step planning makes these decisions explicit and avoids cramming three capabilities into a single, hard-to-maintain block of code.
2.2 Long Context and Project-Level Understanding
In the past, a model could only see the current file, at most a few neighboring snippets. With stronger context handling, it can now read the directory structure, data models, interface definitions, and existing modules at once, giving it a preliminary “project-level view.”
This directly determines one thing: whether the generated code stays consistent with the existing project. Whether naming conventions are uniform, directory organization is sensible, and interface contracts are coherent all depend on the model’s grasp of global information. The case’s claim that “the whole project generated 30+ files at once, basically runnable out of the box” points precisely to this cross-file understanding, working together with module-level generation.
2.3 Tooling and Closed-Loop Execution
Modern AI coding assistants are no longer just “you ask, it answers.” With tools for reading and writing files, running commands, and executing tests, they can form a closed loop of “make a plan → perform operations → observe results → fix errors.”
Whether code runs must ultimately be verified by the compiler and tests, not guaranteed by a language model’s “confidence.” Toolchains connect “generation” and “verification” into a loop—and that is exactly the crucial step that takes code from “looks correct” to “actually runs.”
3. Case Breakdown: A Complete “Delegated Development” Flow
3.1 Step 1: Write the Requirement as a Structured Spec
The fuzzier the requirement, the more a plan tends to “freestyle.” Before delegating, organize the business description into a structured spec that covers at least four areas:
- User roles: guest, regular user, content reviewer, administrator;
- Core features: the input, output, and key interactions of each feature;
- Data entities: images, albums, user works, tags, and so on;
- Non-functional requirements: list-loading performance, image size limits, upload rate limits, content compliance review, and so on.
The clearer the spec, the more the model can focus on implementation rather than repeatedly guessing intent.
3.2 Step 2: Treat the Architecture Plan as a Review Checklist
A solid architecture plan should be able to answer the following questions:
- Technology selection: native or cross-platform framework on the frontend? Is the basis performance, ecosystem, or team familiarity?
- Backend form: serverless removes server maintenance, but you must evaluate constraints like cold starts, maximum per-invocation duration, and database connection limits;
- Model layering: what does each of vision understanding, text rewriting, and image generation handle? How is output passed along in a structured form?
- Data model: do the fields cover query and statistics needs? Which fields need indexes?
- Cloud function boundaries: split by business domain, or one entry point per function?
- Upload strategy: compress on the client or process on the server? How are storage addresses generated and recycled?
Whether you build services in-house or rely on general cloud capabilities from platforms like Baidu AI Cloud (cloud functions, object storage, logging, and so on), the same lessons apply: check not only whether the features fit, but whether cold starts, concurrency quotas, and billing models match your business scale.
3.3 Step 3: Key Implementation Sketches
Data model: the image table should retain thumbnail URL, category, tags, status, author, and statistics fields, with composite indexes on “status + creation time” and “category + creation time” to support the core list-page query of “show approved content only + newest first + category filtering.”
// A sample record in the cloud database collection `wallpaper` (illustrative){"_id": "w_20250521_001","title": "Mountain Path After Rain","albumId": "album_003","thumbUrl": "<thumbnail storage URL>","originUrl": "<original image storage URL>","width": 1080,"height": 1920,"category": "Landscape","tags": ["Landscape", "After Rain", "Mountains"],"authorId": "u_10086","status": "pending", // pending = awaiting review / approved / rejected"downloads": 0,"createdAt": 1747785600000}
Cloud function: the list-query interface wraps pagination and category filtering in one place. The server sets an upper bound on page size to guard against oversized values being passed in; with no category, it returns everything; with a category, it filters. In the example, the database client is injected by the cloud function runtime, so it stays platform-agnostic.
// Cloud function `wallpaperList`: pagination + category filter// (illustrative; the database client is injected by the runtime)exports.handler = async (event = {}) => {const page = Math.max(Number(event.page) || 1, 1);const limit = Math.min(Number(event.pageSize) || 20, 50); // server-side cap on page sizeconst where = { status: 'approved' }; // return only approved contentif (event.category) where.category = event.category; // optional category filterconst coll = db.collection('wallpaper');const { total } = await coll.where(where).count();if (total === 0) return { code: 0, data: { page, total: 0, list: [] } };const { data: list } = await coll.where(where).orderBy('createdAt', 'desc').skip((page - 1) * limit).limit(limit).get();return { code: 0, data: { page, total, list } };};
Image upload: the upload path doesn’t have to be done in one shot; it can be split into four steps. First compress on the client, cutting file size within an acceptable quality range; then request a short-lived upload ticket scoped to a specific directory from the server; then upload directly to object storage so the file doesn’t flow through the business service; and finally write a database record and enter the review flow.
// Upload workflow (illustrative)async function submitWallpaper(file, category) {// 1. Client-side compression: cap the longest edge and lower quality to balance image quality and file sizeconst compressed = await compressImage(file, { maxEdge: 1920, quality: 0.8 });// 2. Request a least-privilege, short-lived upload ticket// (actual signing must happen server-side)const { uploadUrl, headers, fileKey } = await callFunction('issueUploadTicket', {scene: 'wallpaper'});// 3. Upload directly to object storageawait uploadToStorage(uploadUrl, compressed, headers);// 4. Write a pending-review record// (URLs are assembled server-side from fileKey; client-supplied values are not trusted)return callFunction('createWallpaper', { fileKey, category });}
Two security points matter here. First, in the example, “the upload ticket is issued by the server” only expresses the division of responsibility—actual key signing and access control must happen server-side, and no cloud-storage key should ever be shipped to the client or written into a code repository. Second, images that users upload or generate may carry compliance risks involving portrait rights, trademarks, and so on; they should pass content-safety review, or be manually reviewed, before being displayed.
AI image-generation pipeline: in the case, “upload → analyze → edit → generate” is a single business path that internally breaks down into several steps:
- Compress and upload the image;
- Call the vision model to output structured tags such as subject, style, composition, lighting, and background atmosphere;
- Have the text model rewrite the tags into a structured prompt and produce style variants for the user to choose from. “One-tap outfit swap” essentially appends the target garment description to the prompt and edits the image using the user’s photo as reference;
- Call the image-generation model to produce the output, supporting save, regenerate, or continue editing;
- Write the result into “My Works” for later reuse.
// AI image-generation main pipeline (illustrative)const PIPELINE = {upload: { next: 'analyze' },analyze: { next: 'edit', fail: 'upload' },edit: { next: 'generate', back: 'analyze' }, // user can re-analyze if unhappy with the analysisgenerate: { next: 'save', back: 'edit', retry: 'generate' }, // retry only re-runs image generationsave: { next: null }};async function runAiPhoto(ctx) {// 1. Vision understanding: produce a structured analysisconst tags = await visionModel.analyze(ctx.imageUrl,['subject', 'style', 'composition', 'lighting', 'background atmosphere']);// 2. Text rewrite: only the prompt field may change, so the prompt always stays a stringconst edited = await textModel.rewrite({system: 'You are a prompt engineer. Output JSON only, where the prompt field holds the final prompt.',tags,userStyle: ctx.userPrompt || '' // content after the user's manual edit});// 3. Image generation: use the user's image as reference; the prompt controls style and garment editsconst result = await imageModel.generate({reference: ctx.imageUrl,prompt: edited.prompt});return { prompt: edited.prompt, imageUrl: result.url, tags };}
Two details here are easy to trip over:
- Structured output from the vision model: when told to “output JSON,” a vision model may include explanatory text or even omit fields. The code takes and validates only the
promptfield precisely to keep formatting problems from breaking the main flow. - Error handling: this example only shows responsibility splitting and the pipeline shape. A real project must add timeouts and retries, idempotency control, and task-status-based asynchronous processing and polling to stay reliable.
As for the waterfall layout itself, two-column masonry has two common engineering approaches:
- Short list: split content into left and right columns and insert each new card into whichever column is currently shorter—simple to implement;
- Long list: use absolute positioning, compute each image’s position, then render—better performance but higher complexity.
Either way, images need a small amount of neighboring data preloaded and thumbnails loaded as they enter the viewport. Combined with placeholder heights, skeleton screens, and infinite-scroll pagination, this avoids violent layout jumps while scrolling.
3.4 Step 4: Close with an Executable Acceptance Checklist
“Does it run” is only the minimum bar; “is it trustworthy” needs an acceptance checklist to answer:
- Feature completeness: are pagination, category filtering, empty states, and load-failure retries all handled?
- Data consistency: can the review status be bypassed from the frontend? Does a failed upload leave dirty records in the database?
- Security boundaries: are keys kept server-side? Are upload-ticket permissions minimized? Is input validated?
- Maintainability: are naming and directory conventions consistent? Are volatile configs like prompts and model parameters managed centrally?
- Observability: do key paths have logging and monitoring so problems can be located quickly?
4. Core Highlights Worth Noting
From this kind of practice, the highlights of a new-generation AI coding assistant can be summarized in five points:
- Plan before code: it outputs a reviewable technical plan first, moving high-cost decisions like technology selection and data modeling ahead of coding;
- Project-level consistency: it understands global context, keeping naming, directory structure, and interface contracts consistent across multiple files and cutting later friction;
- Cross-platform, cross-layer delivery: one conversation covers pages, components, cloud functions, and data models, close to how full-stack collaboration works in a real project;
- End-to-end task understanding: it can break a composite requirement like “waterfall browsing, upload management, AI image generation” into concrete engineering elements such as database design, cloud function boundaries, and file-processing flows;
- Engineering closed loop and fast iteration: generation and verification form a loop that, combined with the model’s continual improvement, noticeably shortens the cycle from idea to working prototype.
5. Hands-On: Where It’s Fast, and Where It Stalls
5.1 Where It Clearly Speeds Things Up
- New projects from 0 to 1: directory structure, data models, and basic interfaces come together quickly, saving a lot of boilerplate time;
- Routine business modules: highly patterned features like list pagination, form validation, and upload/download are generated with fairly stable quality and speed;
- Cross-platform consistency: when editing multiple files under the same conventions, style drift is less likely to creep in.
5.2 Where a Human Needs to Stay in Control
- Context drift on long tasks: as the number of turns grows, the model may drift from the original architecture conventions or become inconsistent across modules, so periodic review and correction are needed;
- “Wishful thinking” about platform-specific interfaces: generated code may “invent” plausible-looking but nonexistent endpoints, parameters, or SDK usage; whenever platform capabilities are involved, defer to the official documentation;
- Implicit constraints that are hard to satisfy automatically: concurrency control, idempotency, transaction boundaries, and capacity planning often don’t show up at the prototype stage but surface all at once after launch;
- Frequent requirement changes: broad-impact changes still require a person to assess the blast radius and design regression tests.
5.3 Beyond Efficiency: The Security and Compliance Bottom Line
The smoother the demo runs, the easier it is to overlook security. At a minimum, fold these into your default checks:
- Key governance: keep keys centrally managed server-side, inject them via environment variables or a key-management service, rotate them regularly, and turn on repository secret scanning;
- Identity and permissions: all data access follows least privilege, and the server verifies identity and permissions on every request;
- Input and traffic control: validate uploaded file types and sizes, and rate-limit high-frequency interfaces to prevent resource abuse;
- Content safety: both user-uploaded and AI-generated images should pass content-safety review;
- Data compliance: be clear about what data is collected, how long it’s kept, and who can access it, and avoid sending sensitive information directly to a model.
6. Methodology: Getting the Most Out of an “Architecture Partner”
The ceiling of the tool keeps rising, but output quality depends even more on how you use it. Drawing on the case, here is a “six-step collaboration method.”
6.1 Write Your Project a “Manual”
Fix the following in a project documentation file: tech stack and versions, directory conventions, naming standards, prohibited items (such as “never store keys on the client”), and acceptance criteria. Feed it in as part of the project context—it’s like giving the model a “engineering constitution.”
6.2 Delegate in Stages, Validate in Small Steps
Delegate in stages of “plan review → data and interface contracts → module-by-module implementation → integration and acceptance.” Each stage produces a verifiable result, so you avoid the difficulty of pinpointing issues after generating a large batch of code at once.
6.3 Interface First, Align on Contracts
Before coding, define each interface’s inputs, outputs, and error codes so the frontend, cloud functions, and model-calling code all work against the same contract. Once the contract is stable, modules can be developed in parallel.
6.4 Make Volatile Parts Configurable
Content that changes frequently—model names, prompt templates, style presets, generation parameters—should be centralized in a config file or database. This lets you tune results without touching business code and makes gray releases and rollbacks easier.
6.5 Review as You Generate, Automate the Safety Net
Apply the same standards to AI-generated code as to human-written code: code review, static analysis, unit tests, and dependency vulnerability checks—none can be skipped. You can write AI-generated code review into the team workflow as a mandatory step.
6.5 Humans Guard Three “Irreplaceable” Things
The model can compress the implementation path, but three things still need a person:
- Defining the problem: judging which requirements are worth doing;
- Making trade-offs: balancing cost, experience, and risk;
- Owning the outcome: taking responsibility for production quality and security.
Many developers feel anxious watching model capabilities iterate quickly, yet overlook one fact: the stronger the tool, the more it raises the bar from “can write code” to “can define problems, make good trade-offs, and hold the quality line.” Rather than chasing every new model, it’s better to invest your energy in architecture design, domain knowledge, and engineering judgment—that’s the real moat when evolving alongside the tools.
