Skip to content

GPT · Coding

GPT-6 for coding

llmwise has 7 of OpenAI's GPT models, from GPT-6 Luna (up to 60 messages a day on Pro) to GPT-6.2 Astra (up to 31 messages a month). We ran the same coding prompts on every one and published every reply: which GPT model to use, from the results, what each costs per message, and how to get more out of it.

Based on 35 of our test runs on , through OpenRouter with the app's own prompt and settings.

Short answer

In our test runs on November 18, 2026, all 7 models passed 5 of 5 coding prompts, so these prompts don't pick one for hard problems. For value, GPT-6.1 Terra (5 of 5), 250 a month on Pro; for everyday coding, GPT-6 Luna (5 of 5), from the daily count.

Our picks for coding

  • Hard problems

    Shared by 7 models

    All 7 models passed 5 of 5, both hard ones: GPT-6.2 Astra, GPT-6 Astra, GPT-6.2 Sol and 4 more. These prompts don't tell them apart, so they share the pick.

  • Best value

    GPT-6.1 Terra

    Passed 5 of 5 coding prompts, with 250 a month on Pro.

  • Everyday

    GPT-6 Luna

    Passed 5 of 5 coding prompts; an everyday model, so its messages come from the daily count (60 a day on Pro), not the monthly allowance.

These picks aren't our opinion: they're what the results below give, by these rules, among the GPT models in llmwise. They change when the results do.

  • Hard problems: the model that passed the most prompts and, of those, the most hard ones. Models level on both share the pick: the prompts don't tell them apart, so we don't break the tie by price or by name.
  • Best value: among the models that draw on the monthly allowance, the one with the most messages on Pro that passed no more than one prompt fewer than the top model. Ties go to the one that passed more, then to the lower cost per reply.
  • Everyday: among the cheapest models on the page (the everyday models, which come from the daily count, when the page has any), the one that passed the most. Ties go to the one that passed more of the hard prompts, then to the lower cost per reply.

Our coding test runs, model by model

How each model did on our 5 coding prompts, what each reply counted as on Pro, and what it cost to run.

Our coding test runs
ModelPassedHard onesMessages used on ProCost per replyTime per reply
GPT-6.2 AstraOpenAI5 of 52 of 21 each, of 31 a month on Pro$0.01323.9 s
GPT-6 AstraOpenAI5 of 52 of 21 each, of 31 a month on Pro$0.01087.1 s
GPT-6.2 SolOpenAI5 of 52 of 21 each, of 125 a month on Pro$0.00373.7 s
GPT-6.1 SolOpenAI5 of 52 of 21 each, of 125 a month on Pro$0.00418.4 s
GPT-6 SolOpenAI5 of 52 of 21 each, of 125 a month on Pro$0.00284.4 s
GPT-6.1 TerraOpenAI5 of 52 of 21 each, of 250 a month on Pro$0.00137.4 s
GPT-6 LunaOpenAI5 of 52 of 21 each, of 60 a day on Pro$0.00019.2 s
Passed: out of the job's 5 prompts, how many replies passed their check (a reply the provider failed to give isn't counted). Messages used: what each reply counted as on Pro, and Pro's count on the model. Cost: what OpenRouter charged us per reply, on average; in llmwise you pay per message, not per token. Time: from sending to the whole reply.

One prompt, side by side

Each model's reply to “Evaluate an arithmetic expression, no eval”, as it came, with whether it passed and what it cost.

The prompt: Evaluate an arithmetic expression, no eval (hard)
Write a JavaScript function evaluate(expression) that computes an arithmetic expression given as a string and returns the number.
It supports numbers like 3, 0.5 and 12.25; the operators + - * / and ^ (power); parentheses; unary minus; and spaces anywhere.
- ^ binds tighter than unary minus and is right-associative, so -2^2 is -4 and 2^3^2 is 512. A unary minus may follow ^, as in 2^-1, which is 0.5.
- * and / bind tighter than + and -. Otherwise operators of the same level go left to right, so 8/4/2 is 1.
- Throw an Error for input that isn't a valid expression, such as "2 +", "(1" or "1 2".
Don't use eval, Function or any library.
Reply with the whole function in one ```javascript code block: plain JavaScript for Node.js 22, no imports, no TypeScript.
  • GPT-6.2 Astra

    Passed: All 15 tests passed.

    ```javascript
    function evaluate(expression) {
      if (typeof expression !== "string") {
        throw new Error("Expected an expression string");
      }
    
      let pos = 0;
      const number = /(?:\d+(?:\.\d*)?|\.\d+)/y;
    
      function skipSpaces() {
        while (pos < expression.length && /\s/.test(expression[pos])) pos++;
      }
    
      function take(token) {
        skipSpaces();
        if (expression[pos] !== token) return false;
        pos++;
        return true;
      }
    
      function primary() {
        if (take("(")) {
          const value = sum();
          if (!take(")")) throw new Error(`Expected ')' at position ${pos}`);
          return value;
        }
    
        number.lastIndex = pos;
        const match = number.exec(expression);
        if (!match) throw new Error(`Expected a number or '(' at position ${pos}`);
        pos = number.lastIndex;
        return Number(match[0]);
      }
    
      function power() {
        const base = primary();
        return take("^") ? base ** unary() : base;
      }
    
      function unary() {
        return take("-") ? -unary() : power();
      }
    
      function product() {
        let value = unary();
        while (true) {
          if (take("*")) value *= unary();
          else if (take("/")) value /= unary();
          else return value;
        }
      }
    
      function sum() {
        let value = product();
        while (true) {
          if (take("+")) value += product();
          else if (take("-")) value -= product();
          else return value;
        }
      }
    
      const result = sum();
      skipSpaces();
      if (pos !== expression.length) {
        throw new Error(`Unexpected token at position ${pos}`);
      }
      return result;
    }
    ```

    723 tokens in, 389 out · 5.7 s · $0.0213 · 1 message on Pro · answered by openai/gpt-6.2-astra via OpenAI ·

  • GPT-6.1 Terra

    Passed: All 15 tests passed.

    ```javascript
    function evaluate(expression) {
      if (typeof expression !== "string") {
        throw new Error("Expression must be a string");
      }
    
      let index = 0;
    
      function skipSpaces() {
        while (index < expression.length && /\s/.test(expression[index])) {
          index++;
        }
      }
    
      function consume(character) {
        skipSpaces();
        if (expression[index] === character) {
          index++;
          return true;
        }
        return false;
      }
    
      function primary() {
        if (consume("(")) {
          const value = addition();
          if (!consume(")")) throw new Error("Expected ')'");
          return value;
        }
    
        skipSpaces();
        const match = expression.slice(index).match(/^(?:\d+(?:\.\d*)?|\.\d+)/);
        if (!match) throw new Error("Expected a number or '('");
    
        index += match[0].length;
        return Number(match[0]);
      }
    
      function power() {
        const base = primary();
        return consume("^") ? base ** unary() : base;
      }
    
      function unary() {
        return consume("-") ? -unary() : power();
      }
    
      function multiplication() {
        let value = unary();
        while (true) {
          if (consume("*")) value *= unary();
          else if (consume("/")) value /= unary();
          else return value;
        }
      }
    
      function addition() {
        let value = multiplication();
        while (true) {
          if (consume("+")) value += multiplication();
          else if (consume("-")) value -= multiplication();
          else return value;
        }
      }
    
      const result = addition();
      skipSpaces();
      if (index !== expression.length) throw new Error("Unexpected input");
      return result;
    }
    ```

    723 tokens in, 612 out (232 of them reasoning) · 9.9 s · $0.0019 · 1 message on Pro · answered by openai/gpt-6.1-terra via OpenAI ·

  • GPT-6 Luna

    Passed: All 15 tests passed.

    ```javascript
    function evaluate(expression) {
      if (typeof expression !== "string") {
        throw new Error("Expression must be a string");
      }
    
      const tokens = [];
      let i = 0;
    
      while (i < expression.length) {
        if (/\s/.test(expression[i])) {
          i++;
          continue;
        }
    
        const number = /(?:\d+(?:\.\d*)?|\.\d+)/y;
        number.lastIndex = i;
        const match = number.exec(expression);
    
        if (match) {
          tokens.push({ type: "number", value: Number(match[0]) });
          i = number.lastIndex;
        } else if ("+-*/^()".includes(expression[i])) {
          tokens.push({ type: expression[i], value: expression[i] });
          i++;
        } else {
          throw new Error("Invalid expression");
        }
      }
    
      let position = 0;
    
      function parsePrimary() {
        const token = tokens[position];
    
        if (token?.type === "number") {
          position++;
          return token.value;
        }
    
        if (token?.type === "(") {
          position++;
          const value = parseSum();
          if (tokens[position]?.type !== ")") throw new Error("Invalid expression");
          position++;
          return value;
        }
    
        throw new Error("Invalid expression");
      }
    
      function parsePower() {
        const base = parsePrimary();
    
        if (tokens[position]?.type === "^") {
          position++;
          return base ** parseUnary();
        }
    
        return base;
      }
    
      function parseUnary() {
        if (tokens[position]?.type === "-") {
          position++;
          return -parseUnary();
        }
    
        return parsePower();
      }
    
      function parseProduct() {
        let value = parseUnary();
    
        while (tokens[position]?.type === "*" || tokens[position]?.type === "/") {
          const operator = tokens[position++].type;
          const right = parseUnary();
          value = operator === "*" ? value * right : value / right;
        }
    
        return value;
      }
    
      function parseSum() {
        let value = parseProduct();
    
        while (tokens[position]?.type === "+" || tokens[position]?.type === "-") {
          const operator = tokens[position++].type;
          const right = parseProduct();
          value = operator === "+" ? value + right : value - right;
        }
    
        return value;
      }
    
      const result = parseSum();
      if (position !== tokens.length) throw new Error("Invalid expression");
      return result;
    }
    ```

    721 tokens in, 933 out (397 of them reasoning) · 18.9 s · $0.0003 · 1 message on Pro · answered by openai/gpt-6-luna via OpenAI ·

The coding prompts, and how they're scored

Tests. Automatic. The function runs against the prompt's tests in a separate Node.js process with a time limit and no file, network or child-process access; it passes when every test passes.

Each prompt was sent the way llmwise sends a message in a side-by-side comparison, which offers no tools: the app's own system prompt, the model's own settings, and Pro's reply size limit (8,000 tokens). Read all five coding prompts and how every reply was scored.

Prompts like these to try yourself

GPT in llmwise

GPT models in llmwise
ModelOn ProPlansContext windowImagesPDFsReasoningAPI price per 1M, in / out
GPT-6.2 AstraOpenAI31/mo on ProPro1.05M tokensYesWhole fileYes$8.00 / $40.00
GPT-6 AstraOpenAI31/mo on ProPro1.05M tokensYesWhole fileYes$10.00 / $50.00
GPT-6.2 SolOpenAI125/mo on ProPlus and Pro1.05M tokensYesWhole fileYes$2.00 / $10.00
GPT-6.1 SolOpenAI125/mo on ProPlus and Pro1.05M tokensYesWhole fileYes$2.00 / $10.00
GPT-6 SolOpenAI125/mo on ProPlus and Pro1.05M tokensYesWhole fileYes$2.00 / $10.00
GPT-6.1 TerraOpenAI250/mo on ProPlus and Pro1.05M tokensYesWhole fileYes$1.00 / $5.00
GPT-6 LunaOpenAI60/day on ProPlus and Pro1.05M tokensYesWhole fileYes$0.10 / $0.50
Each badge is how many messages Pro gets on the model: a month’s, or a day’s on an everyday model. “Plans” says which plans have the model. “Text only” models get the text of a PDF, not the file. API prices are the per-token prices in our model catalog as of October 2026 (OpenAI: OpenAI's list price). In llmwise you pay per message, not per token.

Every limit is published. Paid plans also have a monthly fair-use limit on AI cost: Plus $3.75, Pro $7.50, Max $20, Ultra $42, Studio $85. Using every message on your plan at typical sizes stays under it; very large messages and heavy research use it faster. Every limit, explained.

What matters for coding

  • Room for your code

    The more of your code a model can take in at once, the fewer details it has to guess. Context windows are listed below.

  • Reasoning on hard problems

    Models that reason before answering tend to do better on problems with several moving parts, like a bug that crosses files.

  • Running the code

    Code that has been run beats code that looks right. A model that can run and test its own code catches its own mistakes.

  • Cost per try

    Coding means many small tries. A cheap model for quick questions and a stronger one for the hard ones keeps the cost down.

GPT for coding in llmwise

  • Code opens as a document

    Ask for a script or a component and it opens beside the chat as a code document that keeps every version, so you can step back to an earlier one.

  • Run code (Pro and higher plans)

    On Pro and higher plans the model can run Python or Node.js in an isolated sandbox once you approve it, read the output and fix what failed. A run counts as 1 Claude Haiku 4.5 message and stops after 60 seconds.

  • HTML apps run in the chat

    Ask for a calculator, a small tool or a page and it runs live as an HTML app in the side panel.

  • Switch models mid-chat

    Start on a cheaper model; if the answer isn't good enough, switch models in the same chat. The next model sees the whole conversation, so you don't paste anything twice.

In llmwise, a message to GPT goes to its maker, OpenAI, or through OpenRouter when llmwise can't reach the maker directly. See the Privacy Policy.

Tips

  • Paste the exact error and the code that produced it, not just a description.

  • Say which language, version and libraries you use.

  • For a big change, ask for a plan first, then one step at a time.

  • Pick the Coder persona for code-first answers that explain their trade-offs.

  • If a model gets stuck, switch to another in the same chat: it sees the code so far.

Questions

Is GPT good for coding?

In our test runs on November 18, 2026, GPT-6.2 Astra passed 5 of 5, GPT-6 Astra passed 5 of 5, GPT-6.2 Sol passed 5 of 5, GPT-6.1 Sol passed 5 of 5, GPT-6 Sol passed 5 of 5, GPT-6.1 Terra passed 5 of 5, GPT-6 Luna passed 5 of 5 of our coding prompts, against a best result of 5 of 5 among all 27 models. Every reply is published on this page and the methods page, so you can judge them yourself.

Which GPT model should I use for coding?

Start with GPT-6 Luna for quick syntax questions, regexes, small scripts and boilerplate, and move up to GPT-6.2 Astra for large refactors, subtle bugs and design questions where a wrong answer costs you hours.

Can I use GPT for coding for free?

No: there's no free plan or trial. GPT-6.2 Astra and GPT-6 Astra are on Pro; GPT-6.2 Sol, GPT-6.1 Sol, GPT-6 Sol, GPT-6.1 Terra, and GPT-6 Luna are on Plus and Pro. Paid monthly from the day you start. Cancel in two clicks in Settings → Billing.

Can llmwise run the code it writes?

On Pro and higher plans, yes. The model writes Python or Node.js, you approve the run, and it executes in an isolated sandbox with no internet access except package registries, stopping after 60 seconds. It reads the output and can fix what failed. Each run counts as 1 Claude Haiku 4.5 message.

Claude, GPT, Gemini, DeepSeek, Grok, Kimi, GLM, and Mistral, in one chat.

See what a message costs before you send it. Every plan is month to month: cancel in two clicks. Sign in with an email link, no password.