GLM-5.1 takes 20 minutes to build Laravel project with mixed results

Project Architecture and Model Comparison

Building a

project from a single prompt requires an AI model to handle complex dependency management and architectural consistency. In a head-to-head evaluation,
GLM-5.1
attempted to construct a checklist application with PDF export capabilities using the
Livewire
starter kit. While it successfully delivered a functional application, the 20-minute execution time revealed significant friction compared to
Claude 3.5 Opus
(often referred to in context as
Opus 4.6
), which completed a more refined version in just six minutes. The disparity highlights a gap in how different LLMs internalize modern
PHP
ecosystems and UI libraries.

GLM-5.1 takes 20 minutes to build Laravel project with mixed results
I Tried NEW GLM-5.1 on a Longer Task (compared to Opus 4.6)

Prerequisites and Tech Stack

To replicate this automated build process, developers should be familiar with the following:

  • PHP 8.x and Laravel Framework: Understanding of MVC patterns and routing.
  • Livewire 4: Knowledge of full-stack components and single-file component syntax.
  • Flux UI: Familiarity with the official Laravel UI library for modern components.
  • Open Router: A unified API interface used to access
    GLM-5.1
    within
    VS Code
    .

Debugging the Flux UI Bottleneck

struggled primarily with
Flux UI
syntax. It repeatedly hallucinated component names, such as clipboard-check, and failed to recognize that the correct variant attribute for buttons is outline, not outlined. This led to a recursive "loop of failure" where the agent ran automated tests, failed, and attempted to fix the code blindly.

// Hallucinated Flux Syntax
<flux:radio label="Yes" />

// Corrected implementation after multiple failures
<flux:select label="Choose Response">
    <option value="yes">Yes</option>
</flux:select>

Code Quality and Performance Optimization

A deep dive into the generated code reveals that while

produces working software, it misses critical optimizations. A review by
Claude
identified an N+1 query issue in the dashboard view. Instead of loading only the count of items, the model loaded entire collections into memory.

// Inefficient: Loads all items just to count them
$checklists = Checklist::with('items')->get();

// Recommended: Uses database-level counting
$checklists = Checklist::withCount('items')->get();

Final Verdict on Agentic Capabilities

demonstrates impressive stamina for long-horizon tasks, remaining stable over 16 distinct task items. However, its lack of specific training on the latest
Flux UI
documentation resulted in a $2.15 cost per run on
OpenRouter
due to high token usage during debugging. For developers seeking efficiency,
Claude
remains the superior choice for high-fidelity UI and performance-first
Laravel
development.

3 min read