Skip to content
The Chat Archive
o3-mini· OpenAI LMArena Human Preference 140K

What is the cheap and best llm model to code using sveltekit, typescript. And in any…

From a Chatbot Arena battleThe same person sent this prompt to two anonymous models at once. Compare it with grok-3-mini-high’s answer.
  1. User

    What is the cheap and best llm model to code using sveltekit, typescript. And in any stack given proper instructions and context is given

  2. Assistant

    There isn’t a one‐size‐fits‐all answer—the “best” model depends on your requirements in terms of accuracy, latency, integration, and, of course, cost. However, here are some recommendations and considerations:


    1. Commercial Options

    • OpenAI’s GPT‑3.5‑turbo

      • Pros:
        • Cost-Effective: It’s generally the most affordable option in the OpenAI suite, offering a very attractive cost-to-quality ratio compared to GPT‑4.
        • Capability: It handles a wide range of coding tasks—including frameworks like SvelteKit and languages like TypeScript—quite well when given clear instructions and enough context.
        • Ecosystem & Integration: It’s widely integrated in tools and plugins (e.g., GitHub Copilot, VS Code extensions) making experimentation and integration easier.
      • Cons:
        • While very competent, it might occasionally need extra prompting or iterations on more complex or edge-case coding problems.
    • GitHub Copilot (powered by OpenAI models)

      • Pros:
        • Integrated Experience: Built directly into popular IDEs, it can boost productivity with inline suggestions, completions, and learning from context in real time.
        • Cost: The subscription cost is relatively modest compared to enterprise-level APIs.
      • Cons:
        • It’s less of a “model you query” with custom instructions and more of an assistive tool—which might be a limitation if you need a more controllable interface for non-standard tasks.

    2. Open-Source Options

    If you’d like to avoid per-call costs and have the flexibility of running a model locally (or on your own cloud), consider open-source models that are rapidly maturing:

    • StarCoder (by Hugging Face/BigCode) or CodeLlama

      • Pros:
        • Free to Use: Although you’ll need the compute resources (which might be local GPUs or cloud instances), there’s no per-token fee.
        • Tailored for Code: These models are specifically fine-tuned for code generation and can understand multiple programming languages and frameworks.
      • Cons:
        • Infrastructure Cost: Running these models locally may require investing in hardware or paying for cloud compute, which can sometimes offset the “free API” advantage if you have a heavy usage scenario.
        • Performance Variation: They’re improving quickly, but out-of-the-box performance might not yet match the reliability of commercial models like GPT‑3.5‑turbo unless you fine-tune or optimize them further.
    • Llama 2 (Meta)

      • Pros:
        • Versatility: With some prompt engineering, you might adapt Llama 2 for coding tasks.
        • Community Support: There’s a growing community helping to target code usage with these models.
      • Cons:
        • Not Primarily Focused on Code: You might find that models dedicated to coding (like StarCoder or CodeLlama) produce more polished code without additional fine-tuning.

    3. Which One to Choose?

    For most developers who want to code with modern frameworks like SvelteKit and TypeScript using clear instructions and without investing heavily in new hardware or complex integrations, the following is a good starting point:

    • Primary Recommendation: OpenAI’s GPT‑3.5‑turbo
      It strikes a good balance between cost and quality. Provided you format your instructions clearly and give appropriate context (including the tech stack details, project requirements, etc.), it can generate well-structured, idiomatic code across various technologies.

    • If You Prefer a Local/Open-Source Approach:
      Explore StarCoder or CodeLlama. These are particularly attractive if you want to avoid recurring API costs and experiment with hosting models yourself. Just be prepared for some initial setup and possibly some fine-tuning to match the quality you might get out-of-the-box from GPT‑3.5‑turbo.


    Final Considerations

    • Quality vs. Cost: Higher-cost models (like GPT‑4) might offer marginal improvements for complex projects, but GPT‑3.5‑turbo is generally sufficient for most development tasks, especially when provided with detailed prompts.
    • Experimentation: If you’re not sure which model fits your workflow best, consider running small experiments. Use a few sample projects with your typical instructions and see which model outputs code that requires the least post-editing.
    • Integration: Think about how the model will fit into your development environment. If seamless IDE integration is key, tools like GitHub Copilot (or even VS Code extensions for GPT‑3.5‑turbo) might improve your productivity more than a custom API integration.

    In summary, for a “cheap and best” solution that handles coding in SvelteKit, TypeScript, and other stacks with proper context and instructions, GPT‑3.5‑turbo is a strong candidate, with promising open-source alternatives available if you prefer a local setup.

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.