Open-Source Model Frontend Code Generation Tested: Gaps and Limits
This single-sample test compares the React pages generated by a Chinese open-source foundation model and a commercial closed-source model from an overseas provider, using the same frontend requirements document. The model's login page was usable, but on the multi-condition list page and the linked-validation form page, it missed several requirements. The results apply only to this task and do not represent either model type's overall ability.
The Short Answer and Its Limits
This article documents a single-sample test. The same frontend requirements document was given to a Chinese open-source foundation model and a commercial closed-source model from an overseas provider. Each generated a React page, and the two outputs were compared. The conclusions apply only to this task. They do not represent the overall capabilities of either model type.
In this test, the open-source model’s login page was basically usable. However, on the multi-condition list page and the form page with linked validation, it missed several requirements.
How the Test Was Run, and What Was Not Recorded
The test input was a requirements document covering three modules: a login page, a product list page, and an order form page. The initial prompt specified only the React stack. It did not include code examples or a component library.
This record does not include the exact model names and versions, the full prompt, the runtime environment, inference parameters, concurrency conditions, or the number of repeated runs. The observations below should therefore be treated as results from one run. Readers who want to reproduce the test should document these conditions before comparing results.
Acceptance was checked manually: whether the page runs, and whether its features match the document. This method is intuitive, but different reviewers may judge the results differently.
Login Page: Complete Features, Rough Details
The open-source model’s login page included a carousel, form validation, and a basic responsive layout. All elements displayed, and the interactions worked.
On closer inspection, two issues appeared. Autoplay and swipe gestures on the carousel worked, but there was no fallback when an image failed to load. The position and style of form error messages differed from common design guidelines. These issues fall into the category of correct functionality with insufficient detail, and they are relatively cheap to fix.
List Page: Missed Filters in Multi-Condition Search
The document required the list page to support combined filtering by three dimensions: price range, brand, and listing status. Filter conditions had to sync to URL parameters. The page also had to support two sorting modes: comprehensive sorting and sales-volume sorting.
The generated page rendered only the price range filter. Brand and listing status were ignored. After filtering, the URL did not update, so the conditions were lost on page refresh. The sorting modes only affected list rendering and did not implement two distinct sorting logic paths.
In engineering terms, combined filtering means several states affect each other, and the list data must be derived from those states. The generated result did not reflect this. The cause may be the model’s limited understanding, or it may relate to how the prompt was worded. This test cannot distinguish between the two.
Form Page: Linked and Asynchronous Validation Incomplete
The form page requirements included dynamic add and remove groups of fields, cross-field linked validation (when credit payment is selected, company information must be filled in), and asynchronous validation (checking whether a username already exists).
The generated result completed only type validation and required-field validation. The cross-field linked rule was not implemented. Dynamic field groups could be added, but deleting one caused a variable reference error that led to a runtime exception. Asynchronous validation was not implemented.
Possible Causes (Speculative)
The explanations below are speculation. This test did not verify them.
First, training data may lean toward simple, self-contained component code and cover highly coupled business code less. That distribution could make a model better at building page structure than at reasoning through business rules.
Second, implicit constraints in long documents are easy to miss. When requirements contain multi-layered nested conditions, the model may implement only the features mentioned first.
Third, differences in generation speed and failure records may be affected by compute quotas, concurrency limits, or output length. Timing was not standardized, and these variables were not controlled. Speed differences therefore cannot serve as evidence of model capability.
How to Evaluate Open-Source Models
Benchmark scores such as MMLU and HumanEval are hard to translate into how well a model reproduces complex business logic. Evaluation should stay as close to real projects as possible.
How to test: choose a page with three to five modules, keep the implicit constraints in the requirements, and set checkable acceptance criteria for each module.
How to choose: first grade tasks by risk. Display-only pages can be generated by the model and reviewed quickly. For modules involving transactions, permissions, or complex state, manual implementation should lead, with the model serving as an assistant only.
What to record: model version, prompt, runtime environment, and number of repeated runs. Run the same task several times to check whether results are stable.
Common mistakes: checking only whether the code compiles, checking only whether the page opens, or drawing conclusions from a single success or failure.
Practical Recommendations and Risks
For most teams, open-source models are better suited as coding assistants than as tools that complete an entire module automatically. They can generate CRUD code, page skeletons, and unit test drafts.
Core transaction logic, permission control, and complex state synchronization require manual review and regression testing. Generated code should not go directly to production. Features that handle user data or funds also need a security review.
Reusable Acceptance Checklist
- The page loads normally, and the console shows no runtime errors
- All filters render and work in combination
- Filter conditions sync to the URL and persist after refresh
- Sorting modes can be switched, and results follow each mode’s sorting rules
- Cross-field linked rules trigger as the document specifies
- Asynchronous validation shows a loading state and a failure message
- Data and validation state stay consistent after dynamic fields are added or removed
- The page displays a fallback when an image or API request fails
Conclusion
This test used one sample, so its conclusions have limited scope. It suggests that open-source models are already usable for simple pages, but complex state and business rules still need manual oversight. A more reliable judgment requires multiple repeatable tests with a consistent methodology.
