DeepSeek V4.1 Flash 1017: speed, pricing and coding tests

36 official API attempts: both text modes pass 15/15, with 1.113s and 0.661s median first-content latency. Includes two coding failures, parameters and raw answers.

Updated: 2026-10-18

Original testing and analysis by TOKRACE · Tested October 18, 2026.

The result: short tasks pass; code still needs edge-case tests

TOKRACE made 36 direct requests to the official DeepSeek API on October 18, 2026: 15 Chinese text tasks in each of two modes, plus 3 JavaScript tasks in each mode. No retries or failed attempts were discarded.

Both text groups passed 15/15. Median time to first answer content was 1.113s with default thinking and 0.661s with thinking disabled. Both coding groups passed 2/3 tasks. The money parser exposed a budget-exhaustion failure and an incorrect leading-zero restriction.

Our practical reading: disabling thinking is worth trying for fixed-format extraction, while generated code still needs business-specific edge-case tests and explicit handling of incomplete outputs. These small tasks do not measure general reasoning, full-repository coding or agent quality.

What is DeepSeek V4.1 Flash 1017?

The October 17 update uses the existing API alias deepseek-flash. That is also the model field returned in our responses. Checkpoint attribution relies on the official change log; this mutable alias does not permanently pin a checkpoint.

Official specifications list 1M context, 384K maximum output, image input and tools. The weights have an MIT license. These are source claims; our tests cover short text and functions only. Specifications · Model card

The expired September preview ID deepseek-v4.1-flash-expires-on-0910 is a separate historical entry. Use the current model page.

What changed in the vendor benchmarks?

These are vendor-reported results, not TOKRACE replications.

BenchmarkSeptember1017
Terminal-Bench 4.031.242.3
DeepSWE v1.174.277.0
ProgramBench20.329.1

DeepSeek also reports shorter task runtimes and outputs. Terminal-Bench used Claude Code; DeepSWE used Mini-SWE-V2. We have no pinned September endpoint and cannot measure improvement over that checkpoint. Official table and methodology notes

Method: fixed tasks, request parameters and measurement path

The versioned suite tasks-2026-09-26.1 contains 5 extraction, 5 instruction-format and 5 grounded-QA tasks, all in Chinese. Each gets one attempt per mode, with alternating mode order. Prompts, expected answers and checks were fixed before requests. Code tasks cover money parsing, stable deduplication and interval merging.

A local macOS client called https://api.deepseek.com/v1/chat/completions sequentially with streaming and a 120-second timeout. Egress and provider region are unverified. These results remain separate from Hong Kong standard reports and community speed telemetry.

Requests submitted temperature=0; text output budgets were 2048 tokens and coding budgets 4096. The default group omitted thinking settings; the other sent thinking: {type: "disabled"}. Official defaults enable thinking at high effort and ignore temperature in thinking mode. This is not deterministic sampling. Thinking documentation

First-content timing starts before the request and stops at the first nonempty answer delta, excluding reasoning. Total time ends at stream completion. We do not infer answer throughput from completion tokens. Cache state, network buffering and upstream load were uncontrolled.

Measured results: pass rate, latency and tokens

Text metric (15 attempts per mode)Default thinkingThinking disabled
JSON extraction5/55/5
Instruction format5/55/5
Grounded QA5/55/5
Median first answer content1.113s0.661s
Median total request time1.153s0.780s
Total completion tokens1145214
Reported reasoning tokens920Disabled; field absent

Completion tokens include reasoning, not just visible answers. Token accounting and context wrapping can differ between modes. This is a small observational test, not an isolated performance experiment. The suite has limited task diversity and no repeated sampling to estimate stability.

Coding failures: a leading zero and an exhausted budget

TaskDefault thinkingThinking disabled
Parse money into integer centsTruncated; no codeCompleted; failed checks
Stable deduplication by idPassedPassed
Merge closed intervals without mutationPassedPassed

Thinking disabled: "0001.02" should produce 102. The generated regex only permits a single zero or a nonzero starting digit, returning null instead. Leading zeros were never prohibited by the prompt. Prompt, code and checks

Default thinking: the money task ended with finish_reason=length after 18.646 seconds. All 4096 completion tokens were reported as reasoning, with an empty answer. Its 18 planned checks were not run. This establishes failure under this budget, not inability with a larger budget. Original attempt

Each mode has 26 predetermined checks: 18 for money, 3 for deduplication and 5 for intervals. The checker stops at its first failure. Unexecuted checks are not counted as passed. We report task-level 2/3 per mode rather than an invented assertion-level pass rate.

API pricing and the cost of this run

DeepSeek says pricing is unchanged. These are USD per million tokens, checked October 18, 2026.

Billing categoryOff-peakPeak
Cached input0.0030.006
Uncached input0.150.30
Output0.601.20

All 36 calls ran on Sunday. Applying off-peak prices to the returned input/cache/output usage gives $0.004595, including the truncated failure. This is an estimate, not an invoice. No Search/Fetch calls were made. Official pricing rules

TOKRACE trial quotas are separate from upstream billing. The free rerun uses the site's existing allowance; upstream use is charged to the corresponding credential.

FAQ and reproduction

Which API model ID should I use? deepseek-flash. The full display version DeepSeek-V4.1-Flash-1017 was not the request model ID in this test.

Does this prove improvement over September? No. Vendor benchmarks and our original tests are labeled separately. We did not test long context, vision, tools or repository-scale development and have no matched old-version baseline.

How can I rerun it? The button below loads the first extraction task, default thinking configuration and official endpoint in the arena. It sends a model request only after you press Start. The shared trial uses server-controlled default thinking. Reproducing the disabled group requires your own official API key and the recorded thinking.type=disabled parameter. Download the prompts, request bodies, usage, original answers and code checks below.

See the method and limitations, all reports and model identity.

Original prompts, answers and checks

Download all 36 attempts (JSON)

Contact extraction 1 · Default thinking · Passed

2026-10-18T01:55:12.653Z · Total time:1.421s · First content:1.293s · Input / total completion / reasoning tokens:105 / 136 / 117 · Finish reason:stop

Prompt

从以下资料提取联系信息。只输出一个 JSON 对象,恰好包含 name、age、city、email 四个字段;age 为数字,未提供的 email 为 null。不要 Markdown 或解释。
资料:林桐,28 岁,目前居住在杭州。未提供电子邮件。历史备注提到曾在北京出差,不是现居城市。

Original answer

{"name":"林桐","age":28,"city":"杭州","email":null}
Contact extraction 1 · Thinking disabled · Passed

2026-10-18T01:55:14.076Z · Total time:0.764s · First content:0.646s · Input / total completion / reasoning tokens:79 / 18 / — · Finish reason:stop

Prompt

从以下资料提取联系信息。只输出一个 JSON 对象,恰好包含 name、age、city、email 四个字段;age 为数字,未提供的 email 为 null。不要 Markdown 或解释。
资料:林桐,28 岁,目前居住在杭州。未提供电子邮件。历史备注提到曾在北京出差,不是现居城市。

Original answer

{"name":"林桐","age":28,"city":"杭州","email":null}
Contact extraction 2 · Thinking disabled · Passed

2026-10-18T01:55:14.841Z · Total time:0.658s · First content:0.513s · Input / total completion / reasoning tokens:81 / 20 / — · Finish reason:stop

Prompt

从以下资料提取联系信息。只输出一个 JSON 对象,恰好包含 name、age、city、email 四个字段;age 为数字,未提供的 email 为 null。不要 Markdown 或解释。
资料:李明,36 岁,目前居住在成都。电子邮件为 li@example.test。历史备注提到曾在北京出差,不是现居城市。

Original answer

{"name":"李明","age":36,"city":"成都","email":"li@example.test"}
Contact extraction 2 · Default thinking · Passed

2026-10-18T01:55:15.500Z · Total time:1.153s · First content:1.106s · Input / total completion / reasoning tokens:107 / 68 / 47 · Finish reason:stop

Prompt

从以下资料提取联系信息。只输出一个 JSON 对象,恰好包含 name、age、city、email 四个字段;age 为数字,未提供的 email 为 null。不要 Markdown 或解释。
资料:李明,36 岁,目前居住在成都。电子邮件为 li@example.test。历史备注提到曾在北京出差,不是现居城市。

Original answer

{"name":"李明","age":36,"city":"成都","email":"li@example.test"}
Contact extraction 3 · Default thinking · Passed

2026-10-18T01:55:16.653Z · Total time:0.827s · First content:0.777s · Input / total completion / reasoning tokens:105 / 66 / 47 · Finish reason:stop

Prompt

从以下资料提取联系信息。只输出一个 JSON 对象,恰好包含 name、age、city、email 四个字段;age 为数字,未提供的 email 为 null。不要 Markdown 或解释。
资料:陈夏,22 岁,目前居住在南京。未提供电子邮件。历史备注提到曾在北京出差,不是现居城市。

Original answer

{"name":"陈夏","age":22,"city":"南京","email":null}
Contact extraction 3 · Thinking disabled · Passed

2026-10-18T01:55:17.481Z · Total time:0.675s · First content:0.577s · Input / total completion / reasoning tokens:79 / 18 / — · Finish reason:stop

Prompt

从以下资料提取联系信息。只输出一个 JSON 对象,恰好包含 name、age、city、email 四个字段;age 为数字,未提供的 email 为 null。不要 Markdown 或解释。
资料:陈夏,22 岁,目前居住在南京。未提供电子邮件。历史备注提到曾在北京出差,不是现居城市。

Original answer

{"name":"陈夏","age":22,"city":"南京","email":null}
Contact extraction 4 · Thinking disabled · Passed

2026-10-18T01:55:18.157Z · Total time:0.588s · First content:0.487s · Input / total completion / reasoning tokens:83 / 21 / — · Finish reason:stop

Prompt

从以下资料提取联系信息。只输出一个 JSON 对象,恰好包含 name、age、city、email 四个字段;age 为数字,未提供的 email 为 null。不要 Markdown 或解释。
资料:周舟,41 岁,目前居住在苏州。电子邮件为 zhou@example.test。历史备注提到曾在北京出差,不是现居城市。

Original answer

{"name":"周舟","age":41,"city":"苏州","email":"zhou@example.test"}
Contact extraction 4 · Default thinking · Passed

2026-10-18T01:55:18.747Z · Total time:1.334s · First content:1.255s · Input / total completion / reasoning tokens:109 / 103 / 81 · Finish reason:stop

Prompt

从以下资料提取联系信息。只输出一个 JSON 对象,恰好包含 name、age、city、email 四个字段;age 为数字,未提供的 email 为 null。不要 Markdown 或解释。
资料:周舟,41 岁,目前居住在苏州。电子邮件为 zhou@example.test。历史备注提到曾在北京出差,不是现居城市。

Original answer

{"name":"周舟","age":41,"city":"苏州","email":"zhou@example.test"}
Contact extraction 5 · Default thinking · Passed

2026-10-18T01:55:20.082Z · Total time:0.795s · First content:0.734s · Input / total completion / reasoning tokens:105 / 63 / 44 · Finish reason:stop

Prompt

从以下资料提取联系信息。只输出一个 JSON 对象,恰好包含 name、age、city、email 四个字段;age 为数字,未提供的 email 为 null。不要 Markdown 或解释。
资料:吴雨,30 岁,目前居住在武汉。未提供电子邮件。历史备注提到曾在北京出差,不是现居城市。

Original answer

{"name":"吴雨","age":30,"city":"武汉","email":null}
Contact extraction 5 · Thinking disabled · Passed

2026-10-18T01:55:20.879Z · Total time:0.766s · First content:0.575s · Input / total completion / reasoning tokens:79 / 18 / — · Finish reason:stop

Prompt

从以下资料提取联系信息。只输出一个 JSON 对象,恰好包含 name、age、city、email 四个字段;age 为数字,未提供的 email 为 null。不要 Markdown 或解释。
资料:吴雨,30 岁,目前居住在武汉。未提供电子邮件。历史备注提到曾在北京出差,不是现居城市。

Original answer

{"name":"吴雨","age":30,"city":"武汉","email":null}
Stable deduplication · Thinking disabled · Passed

2026-10-18T01:55:21.645Z · Total time:0.701s · First content:0.655s · Input / total completion / reasoning tokens:44 / 8 / — · Finish reason:stop

Prompt

把以下编号去重并保持首次出现的顺序:B2,A1,B2,C3,A1,D4。只输出用英文逗号连接的编号,不要空格、标题或解释。

Original answer

B2,A1,C3,D4
Stable deduplication · Default thinking · Passed

2026-10-18T01:55:22.347Z · Total time:1.199s · First content:1.169s · Input / total completion / reasoning tokens:70 / 49 / 40 · Finish reason:stop

Prompt

把以下编号去重并保持首次出现的顺序:B2,A1,B2,C3,A1,D4。只输出用英文逗号连接的编号,不要空格、标题或解释。

Original answer

B2,A1,C3,D4
Exact fields · Default thinking · Passed

2026-10-18T01:55:23.547Z · Total time:1.046s · First content:1.019s · Input / total completion / reasoning tokens:73 / 39 / 29 · Finish reason:stop

Prompt

仅输出 JSON 对象,且恰好包含 status 和 count 两个字段。status 的值必须为字符串 "ready",count 必须为数字 3。不要 Markdown、解释或额外字段。

Original answer

{"status":"ready","count":3}
Exact fields · Thinking disabled · Passed

2026-10-18T01:55:24.595Z · Total time:0.841s · First content:0.816s · Input / total completion / reasoning tokens:47 / 9 / — · Finish reason:stop

Prompt

仅输出 JSON 对象,且恰好包含 status 和 count 两个字段。status 的值必须为字符串 "ready",count 必须为数字 3。不要 Markdown、解释或额外字段。

Original answer

{"status":"ready","count":3}
Ordered output · Thinking disabled · Passed

2026-10-18T01:55:25.437Z · Total time:0.780s · First content:0.674s · Input / total completion / reasoning tokens:36 / 9 / — · Finish reason:stop

Prompt

将数值 12、3、25、8 按从小到大排序。只输出 JSON 数组,元素为数字。不要解释或代码围栏。

Original answer

[3,8,12,25]
Ordered output · Default thinking · Passed

2026-10-18T01:55:26.217Z · Total time:1.106s · First content:1.053s · Input / total completion / reasoning tokens:62 / 47 / 37 · Finish reason:stop

Prompt

将数值 12、3、25、8 按从小到大排序。只输出 JSON 数组,元素为数字。不要解释或代码围栏。

Original answer

[3,8,12,25]
Case and line breaks · Default thinking · Passed

2026-10-18T01:55:27.325Z · Total time:1.058s · First content:1.053s · Input / total completion / reasoning tokens:66 / 37 / 28 · Finish reason:stop

Prompt

按原顺序将 apple、pear、plum 转为英文大写,每行一个单词。总共三行,不要编号、标点、空行或解释。

Original answer

APPLE
PEAR
PLUM
Case and line breaks · Thinking disabled · Passed

2026-10-18T01:55:28.383Z · Total time:0.838s · First content:0.716s · Input / total completion / reasoning tokens:40 / 8 / — · Finish reason:stop

Prompt

按原顺序将 apple、pear、plum 转为英文大写,每行一个单词。总共三行,不要编号、标点、空行或解释。

Original answer

APPLE
PEAR
PLUM
Required delimiter · Thinking disabled · Passed

2026-10-18T01:55:29.221Z · Total time:0.628s · First content:0.515s · Input / total completion / reasoning tokens:54 / 11 / — · Finish reason:stop

Prompt

提取下面三个工单号,保持顺序:工单 TX-103 已关闭;工单 TX-207 正在处理;工单 TX-309 待分配。只用英文竖线连接三个编号,不要空格或解释。

Original answer

TX-103|TX-207|TX-309
Required delimiter · Default thinking · Passed

2026-10-18T01:55:29.850Z · Total time:1.476s · First content:1.471s · Input / total completion / reasoning tokens:80 / 84 / 72 · Finish reason:stop

Prompt

提取下面三个工单号,保持顺序:工单 TX-103 已关闭;工单 TX-207 正在处理;工单 TX-309 待分配。只用英文竖线连接三个编号,不要空格或解释。

Original answer

TX-103|TX-207|TX-309
Grounded question answering 1 · Default thinking · Passed

2026-10-18T01:55:31.328Z · Total time:1.336s · First content:1.334s · Input / total completion / reasoning tokens:130 / 95 / 80 · Finish reason:stop

Prompt

只根据以下材料回答。输出恰好包含 usable、nextDelivery、manager 三个字段的 JSON 对象,不要额外文字。usable 是可用件数(数字),nextDelivery 是下一次送货时间(字符串),材料未说明的信息用 null,不能猜测。
材料:北区仓库今天收到 12 件货物,其中 3 件损坏,不可使用。下一次送货安排在周二。仓库负责人姓名没有记载。旧计划曾写周日,已作废。

Original answer

{"usable":9,"nextDelivery":"周二","manager":null}
Grounded question answering 1 · Thinking disabled · Passed

2026-10-18T01:55:32.665Z · Total time:0.870s · First content:0.866s · Input / total completion / reasoning tokens:104 / 14 / — · Finish reason:stop

Prompt

只根据以下材料回答。输出恰好包含 usable、nextDelivery、manager 三个字段的 JSON 对象,不要额外文字。usable 是可用件数(数字),nextDelivery 是下一次送货时间(字符串),材料未说明的信息用 null,不能猜测。
材料:北区仓库今天收到 12 件货物,其中 3 件损坏,不可使用。下一次送货安排在周二。仓库负责人姓名没有记载。旧计划曾写周日,已作废。

Original answer

{"usable":9,"nextDelivery":"周二","manager":null}
Grounded question answering 2 · Thinking disabled · Passed

2026-10-18T01:55:33.537Z · Total time:0.826s · First content:0.697s · Input / total completion / reasoning tokens:103 / 18 / — · Finish reason:stop

Prompt

只根据以下材料回答。输出恰好包含 usable、nextDelivery、manager 三个字段的 JSON 对象,不要额外文字。usable 是可用件数(数字),nextDelivery 是下一次送货时间(字符串),材料未说明的信息用 null,不能猜测。
材料:南区仓库今天收到 20 件货物,其中 4 件损坏,不可使用。下一次送货安排在周三。仓库负责人姓名没有记载。旧计划曾写周日,已作废。

Original answer

{"usable": 16, "nextDelivery": "周三", "manager": null}
Grounded question answering 2 · Default thinking · Passed

2026-10-18T01:55:34.364Z · Total time:1.315s · First content:1.260s · Input / total completion / reasoning tokens:129 / 130 / 115 · Finish reason:stop

Prompt

只根据以下材料回答。输出恰好包含 usable、nextDelivery、manager 三个字段的 JSON 对象,不要额外文字。usable 是可用件数(数字),nextDelivery 是下一次送货时间(字符串),材料未说明的信息用 null,不能猜测。
材料:南区仓库今天收到 20 件货物,其中 4 件损坏,不可使用。下一次送货安排在周三。仓库负责人姓名没有记载。旧计划曾写周日,已作废。

Original answer

{"usable":16,"nextDelivery":"周三","manager":null}
Grounded question answering 3 · Default thinking · Passed

2026-10-18T01:55:35.680Z · Total time:1.044s · First content:1.020s · Input / total completion / reasoning tokens:130 / 58 / 43 · Finish reason:stop

Prompt

只根据以下材料回答。输出恰好包含 usable、nextDelivery、manager 三个字段的 JSON 对象,不要额外文字。usable 是可用件数(数字),nextDelivery 是下一次送货时间(字符串),材料未说明的信息用 null,不能猜测。
材料:东区仓库今天收到 18 件货物,其中 6 件损坏,不可使用。下一次送货安排在周四。仓库负责人姓名没有记载。旧计划曾写周日,已作废。

Original answer

{"usable":12,"nextDelivery":"周四","manager":null}
Grounded question answering 3 · Thinking disabled · Passed

2026-10-18T01:55:36.726Z · Total time:0.819s · First content:0.661s · Input / total completion / reasoning tokens:104 / 14 / — · Finish reason:stop

Prompt

只根据以下材料回答。输出恰好包含 usable、nextDelivery、manager 三个字段的 JSON 对象,不要额外文字。usable 是可用件数(数字),nextDelivery 是下一次送货时间(字符串),材料未说明的信息用 null,不能猜测。
材料:东区仓库今天收到 18 件货物,其中 6 件损坏,不可使用。下一次送货安排在周四。仓库负责人姓名没有记载。旧计划曾写周日,已作废。

Original answer

{"usable":12,"nextDelivery":"周四","manager":null}
Grounded question answering 4 · Thinking disabled · Passed

2026-10-18T01:55:37.546Z · Total time:1.166s · First content:1.022s · Input / total completion / reasoning tokens:104 / 14 / — · Finish reason:stop

Prompt

只根据以下材料回答。输出恰好包含 usable、nextDelivery、manager 三个字段的 JSON 对象,不要额外文字。usable 是可用件数(数字),nextDelivery 是下一次送货时间(字符串),材料未说明的信息用 null,不能猜测。
材料:西区仓库今天收到 25 件货物,其中 5 件损坏,不可使用。下一次送货安排在周五。仓库负责人姓名没有记载。旧计划曾写周日,已作废。

Original answer

{"usable":20,"nextDelivery":"周五","manager":null}
Grounded question answering 4 · Default thinking · Passed

2026-10-18T01:55:38.713Z · Total time:1.136s · First content:1.113s · Input / total completion / reasoning tokens:130 / 67 / 52 · Finish reason:stop

Prompt

只根据以下材料回答。输出恰好包含 usable、nextDelivery、manager 三个字段的 JSON 对象,不要额外文字。usable 是可用件数(数字),nextDelivery 是下一次送货时间(字符串),材料未说明的信息用 null,不能猜测。
材料:西区仓库今天收到 25 件货物,其中 5 件损坏,不可使用。下一次送货安排在周五。仓库负责人姓名没有记载。旧计划曾写周日,已作废。

Original answer

{"usable":20,"nextDelivery":"周五","manager":null}
Grounded question answering 5 · Default thinking · Passed

2026-10-18T01:55:39.850Z · Total time:2.686s · First content:2.672s · Input / total completion / reasoning tokens:130 / 103 / 88 · Finish reason:stop

Prompt

只根据以下材料回答。输出恰好包含 usable、nextDelivery、manager 三个字段的 JSON 对象,不要额外文字。usable 是可用件数(数字),nextDelivery 是下一次送货时间(字符串),材料未说明的信息用 null,不能猜测。
材料:中区仓库今天收到 16 件货物,其中 2 件损坏,不可使用。下一次送货安排在周一。仓库负责人姓名没有记载。旧计划曾写周日,已作废。

Original answer

{"usable":14,"nextDelivery":"周一","manager":null}
Grounded question answering 5 · Thinking disabled · Passed

2026-10-18T01:55:42.538Z · Total time:0.887s · First content:0.772s · Input / total completion / reasoning tokens:104 / 14 / — · Finish reason:stop

Prompt

只根据以下材料回答。输出恰好包含 usable、nextDelivery、manager 三个字段的 JSON 对象,不要额外文字。usable 是可用件数(数字),nextDelivery 是下一次送货时间(字符串),材料未说明的信息用 null,不能猜测。
材料:中区仓库今天收到 16 件货物,其中 2 件损坏,不可使用。下一次送货安排在周一。仓库负责人姓名没有记载。旧计划曾写周日,已作废。

Original answer

{"usable":14,"nextDelivery":"周一","manager":null}
Money parsing without rounding invalid inputs · Thinking disabled · Not passed · 18 planned checks

2026-10-18T01:55:43.425Z · Total time:1.034s · First content:0.938s · Finish reason:stop

Input / total completion / reasoning tokens:106 / 141 / —

Prompt

写 JavaScript 函数 parseCents(value)。value 必须是字符串:允许两端空白;只接受非负十进制金额,整数部分至少一位,小数最多两位;拒绝指数写法、符号、千分位、Infinity、空串、超过两位小数。返回整数分数,超过 Number.MAX_SAFE_INTEGER 则返回 null。非法类型或格式返回 null。不能把非法值四舍五入成合法值。只输出函数代码,不要 Markdown 或解释。

Original code

function parseCents(value) {
  if (typeof value !== "string") return null;
  const s = value.trim();
  if (s === "") return null;
  if (!/^(?:0|[1-9]\d*)(?:\.\d{1,2})?$/.test(s)) return null;
  const parts = s.split(".");
  const whole = parts[0];
  const frac = parts[1] || "";
  const centsStr = whole + (frac + "00").slice(0, 2);
  const cents = Number(centsStr);
  if (!Number.isSafeInteger(cents)) return null;
  return cents;
}

Executable checks

const cases=[['0',0],[' 12.30 ',1230],['0.29',29],['1.2',120],['0001.02',102],['1.234',null],['-1',null],['+1',null],['1e3',null],['',null],['.5',null],['1.',null],['Infinity',null],['1,000',null],[null,null],[1,null],['90071992547409.91',9007199254740991],['90071992547409.92',null]]; for (const [input,want] of cases) if(parseCents(input)!==want) throw Error('Failed '+JSON.stringify(input));

Failed "0001.02"

Money parsing without rounding invalid inputs · Default thinking · Truncated; checks not run · 18 planned checks

2026-10-18T01:55:44.464Z · Total time:18.646s · First content:— · Finish reason:length

Input / total completion / reasoning tokens:132 / 4096 / 4096

Prompt

写 JavaScript 函数 parseCents(value)。value 必须是字符串:允许两端空白;只接受非负十进制金额,整数部分至少一位,小数最多两位;拒绝指数写法、符号、千分位、Infinity、空串、超过两位小数。返回整数分数,超过 Number.MAX_SAFE_INTEGER 则返回 null。非法类型或格式返回 null。不能把非法值四舍五入成合法值。只输出函数代码,不要 Markdown 或解释。

Original code

Executable checks

const cases=[['0',0],[' 12.30 ',1230],['0.29',29],['1.2',120],['0001.02',102],['1.234',null],['-1',null],['+1',null],['1e3',null],['',null],['.5',null],['1.',null],['Infinity',null],['1,000',null],[null,null],[1,null],['90071992547409.91',9007199254740991],['90071992547409.92',null]]; for (const [input,want] of cases) if(parseCents(input)!==want) throw Error('Failed '+JSON.stringify(input));

Incomplete response; checks not run

Stable deduplication with special property names · Default thinking · Passed · 3 planned checks

2026-10-18T01:56:03.112Z · Total time:1.421s · First content:1.263s · Finish reason:stop

Input / total completion / reasoning tokens:102 / 228 / 164

Prompt

写 JavaScript 函数 uniqueById(items)。items 是对象数组,每个对象有字符串 id 字段。保留每个 id 首次出现的原对象和原顺序,不修改输入或任何对象;空数组返回空数组。id 可为 __proto__、constructor 或空字符串。只输出函数代码,不要 Markdown 或解释。

Original code

function uniqueById(items) {
  const seen = new Map();
  const result = [];
  for (const item of items) {
    const id = item.id;
    if (!seen.has(id)) {
      seen.set(id, true);
      result.push(item);
    }
  }
  return result;
}

Executable checks

const a={id:'__proto__',value:1},b={id:'constructor'},c={id:''},d={id:'x'};const input=Object.freeze([a,b,{id:'__proto__'},c,{id:''},d,{id:'constructor'}]);const got=uniqueById(input);if(got.length!==4||got[0]!==a||got[1]!==b||got[2]!==c||got[3]!==d)throw Error('Wrong identity or order');if(uniqueById([]).length!==0)throw Error('Empty');if(input.length!==7||a.value!==1)throw Error('Mutation');
Stable deduplication with special property names · Thinking disabled · Passed · 3 planned checks

2026-10-18T01:56:04.536Z · Total time:0.633s · First content:0.528s · Finish reason:stop

Input / total completion / reasoning tokens:76 / 61 / —

Prompt

写 JavaScript 函数 uniqueById(items)。items 是对象数组,每个对象有字符串 id 字段。保留每个 id 首次出现的原对象和原顺序,不修改输入或任何对象;空数组返回空数组。id 可为 __proto__、constructor 或空字符串。只输出函数代码,不要 Markdown 或解释。

Original code

function uniqueById(items) {
  const seen = new Set();
  const result = [];
  for (const item of items) {
    const id = item.id;
    if (!seen.has(id)) {
      seen.add(id);
      result.push(item);
    }
  }
  return result;
}

Executable checks

const a={id:'__proto__',value:1},b={id:'constructor'},c={id:''},d={id:'x'};const input=Object.freeze([a,b,{id:'__proto__'},c,{id:''},d,{id:'constructor'}]);const got=uniqueById(input);if(got.length!==4||got[0]!==a||got[1]!==b||got[2]!==c||got[3]!==d)throw Error('Wrong identity or order');if(uniqueById([]).length!==0)throw Error('Empty');if(input.length!==7||a.value!==1)throw Error('Mutation');
Interval merging, touching intervals and immutability · Thinking disabled · Passed · 5 planned checks

2026-10-18T01:56:05.173Z · Total time:1.370s · First content:0.826s · Finish reason:stop

Input / total completion / reasoning tokens:81 / 178 / —

Prompt

写 JavaScript 函数 mergeIntervals(intervals)。输入为有限数字组成的闭区间 [start,end] 数组,保证 start<=end,输入可能乱序。返回按 start 排序的合并闭区间,相接区间也合并;不要修改输入或任何内层数组,空数组返回空数组。只输出函数代码,不要 Markdown 或解释。

Original code

function mergeIntervals(intervals) {
  if (!Array.isArray(intervals) || intervals.length === 0) return [];
  const sorted = intervals
    .map(([start, end]) => [start, end])
    .sort((a, b) => a[0] - b[0] || a[1] - b[1]);
  const result = [];
  for (const [start, end] of sorted) {
    if (result.length === 0) {
      result.push([start, end]);
    } else {
      const last = result[result.length - 1];
      if (start <= last[1]) {
        if (end > last[1]) last[1] = end;
      } else {
        result.push([start, end]);
      }
    }
  }
  return result;
}

Executable checks

const cases=[[[[5,7],[1,3],[3,5]],[[1,7]]],[[[1,4],[2,3]],[[1,4]]],[[[0,0],[2,2]],[[0,0],[2,2]]],[[[-3,-1],[-2,0],[3,4]],[[-3,0],[3,4]]],[[],[]]];for(const [input,want] of cases){input.forEach(Object.freeze);Object.freeze(input);if(JSON.stringify(mergeIntervals(input))!==JSON.stringify(want))throw Error('Wrong merge');}
Interval merging, touching intervals and immutability · Default thinking · Passed · 5 planned checks

2026-10-18T01:56:06.547Z · Total time:3.999s · First content:3.507s · Finish reason:stop

Input / total completion / reasoning tokens:107 / 777 / 605

Prompt

写 JavaScript 函数 mergeIntervals(intervals)。输入为有限数字组成的闭区间 [start,end] 数组,保证 start<=end,输入可能乱序。返回按 start 排序的合并闭区间,相接区间也合并;不要修改输入或任何内层数组,空数组返回空数组。只输出函数代码,不要 Markdown 或解释。

Original code

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 = [];

  for (const [start, end] of sorted) {
    if (merged.length === 0) {
      merged.push([start, end]);
    } else {
      const last = merged[merged.length - 1];
      if (start <= last[1]) {
        if (end > last[1]) last[1] = end;
      } else {
        merged.push([start, end]);
      }
    }
  }

  return merged;
}

Executable checks

const cases=[[[[5,7],[1,3],[3,5]],[[1,7]]],[[[1,4],[2,3]],[[1,4]]],[[[0,0],[2,2]],[[0,0],[2,2]]],[[[-3,-1],[-2,0],[3,4]],[[-3,0],[3,4]]],[[],[]]];for(const [input,want] of cases){input.forEach(Object.freeze);Object.freeze(input);if(JSON.stringify(mergeIntervals(input))!==JSON.stringify(want))throw Error('Wrong merge');}