GLM 5.1 Is Now Available in Puter.js
On this page
Puter.js now supports GLM-5.1, Z.AI's frontier-class reasoning model that surpasses GPT-5.4 and Claude Opus 4.6 on SWE-Bench Pro, making it the top-performing open-weight model for coding and agentic tasks.
What is GLM-5.1?
GLM-5.1 is a post-training refinement of GLM-5 focused on coding and agentic performance. It shares the same 744B-parameter Mixture of Experts architecture (40B active per token) but pushes the boundaries on real-world software engineering benchmarks. Key highlights include:
- SWE-Bench Pro Leader: Scores 58.4% on SWE-Bench Pro, surpassing GPT-5.4 (57.7%) and Claude Opus 4.6 (57.3%) among open-weight models
- Strong Math Reasoning: Achieves 95.3 on AIME 2026, demonstrating advanced mathematical problem-solving
- 200K Context Window: Process massive codebases and generate outputs up to 200K tokens
- Long-Horizon Agentic Workflows: Can stay on a single task for up to 8 hours—planning, executing, testing, and iterating before returning production-ready output
Examples
Complex software engineering
puter.ai.chat(`Refactor this legacy Express.js API to use a clean architecture pattern
with proper dependency injection, error handling middleware, and request validation:
${legacyCode}`,
{ model: 'z-ai/glm-5.1', stream: true }
);
Multi-step agentic coding
puter.ai.chat(`Analyze this codebase for performance bottlenecks, then:
1. Identify the top 5 slowest database queries
2. Suggest optimized versions with proper indexing
3. Write migration scripts for the schema changes
4. Generate load tests to verify the improvements`,
{ model: 'z-ai/glm-5.1' }
);
Advanced reasoning
puter.ai.chat("Solve AIME 2026 Problem 12 step by step, showing all intermediate reasoning",
{ model: 'z-ai/glm-5.1' }
);
Long context code review
puter.ai.chat(`Review this entire repository and generate a comprehensive security audit report
covering OWASP Top 10 vulnerabilities, dependency risks, and authentication flaws:
${entireRepo}`,
{ model: 'z-ai/glm-5.1' }
);
Get Started Now
Just add one library to your project:
// npm install @heyputer/puter.js
import { puter } from '@heyputer/puter.js';
Or add one script tag to your HTML:
<script src="https://js.puter.com/v2/"></script>
No API keys needed. Start building with GLM-5.1 immediately.
Learn more:
Free, Serverless AI and Cloud
Start creating powerful web applications with Puter.js in seconds!
Get Started Now