Ask a coding agent to fix a bug and it may call the model several times while it finds the relevant files, edits the code, and reads test results. The latency of an individual response tells you little about how long the entire task takes. To evaluate DeepSeek V4.1 Flash 1017, track the fraction of tasks that pass their tests, end-to-end runtime, and the token cost of each request.
The model behind the same API name

DeepSeek released V4.1 Flash on September 10, 2026 and updated its web, app, and API to DeepSeek-V4.1-Flash-1017 on October 17. The first-party API still takes deepseek-flash as the model name. The October update kept the API calling convention and rates the same. It still accepts deepseek-v4-flash and deepseek-v4-flash-vision-exp for compatibility, and both legacy names currently route to 1017.
This affects reproducibility. September and November logs that both say deepseek-flash may describe different model releases. Record the run date, provider, reasoning settings, and harness version alongside the API name so you can trace changes in behavior.
The official Flash API documents a context of 1 million tokens and a maximum output of 384,000 tokens. Context is the span of tokens available to the model in one request. The Flash API also supports image understanding and tool calls. These are API limits and capabilities. The length and quality of an actual coding run also depend on which files and execution history the harness provides.
Reading benchmarks in terms of real tasks
These figures come from DeepSeek's model card. The table pairs the same benchmarks for the September and 1017 releases. The last column is the difference in reported score points.
| Benchmark | V4.1 Flash | 1017 | Change |
|---|---|---|---|
| Terminal-Bench 4.0 | 31.2 | 42.3 | +11.1 |
| DeepSWE v1.1 | 74.2 | 77.0 | +2.8 |
| ProgramBench | 20.3 | 29.1 | +8.8 |
Among these three results, the largest gain is on Terminal-Bench 4.0, which evaluates problem solving in terminal environments. DeepSWE v1.1, a software engineering benchmark, also improves by a smaller margin. Averaging these results can hide what changed on tasks closest to your own. The figures are DeepSeek's published results. They were not independently reproduced for this note.
A harness is the runtime that determines which files an agent can read, which commands it can execute, and how to pass results back to the model. When a test fails, for example, the harness can return the error log so the model can propose another edit. Tool permissions or test timeouts can change the number of attempts and the completion rate even with the same model.

DeepSeek says it used reinforcement learning with self-feedback to improve end-to-end project development and reports reduced runtime and shorter outputs in 1017. Evaluate those claims on your own repository with a fixed set of tasks, tests, and harness settings before attributing a change in completion rate or runtime to the model.
How cached input changes the bill
Context caching saves the computation associated with the beginning of an earlier request so it can be reused. The model's cached key and value states are called the KV cache. The September V4.1 Flash launch reported one quarter of the high-bandwidth memory (HBM) and one eighth of the SSD storage for the KV cache versus the previous generation. Those figures describe the September architecture and should not be treated as new savings measured for the October update.

The DeepSeek API enables context caching by default. A hit requires a complete match with a stored prefix unit. If A+B was sent first and A+C follows, sharing A alone may yield no hit while only A+B is stored. If the service subsequently saves A as its own prefix unit, a later request A+D can reuse it.
In an agent workload, try placing stable instructions and unchanged tool definitions first and appending new questions or test logs later. Observe prompt_cache_hit_tokens and prompt_cache_miss_tokens in the response to see what actually happened. Matching text can yield different results depending on the stored prefix units and request timing.

| Flash usage | Off-peak | Peak |
|---|---|---|
| 1M cached input tokens | $0.003 | $0.006 |
| 1M uncached input tokens | $0.15 | $0.30 |
| 1M output tokens | $0.60 | $1.20 |
These are the official rates checked on November 27, 2026. Peak hours are 01:00–04:00 and 06:00–10:00 UTC on weekdays, excluding Chinese public holidays. In Korea, those windows are 10:00–13:00 and 15:00–19:00.
Take an illustrative peak-hour request with 80,000 cached input tokens, 20,000 uncached input tokens, and 5,000 output tokens. The three components cost $0.00048, $0.006, and $0.006, for a model charge of $0.01248. If all 100,000 input tokens missed the cache, the same request would cost $0.036. Add external tool charges and any additional agent requests separately.
Inspecting per-request usage in Python
This example uses the Python 3 standard library and reads DEEPSEEK_API_KEY from the environment. It sends the same body twice to the official Chat Completions endpoint with thinking explicitly disabled and prints the returned usage. The example did not send live requests for this note. Cache hit counts may be zero or vary across runs.
import json
import os
from urllib.request import Request, urlopen
endpoint = "https://api.deepseek.com/chat/completions"
api_key = os.environ["DEEPSEEK_API_KEY"]
payload = {
"model": "deepseek-flash",
"thinking": {"type": "disabled"},
"max_tokens": 128,
"messages": [
{
"role": "user",
"content": "Explain what a failing unit test is in one sentence.",
},
],
}
body = json.dumps(payload).encode("utf-8")
for attempt in range(1, 3):
request = Request(
endpoint,
data=body,
headers={
"Authorization": f"Bearer {api_key}",
"Content-Type": "application/json",
},
method="POST",
)
with urlopen(request, timeout=60) as response:
result = json.load(response)
usage = result["usage"]
print(
attempt,
result["model"],
{
"input": usage["prompt_tokens"],
"cached": usage["prompt_cache_hit_tokens"],
"uncached": usage["prompt_cache_miss_tokens"],
"output": usage["completion_tokens"],
},
)Logging model alongside usage records the model name returned by the API and its usage counters. Agent integrations that enable thinking and include tools in Chat Completions requests also need to preserve message history correctly. The documentation requires passing back the full reasoning_content on subsequent requests, including after turns without a tool call. Omitting it can produce HTTP 400.
Measuring the upgrade on your repository
Pick a simple bug fix, a multi-file change, and a task that requires reading an execution result. Keep the tests and task conditions fixed. Sum usage across requests and include failed or abandoned attempts in the total. Dividing that total cost by the number of successful tasks reveals the effect of changes in retries and output length even at the same token prices. If the earlier model is no longer callable under the same conditions, compare against archived logs and document any differences in the runtime setup.
References
DeepSeek — 1017 release announcement
DeepSeek — 1017 model card and benchmarks
DeepSeek — September V4.1 Flash announcement



