Evaluating Open-Source LLMs for Frontend Development: Capability Gaps and Selection Guidelines

    This article presents a comparative evaluation of open-source Large Language Models (LLMs) against leading proprietary models for frontend development tasks. It analyzes the performance of these models across three typical frontend scenarios—login pages, product lists, and complex forms—examining completion rate, comprehension depth, visual style, and generation efficiency. The article also provides an open-source licensing and security checklist, along with actionable selection recommendations and re-testing methodologies for development teams.

    I. Why Conduct This Evaluation

    Recently, the release frequency of open-source LLMs has accelerated significantly. Officially claimed benchmark scores are approaching those of leading international proprietary flagship models, sparking extensive discussion in the developer community.

    However, benchmark scores do not equate to real-world engineering capabilities. Benchmark questions typically consist of isolated algorithms or Q&A, whereas frontend projects require models to comprehend a complete requirements document, deconstruct page structures, field constraints, and interaction logic, and finally output executable code. Therefore, this article selects a real-world frontend scenario for horizontal testing to observe the actual performance of models in requirements comprehension and code reproduction.

    Note: This test was conducted in a single round with a limited sample size. The conclusions apply only to the tested versions, prompts used, and tasks selected, and cannot be directly extrapolated to other scenarios.

    II. Test Design

    2.1 Tested and Reference Models

    Item Tested Open-Source Model Reference Proprietary Flagship Model
    Model Name and Version [To be supplemented] [To be supplemented]
    Parameter Size [To be supplemented] Not disclosed
    Deployment or Invocation Method [To be supplemented] Cloud API
    Inference Framework [To be supplemented] Not applicable

    The information marked as “To be supplemented” in the table above was missing in the original test records. Readers who wish to reproduce the results must fill in these fields first.

    2.2 Test Tasks

    The tasks are derived from the requirements document of an enterprise-level frontend application, covering three core page types:

    1. Login Page: Brand carousel, form validation, login state management, and a “remember me” option.
    2. Product List Page: Multi-condition filtering such as price range and multi-select categories, sorting, pagination logic, and empty state handling.
    3. Complex Form Page: Multi-level field linkage, asynchronous validation, dynamic addition/removal of form items, secondary confirmation before saving, and unsaved data alerts when leaving the page.

    These three page types range from simple to complex, covering most typical requirements in standard frontend development.

    2.3 Evaluation Dimensions and Criteria

    Each page is evaluated across the following four dimensions:

    • Completion: Whether all functional points required by the document are implemented. A pass is recorded if all are implemented; a fail is recorded if any are missing.
    • Comprehension Depth: Whether interaction logic and field constraints are accurately reproduced. For example, whether the list data and result count update synchronously after filter conditions change.
    • Visual Style: Whether the interface structure is clear and conforms to design specifications. This dimension is highly subjective; it is recommended that two reviewers score independently and compare.
    • Generation Efficiency: The time taken from submitting the request to obtaining an executable project. Network conditions, queue times, conversation rounds, and whether debugging was involved must be recorded simultaneously.

    For a formal evaluation, it is recommended to assign explicit scores for each dimension and retain the original output for review.

    III. Results Across Three Page Types

    3.1 Login Page

    The functional points of the login page are fairly standard. Both models were able to implement the carousel, form validation, and login state management. The tested model generated a complete page structure with no obvious omissions. Overall, this type of page can serve as a starting point for prototypes or low-risk internal scenarios, but cannot be deployed directly without review.

    The login page is a type that appears frequently in training corpora, so the model performed well. This conclusion does not indicate that the model is equally reliable in complex business logic.

    3.2 Product List Page

    The tested model completed the list rendering and static filter display, but the linkage logic for filter conditions such as price range and multi-select categories was not implemented. Data did not update after filtering, and the reset button and result count did not function.

    The reference model completely reproduced the filter items and field structure, correctly implementing the linkage between filters and list data.

    In this test, similar issues appeared across multiple list pages, indicating that the model may have shortcomings in composite business logic. However, since the sample only included three page types with one round of testing each, this judgment requires verification with more use cases.

    3.3 Complex Form Page

    The tested model implemented the form framework, but deviated in the following aspects:

    • Missing Fields: Multiple business fields defined in the document did not appear in the generated result.
    • Simplified Validation: Format and required field validations for some fields were simplified or omitted.
    • Lost Interaction Details: Secondary confirmation before saving and alerts when leaving the page with unsaved data were not implemented.

    From the results, the model’s understanding of complex forms remained at the surface level of reproduction. It could generate the page skeleton but struggled to cover constraints and interaction details.

    3.4 Results Summary

    Dimension Login Page Product List Page Complex Form Page
    Completion Basically tied Tested model lacks filter linkage Tested model lacks fields and interactions
    Comprehension Depth Basically tied Reference model significantly better Reference model significantly better
    Visual Style Tested model is more engineering-focused, lacks product feel Reference model is more unified based on mature component libraries Reference model is more unified

    Note: No quantitative score was given for visual style; it is only a qualitative description.

    IV. Understanding Efficiency Data

    In the original test, the tested model took about half an hour to generate the entire project, encountering multiple queue and service busy prompts. The reference model took about 3 minutes to complete the same task.

    This data only indicates a difference in user experience for this specific test and cannot reflect the intrinsic inference speed of the models. The original record did not differentiate between the following factors: network environment, free quota limits, queue time, conversation rounds, and debugging time. To compare efficiency accurately, one should record the time to first token and total time for each request, repeat multiple times, take the median, and specify the runtime and resource quotas.

    V. Open-Source Licensing and Security Checklist

    The degree of openness of open-source models varies greatly and cannot be generalized. It is recommended to check item by item before selection:

    • License Type: Whether it is Apache-2.0, MIT, or a custom license. Custom licenses often include restrictions on user scale, industry, or use case.
    • Commercial Terms: Whether commercial deployment is allowed, whether attribution is required, and whether there are restrictions on how derivative models can be published.
    • Openness Scope: Whether model weights, training code, and training data are all public. Models that only release weights are called open-weight models and are not equivalent to open-source software as defined by the Open Source Definition.
    • Generated Code Risk: Generated code may contain security vulnerabilities, such as unescaped inputs, hardcoded secrets, or insecure API calls.
    • Dependency Risk: Generated code may introduce non-existent packages or conflict with existing dependency versions in the project.
    • Copyright Risk: If generated code is highly similar to public code, it must be reviewed according to enterprise compliance requirements.

    These items should be completed before the model enters the project, and records should be retained.

    VI. Selection Recommendations and Re-testing Methodology

    For frontend teams, this test provides the following recommendations.

    Start with low-risk tasks. Begin with internal tools or prototype pages to accumulate data on the model’s performance on your team’s specific requirements.

    Write structured requirement documents. List fields, validation rules, interaction steps, and exception states item by item to reduce the model’s need to guess implicit constraints.

    Fix prompts and environments. Use the same prompt for each evaluation, and record the model version, framework version, and dependency list.

    Introduce automated checks. Write end-to-end tests for filtering, form validation, and exception states, and compare the generated results against requirement items one by one.

    Retain manual review points. Security-related code, permission logic, and parts involving user data must be manually reviewed.

    To re-test, you can run another round using the pages in Section III and the checklist in Section V, repeating each task at least three times, and having two reviewers score independently. Only when results are stable should the conclusions be used for selection decisions.