In strictly controlled tests using identical prompts, Kimi K2.7 beat GLM 5.2 (48/60) with a score of 53/60 in scaffolding a runnable greenfield project (FastAPI) thanks to complete components and zero missing dependencies; meanwhile, in deconstructing a massive repository (Saleor) end-to-end, GLM 5.2 came out on top by leveraging its 1M context window to unearth deeper implementation details.
Evaluated Models:
Kimi K2.7 Code: MoE 1T total parameters / 32B active, 256K context window, official API pricing at $0.95 input ($0.19 cached) / $4.00 output per 1M tokens.
GLM 5.2: MoE 744B–753B total parameters / 40B active, 1M context window, official API pricing at $1.40 input ($0.26 cached) / $4.40 output per 1M tokens.
Task Design:
Task 1 (Feature Implementation) : Build a complete FastAPI + PostgreSQL task management API from scratch (JWT, SQLAlchemy, CRUD, layered architecture, input validation) .
Task 2 (Repository Analysis) : Analyze the production-grade open-source e-commerce platform Saleor (Python/Django/GraphQL) codebase, delivering architecture breakdown, request trace flows, technical debt, and improvement recommendations.
| Evaluation Metric | Max Score | Kimi K2.7 | GLM 5.2 | Key Benchmark Observations |
|---|---|---|---|---|
| Requirement Coverage | 15 | 14 | 14 | Both models correctly understood all business requirements |
| Architecture & Directory Standards | 15 | 13 | 12 | Kimi delivered clean layering with production-grade directory organization |
| Code Quality & Standards | 15 | 14 | 12 | Kimi provided comprehensive type annotations and more thorough exception handling |
| Database & API Runnable State | 15 | 12 | 10 | GLM 5.2 omitted the User model and AuthService, preventing the project from running out of the box; Kimi generated all dependencies completely |
| Total Score | 60 | 53 | 48 | Kimi K2.7 Wins |
| Evaluation Dimension | Kimi K2.7 | GLM 5.2 | Detailed Comparison |
|---|---|---|---|
| High-Level Architecture Understanding | Good | Excellent | Both accurately identified the GraphQL-first architecture; GLM additionally covered deployment structure |
| Module Responsibility Analysis | Good | Excellent | GLM drilled down into plugin and webhook extension mechanisms |
| Request Flow Tracing | Good | Excellent | GLM thoroughly articulated the GraphQL execution flow and DataLoader batch loading details |
| Technical Debt & Bottlenecks | Good | Excellent | GLM pinpointed multiple implicit couplings between specific modules and long-term maintenance pain points |
Kimi K2.7 is the top pick for code implementation generation: For hands-on coding, scaffolding new projects, and implementing modules, Kimi K2.7 produces significantly higher code completeness. It rarely suffers from fatal omissions where code looks plausible but lacks key definitions, keeping human intervention and fix costs minimal.
GLM 5.2 is the top pick for long-context architecture exploration: When surveying monorepo-scale codebases and tracing complex call chains across dozens of files, GLM 5.2 demonstrates deeper cross-file code reasoning powered by its 1M context window and Sparse Attention.
Cost-performance advantage: Kimi K2.7's official API unit pricing is approximately 10%–30% lower than GLM 5.2, offering superior cost-efficiency for code generation and iterative Agent loops.
This benchmark relied on single-turn zero-shot / few-shot prompt comparisons and did not evaluate final convergence performance in multi-turn Agent self-correction loops (e.g., self-running pytest to resolve missing components) .
Pricing comparisons are based solely on official standard API rates and do not account for third-party aggregators or specific subscription plan discounts.
Call the Kimi K2.7 Code and GLM 5.2 APIs using identical prompt templates.
Write the files generated in Task 1 to a local directory, run pip install -r requirements.txt && uvicorn app.main:app, and verify whether the service starts cleanly without errors and successfully serves requests via Swagger UI.
Compare the depth of request flow tracing in Task 2 to verify whether it captures GraphQL resolve and DataLoader execution logic.
The original Unsiloed AI article provides full input prompts for both tasks, scoring rubrics, model output defect logs, and a detailed architectural parameter comparison table.
The evaluation notes: “Kimi K2.7 seems better suited to implementation-heavy tasks where you want the model to generate working files with fewer missing components. GLM 5.2 seems better suited to codebase exploration, architectural reviews, dependency tracing.”
Kimi K2.7 Code