Skip to content

DeepSeek V4.1 Flash · Coding

DeepSeek V4.1 Flash for coding: our test runs

DeepSeek V4.1 Flash ran our 5 coding prompts in llmwise, through the same pipeline your messages take. Here's every reply as it came, whether it passed, what it cost and what it counts as on Pro, next to the other models.

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

Short answer

In our test runs on September 27, 2026, DeepSeek V4.1 Flash passed 5 of 5 of our coding prompts (both hard ones): tied 1st of 15 models. Each reply counted as 1 message on Pro, where it has 60 a day, and cost $0.0011 to run on average.

Prompt by prompt

Each of the 5 coding prompts, and how DeepSeek V4.1 Flash's reply did.

DeepSeek V4.1 Flash on each coding prompt
PromptResultCostTime
Turn a title into a URL slugEverydayPassed: All 7 tests passed.$0.00021.9 s
Parse a duration like “1h 30m”EverydayPassed: All 10 tests passed.$0.00087.8 s
Merge overlapping intervalsEverydayPassed: All 7 tests passed.$0.00011.5 s
Evaluate an arithmetic expression, no evalHardPassed: All 15 tests passed.$0.002810.4 s
Parse CSV with quoted fieldsHardPassed: All 8 tests passed.$0.001311.6 s

Every coding reply from DeepSeek V4.1 Flash

  1. Turn a title into a URL slug

    An everyday prompt: “Turn a title into a URL slug”, in full.

    Passed: All 7 tests passed.

    ```javascript
    function slugify(title) {
      return String(title)
        .normalize("NFD")                 // decompose é -> e +  ́
        .replace(/[\u0300-\u036f]/g, "")  // drop the combining marks
        .toLowerCase()
        .replace(/[^a-z0-9]+/g, "-")      // runs of anything else -> one hyphen
        .replace(/^-+|-+$/g, "");         // trim hyphens
    }
    ```
    
    Notes:
    - `NFD` + stripping U+0300–U+036F handles é, ñ, ü, and most Latin accents. (Letters like `ø` or `ß` have no decomposition and will become hyphens; tell me if you need those mapped too.)
    - The trim uses `^-+|-+$` rather than `^-|-$` so a leading/trailing run of hyphens is removed entirely.

    521 tokens in, 224 out (27 of them reasoning) · 1.9 s · $0.0002 · 1 message on Pro · answered by deepseek/deepseek-v4.1-flash via CoreWeave ·

  2. Parse a duration like “1h 30m”

    An everyday prompt: “Parse a duration like “1h 30m””, in full.

    Passed: All 10 tests passed.

    ```javascript
    function parseDuration(text) {
      if (typeof text !== "string") return null;
    
      const match = /^\s*(?:(\d+)h)?\s*(?:(\d+)m)?\s*(?:(\d+)s)?\s*$/.exec(text);
      if (!match) return null;
    
      const [, h, m, s] = match;
      // Reject empty / whitespace-only input (no part present).
      if (h === undefined && m === undefined && s === undefined) return null;
    
      return Number(h ?? 0) * 3600 + Number(m ?? 0) * 60 + Number(s ?? 0);
    }
    ```

    505 tokens in, 1,128 out (982 of them reasoning) · 7.8 s · $0.0008 · 1 message on Pro · answered by deepseek/deepseek-v4.1-flash via StreamLake ·

  3. Merge overlapping intervals

    An everyday prompt: “Merge overlapping intervals”, in full.

    Passed: All 7 tests passed.

    ```javascript
    function mergeIntervals(intervals) {
      if (intervals.length === 0) return [];
    
      const sorted = intervals
        .map(([start, end]) => [start, end])
        .sort((a, b) => a[0] - b[0] || a[1] - b[1]);
    
      const merged = [sorted[0]];
    
      for (let i = 1; i < sorted.length; i++) {
        const [start, end] = sorted[i];
        const last = merged[merged.length - 1];
    
        if (start <= last[1]) {
          // overlapping or touching (start === last[1]) -> extend
          if (end > last[1]) last[1] = end;
        } else {
          merged.push([start, end]);
        }
      }
    
      return merged;
    }
    ```

    489 tokens in, 199 out (12 of them reasoning) · 1.5 s · $0.0001 · 1 message on Pro · answered by deepseek/deepseek-v4.1-flash via Wafer ·

  4. Evaluate an arithmetic expression, no eval

    A hard prompt: “Evaluate an arithmetic expression, no eval”, in full.

    Passed: All 15 tests passed.

    ```javascript
    function evaluate(expression) {
      if (typeof expression !== 'string') {
        throw new Error('Expression must be a string');
      }
    
      // ---- Tokenizer ----
      const tokens = [];
      let i = 0;
      const isDigit = (c) => c >= '0' && c <= '9';
    
      while (i < expression.length) {
        const ch = expression[i];
    
        if (ch === ' ' || ch === '\t' || ch === '\n' || ch === '\r') {
          i++;
          continue;
        }
    
        if (isDigit(ch) || ch === '.') {
          const start = i;
          let dots = 0;
          while (i < expression.length && (isDigit(expression[i]) || expression[i] === '.')) {
            if (expression[i] === '.') dots++;
            i++;
          }
          const text = expression.slice(start, i);
          if (dots > 1 || text === '.') {
            throw new Error(`Invalid number '${text}'`);
          }
          tokens.push({ type: 'num', value: parseFloat(text) });
          continue;
        }
    
        if ('+-*/^()'.includes(ch)) {
          tokens.push({ type: 'op', value: ch });
          i++;
          continue;
        }
    
        throw new Error(`Invalid character '${ch}'`);
      }
    
      // ---- Parser (recursive descent) ----
      // expr   := term (('+' | '-') term)*
      // term   := unary (('*' | '/') unary)*
      // unary  := ('-' | '+') unary | power
      // power  := primary ('^' unary)?        // right-associative, tighter than unary minus
      // primary:= number | '(' expr ')'
      let pos = 0;
      const peek = () => tokens[pos];
    
      function expr() {
        let value = term();
        while (peek() && peek().type === 'op' && (peek().value === '+' || peek().value === '-')) {
          const op = tokens[pos++].value;
          const rhs = term();
          value = op === '+' ? value + rhs : value - rhs;
        }
        return value;
      }
    
      function term() {
        let value = unary();
        while (peek() && peek().type === 'op' && (peek().value === '*' || peek().value === '/')) {
          const op = tokens[pos++].value;
          const rhs = unary();
          value = op === '*' ? value * rhs : value / rhs;
        }
        return value;
      }
    
      function unary() {
        const t = peek();
        if (t && t.type === 'op' && t.value === '-') {
          pos++;
          return -unary();
        }
        if (t && t.type === 'op' && t.value === '+') {
          pos++;
          return unary();
        }
        return power();
      }
    
      function power() {
        const base = primary();
        if (peek() && peek().type === 'op' && peek().value === '^') {
          pos++;
          const exponent = unary(); // right-associative, allows unary minus after ^
          return Math.pow(base, exponent);
        }
        return base;
      }
    
      function primary() {
        const t = peek();
        if (!t) throw new Error('Unexpected end of expression');
    
        if (t.type === 'num') {
          pos++;
          return t.value;
        }
    
        if (t.type === 'op' && t.value === '(') {
          pos++;
          const value = expr();
          const closing = peek();
          if (!closing || closing.type !== 'op' || closing.value !== ')') {
            throw new Error("Expected ')'");
          }
          pos++;
          return value;
        }
    
        throw new Error(`Unexpected token '${t.value}'`);
      }
    
      const result = expr();
      if (pos !== tokens.length) {
        throw new Error(`Unexpected token '${tokens[pos].value}'`);
      }
      return result;
    }
    ```

    591 tokens in, 2,216 out (1,331 of them reasoning) · 10.4 s · $0.0028 · 1 message on Pro · answered by deepseek/deepseek-v4.1-flash via Parasail ·

  5. Parse CSV with quoted fields

    A hard prompt: “Parse CSV with quoted fields”, in full.

    Passed: All 8 tests passed.

    ```javascript
    function parseCsv(text) {
      if (text === '') return [];
    
      const rows = [];
      let row = [];
      let field = '';
      let inQuotes = false;
      let atFieldStart = true;
      let i = 0;
      const n = text.length;
    
      const endField = () => {
        row.push(field);
        field = '';
        atFieldStart = true;
      };
    
      const endRow = () => {
        endField();
        rows.push(row);
        row = [];
      };
    
      while (i < n) {
        const ch = text[i];
    
        if (inQuotes) {
          if (ch === '"') {
            if (text[i + 1] === '"') {
              field += '"';
              i += 2;
            } else {
              inQuotes = false;
              i += 1;
            }
          } else {
            field += ch;
            i += 1;
          }
          continue;
        }
    
        if (ch === '"' && atFieldStart) {
          inQuotes = true;
          atFieldStart = false;
          i += 1;
          continue;
        }
    
        if (ch === ',') {
          endField();
          i += 1;
          continue;
        }
    
        if (ch === '\r' && text[i + 1] === '\n') {
          endRow();
          i += 2;
          continue;
        }
    
        if (ch === '\n') {
          endRow();
          i += 1;
          continue;
        }
    
        field += ch;
        atFieldStart = false;
        i += 1;
      }
    
      if (row.length > 0 || field !== '') {
        endRow();
      }
    
      return rows;
    }
    ```

    522 tokens in, 1,914 out (1,537 of them reasoning) · 11.6 s · $0.0013 · 1 message on Pro · answered by deepseek/deepseek-v4.1-flash via StreamLake ·

How it compares on coding

DeepSeek V4.1 Flash beside the job's picks among every model. 13 models share the hard-problems pick, DeepSeek V4.1 Flash among them.

DeepSeek V4.1 Flash beside other models on coding
ModelPassedOn ProCost per reply
GLM 5.3Our pick: hard problems (shared), best value5 of 5250 a month on Pro$0.0015
GLM 5.3 FlashOur pick: hard problems (shared), everyday5 of 560 a day on Pro$0.0003
DeepSeek V4.1 FlashOur pick: hard problems (shared)5 of 560 a day on Pro$0.0011
On Pro: Pro's count on each model. Cost: what OpenRouter charged us per reply, on average.

Every limit is published. Paid plans also have a monthly fair-use limit on AI cost: 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.

How these runs were done

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.

How the runs were done, and every coding prompt.

DeepSeek V4.1 Flash, and coding, elsewhere

Questions

Is DeepSeek V4.1 Flash good for coding?

In our test runs it passed 5 of 5 coding prompts, tied 1st of the 15 models in llmwise. Every reply is on this page, so you can judge them yourself.

How many of my messages does a coding reply from DeepSeek V4.1 Flash use?

1 message each on Pro, where it has 60 a day on Pro. The price of a message is fixed and shown before you send it, however long the reply.

How were these runs done?

The same way for every model: each prompt sent through llmwise's own pipeline, each reply checked the same way. The methods page has every prompt and how each is scored.

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

See what a message costs before you send it. Free is 5 messages to try; sign in with an email link, no password or card.