[{"data":1,"prerenderedAt":1482},["ShallowReactive",2],{"blog-post-deepseek-v4-1-flash-agents":3,"related-posts-deepseek-v4-1-flash-agents":1457},{"id":4,"title":5,"author":6,"body":11,"category":1434,"date":1435,"description":1436,"extension":1437,"featured":1438,"hideToc":1438,"image":1439,"imageAlt":1440,"imageHeight":1440,"imageWidth":1440,"itemList":1440,"lang":1440,"meta":1441,"navigation":911,"noindex":1438,"path":1442,"readingTime":1443,"redirected":1438,"relatedSlugs":1440,"seo":1444,"seoTitle":1445,"stem":1446,"subtitle":1440,"tags":1447,"updatedDate":1435,"__hash__":1456},"blog/blog/deepseek-v4-1-flash-agents.md","DeepSeek V4.1 Flash 1017 for AI Agents: Price, Hardware and Local vs Ollama Cloud vs API",{"name":7,"role":8,"avatar":9,"bio":10},"Shabnam Katoch","Growth Head","/img/avatars/shabnam-profile.jpeg","Shabnam leads growth at BetterClaw and has spent the past three years building organic distribution for AI-native products. She writes about no-code agent builders, content strategy, and what it actually takes to grow without an ads budget.",{"type":12,"value":13,"toc":1412},"minimark",[14,18,21,24,27,33,36,99,104,110,113,163,166,169,175,178,185,188,192,195,245,248,255,258,319,325,328,331,335,338,409,412,415,418,421,426,432,436,447,450,453,456,459,466,469,473,476,479,482,597,600,606,609,631,634,637,640,649,653,663,666,722,725,728,731,734,738,839,845,848,851,860,864,877,1119,1130,1133,1153,1166,1175,1179,1182,1185,1191,1194,1197,1200,1203,1207,1210,1298,1301,1304,1307,1311,1314,1317,1320,1325,1344,1348,1353,1358,1362,1365,1369,1372,1376,1384,1388,1391,1395,1398,1402,1408],[15,16,17],"p",{},"What one agent run costs on DeepSeek's own price list, why the smallest local build still needs 122.4 GB of memory, what Search and Fetch billing (live since 31 October) adds, and what the US federal order does and doesn't cover.",[15,19,20],{},"DeepSeek V4.1 Flash 1017 is the 17 October 2026 update to DeepSeek's open-weight Flash model: 1M context, up to 384K output, $0.30 input and $1.20 output per million tokens at peak, half that off-peak. For most agents the API wins. Running it locally needs at least 122.4 GB of memory.",[15,22,23],{},"Picture this. It's Monday morning and you open the DeepSeek billing page for your research agent. The token line looks as tiny as always.",[15,25,26],{},"Then there's a second line you've never seen before: Search. Since 31 October at 16:00 UTC, every web search your agent fires through Claude Code or Codex costs money.",[15,28,29],{},[30,31,32],"em",{},"Wait. I picked this model because it was cheap.",[15,34,35],{},"It still is. But \"cheap\" now has three moving parts: when you run, what you cache, and how many tools you call. Everything below comes from DeepSeek, Hugging Face, Unsloth, Ollama and the Federal Register, checked 5 November 2026.",[37,38,39,52],"table",{},[40,41,42],"thead",{},[43,44,45,49],"tr",{},[46,47,48],"th",{},"Quick facts",[46,50,51],{},"DeepSeek V4.1 Flash 1017",[53,54,55,67,75,83,91],"tbody",{},[43,56,57,61],{},[58,59,60],"td",{},"API model name",[58,62,63],{},[64,65,66],"code",{},"deepseek-flash",[43,68,69,72],{},[58,70,71],{},"Size",[58,73,74],{},"552B backbone plus 196B Engram parameters; 8B active for input, 16B for output",[43,76,77,80],{},[58,78,79],{},"API price, peak",[58,81,82],{},"$0.30 input (cache miss), $0.006 cache hit, $1.20 output per 1M tokens",[43,84,85,88],{},[58,86,87],{},"Weights",[58,89,90],{},"Open, MIT licence",[43,92,93,96],{},[58,94,95],{},"Search and Fetch",[58,97,98],{},"$0.75 per 1,000 successful requests each",[100,101,103],"h2",{"id":102},"what-actually-changed-in-deepseek-v41-flash-1017","What actually changed in DeepSeek V4.1 Flash 1017",[15,105,106,107,109],{},"DeepSeek calls 1017 a minor update to the September V4.1 Flash. The API price and calling method stayed the same: ",[64,108,66],{}," now points at the new checkpoint.",[15,111,112],{},"The scores moved more than \"minor\" suggests. On all 11 benchmarks DeepSeek reported, 1017 beats the September build by 2.0 to 11.1 points.",[37,114,115,128],{},[40,116,117],{},[43,118,119,122,125],{},[46,120,121],{},"Benchmark (DeepSeek's own numbers)",[46,123,124],{},"V4.1 Flash (Sept)",[46,126,127],{},"V4.1 Flash 1017",[53,129,130,141,152],{},[43,131,132,135,138],{},[58,133,134],{},"DeepSWE v1.1",[58,136,137],{},"74.2",[58,139,140],{},"77.0",[43,142,143,146,149],{},[58,144,145],{},"Terminal-Bench 4.0",[58,147,148],{},"31.2",[58,150,151],{},"42.3",[43,153,154,157,160],{},[58,155,156],{},"Automation-Bench v1.0.6",[58,158,159],{},"54.8",[58,161,162],{},"60.5",[15,164,165],{},"DeepSeek also says 1017 finishes tasks faster with shorter outputs. Same price per token, fewer tokens per job.",[15,167,168],{},"Here's the weird part. Vals AI, testing independently at maximum effort, puts 1017 at 31.82% on Terminal-Bench 4.0. DeepSeek reports 42.3, run through Claude Code.",[170,171,172],"blockquote",{},[15,173,174],{},"A benchmark score is a model plus a setup. Before you trust 42.3 or 31.82, run your own ten hardest tasks.",[15,176,177],{},"On the broader Vals Index, 1017 scores 61.26%, 10th of 33. Respectable, not frontier.",[15,179,180,181,184],{},"Two things in older coverage are now wrong. V4 Pro is not routed to Flash: DeepSeek kept it running after 14 September, listed at $1.32 input and $3.96 output at peak. And the legacy name ",[64,182,183],{},"deepseek-v4-flash"," still works, served by 1017 at Flash prices.",[15,186,187],{},"If you set up an agent in the V4 days, our earlier notes on DeepSeek V4 agent setup bugs still cover the plumbing.",[100,189,191],{"id":190},"deepseek-v41-flash-pricing-peak-off-peak-and-the-cache-line","DeepSeek V4.1 Flash pricing: peak, off-peak and the cache line",[15,193,194],{},"Straight from DeepSeek's Models & Pricing page:",[37,196,197,210],{},[40,198,199],{},[43,200,201,204,207],{},[46,202,203],{},"Per 1M tokens",[46,205,206],{},"Peak",[46,208,209],{},"Off-peak",[53,211,212,223,234],{},[43,213,214,217,220],{},[58,215,216],{},"Input, cache hit",[58,218,219],{},"$0.006",[58,221,222],{},"$0.003",[43,224,225,228,231],{},[58,226,227],{},"Input, cache miss",[58,229,230],{},"$0.30",[58,232,233],{},"$0.15",[43,235,236,239,242],{},[58,237,238],{},"Output",[58,240,241],{},"$1.20",[58,243,244],{},"$0.60",[15,246,247],{},"Peak hours are 01:00 to 04:00 and 06:00 to 10:00 UTC, Monday to Friday, excluding Chinese public holidays. Everything else is off-peak, including weekends and those holidays in full.",[15,249,250],{},[251,252],"img",{"alt":253,"src":254},"DeepSeek V4.1 Flash peak and off-peak pricing hours in UTC, IST and US time","/img/blog/deepseek-v4-1-flash-agents-pricing-hours.jpg",[15,256,257],{},"Here's where those seven hours land (US times after the 1 November clock change):",[37,259,260,273],{},[40,261,262],{},[43,263,264,267,270],{},[46,265,266],{},"Zone",[46,268,269],{},"Peak window 1",[46,271,272],{},"Peak window 2",[53,274,275,286,297,308],{},[43,276,277,280,283],{},[58,278,279],{},"UTC",[58,281,282],{},"01:00 to 04:00",[58,284,285],{},"06:00 to 10:00",[43,287,288,291,294],{},[58,289,290],{},"India (IST)",[58,292,293],{},"06:30 to 09:30",[58,295,296],{},"11:30 to 15:30",[43,298,299,302,305],{},[58,300,301],{},"US Eastern (EST)",[58,303,304],{},"20:00 to 23:00, previous evening",[58,306,307],{},"01:00 to 05:00",[43,309,310,313,316],{},[58,311,312],{},"US Pacific (PST)",[58,314,315],{},"17:00 to 20:00, previous evening",[58,317,318],{},"22:00 to 02:00, from the previous evening",[15,320,321,322],{},"In India, peak is your working morning. In the US, it's your evening and the middle of the night, exactly when scheduled agents like to run. ",[30,323,324],{},"Move the nightly batch to 11:00 UTC and the bill halves.",[15,326,327],{},"Thinking mode is on by default at \"high\" effort, and the usage block counts reasoning as generated tokens, so more effort means a bigger output bill. DeepSeek's own guidance: low for simple tasks, high for daily agent work, max for hard problems.",[15,329,330],{},"Routers price it their own way. OpenRouter lists 1017 at a flat $0.30 and $1.20, DeepSeek's peak rate, with no off-peak price. Our take on OpenRouter vs direct API keys for agents covers when that's worth it.",[100,332,334],{"id":333},"what-one-agent-run-costs-on-deepseek-v41-flash","What one agent run costs on DeepSeek V4.1 Flash",[15,336,337],{},"Let's use a typical agent run: 20,000 input tokens (system prompt, tools, context) and 5,000 output tokens.",[37,339,340,353],{},[40,341,342],{},[43,343,344,347,350],{},[46,345,346],{},"Model and setup",[46,348,349],{},"Cost per run",[46,351,352],{},"3,000 runs a month",[53,354,355,366,376,387,398],{},[43,356,357,360,363],{},[58,358,359],{},"V4.1 Flash, peak, no cache",[58,361,362],{},"$0.012",[58,364,365],{},"$36.00",[43,367,368,371,373],{},[58,369,370],{},"V4.1 Flash, off-peak, no cache",[58,372,219],{},[58,374,375],{},"$18.00",[43,377,378,381,384],{},[58,379,380],{},"V4.1 Flash, peak, 15K of input cached",[58,382,383],{},"$0.0076",[58,385,386],{},"$22.77",[43,388,389,392,395],{},[58,390,391],{},"V4.1 Flash, off-peak, 15K cached",[58,393,394],{},"$0.0038",[58,396,397],{},"$11.39",[43,399,400,403,406],{},[58,401,402],{},"Claude Opus 5.5, no cache",[58,404,405],{},"$0.18",[58,407,408],{},"$540.00",[15,410,411],{},"The Opus 5.5 row uses Anthropic's list price of $4 input and $20 output per million.",[15,413,414],{},"Underline the cache rows. Agents resend the same system prompt and tool definitions every run, and a cache hit costs $0.006 instead of $0.30: 98% off the repeated part.",[15,416,417],{},"The catch: a hit needs a prefix that fully matches a stored cache unit. Put the stable parts first and the changing parts last, and don't edit the system prompt mid-day.",[15,419,420],{},"For comparison, the same run on DeepSeek's V4 Pro costs $0.046 at peak. Unless a task really needs Pro, make Flash the default.",[170,422,423],{},[15,424,425],{},"On V4.1 Flash, prompt order is a pricing decision. Stable text first, fresh text last.",[15,427,428],{},[251,429],{"alt":430,"src":431},"DeepSeek V4.1 Flash cost per agent run: peak, off-peak, cached and with Search calls, vs Claude Opus 5.5","/img/blog/deepseek-v4-1-flash-agents-cost-per-run.jpg",[100,433,435],{"id":434},"search-and-fetch-the-line-item-that-started-on-31-october","Search and Fetch: the line item that started on 31 October",[15,437,438,439,442,443,446],{},"DeepSeek opened two web tools on 17 October. Search returns 1 to 50 ranked results with operators like ",[64,440,441],{},"site:"," and ",[64,444,445],{},"after:",". Fetch returns one page as Markdown.",[15,448,449],{},"Each costs $0.75 per 1,000 successful requests. Failures, empty results and timeouts aren't billed.",[15,451,452],{},"Calls through server-side tools in Claude Code, Codex and DeepSeek's own agent tool weren't charged until 31 October, 16:00 UTC. That window is closed: they bill per request now.",[15,454,455],{},"Now the part that surprised us. Three searches and two fetches per run cost $0.00375, and DeepSeek lists no off-peak discount for them.",[15,457,458],{},"On the cached peak run above, that's almost half again on top of $0.0076 in tokens. Over 3,000 runs: $11.25 in tools against $22.77 in tokens.",[15,460,461,465],{},[462,463,464],"strong",{},"For a research agent on V4.1 Flash, the tool calls can cost a third of the bill."," Cap them in the prompt (\"at most two searches\") the same way you'd cap output length.",[15,467,468],{},"For scale, Google charges $14 per 1,000 grounded searches on Gemini 4 Argon after 5,000 a month (our Gemini 4 Argon vs Claude Opus 5.5 for agents breakdown covers its other prices). DeepSeek's limits are 100 requests per second for Search and 25 for Fetch.",[100,470,472],{"id":471},"can-you-run-deepseek-v41-flash-locally","Can you run DeepSeek V4.1 Flash locally?",[15,474,475],{},"Yes, if you have the memory. The 1017 weights are MIT licensed, and Hugging Face counts 763B parameters in about 510 GB of files.",[15,477,478],{},"The trick is Engram, a 196B-parameter lookup table the model reads a few rows from per token. Unsloth's build keeps it on SSD and loads rows on demand, so the table lives on disk, not in RAM.",[15,480,481],{},"Unsloth's guide dates its latest GGUF update 2 November. Sizes from its Hugging Face repo, with the minimum RAM plus VRAM it lists:",[37,483,484,500],{},[40,485,486],{},[43,487,488,491,494,497],{},[46,489,490],{},"Unsloth quant",[46,492,493],{},"Download",[46,495,496],{},"Engram table (on SSD)",[46,498,499],{},"Minimum memory",[53,501,502,516,529,543,556,570,584],{},[43,503,504,507,510,513],{},[58,505,506],{},"UD-IQ1_S (1-bit)",[58,508,509],{},"233.0 GB",[58,511,512],{},"110.6 GB",[58,514,515],{},"122.4 GB",[43,517,518,521,524,526],{},[58,519,520],{},"UD-IQ1_M (1-bit)",[58,522,523],{},"250.4 GB",[58,525,512],{},[58,527,528],{},"139.8 GB",[43,530,531,534,537,540],{},[58,532,533],{},"UD-IQ2_XXS (2-bit)",[58,535,536],{},"300.5 GB",[58,538,539],{},"135.2 GB",[58,541,542],{},"165.3 GB",[43,544,545,548,551,553],{},[58,546,547],{},"UD-Q2_K_XL (2-bit)",[58,549,550],{},"334.8 GB",[58,552,539],{},[58,554,555],{},"199.6 GB",[43,557,558,561,564,567],{},[58,559,560],{},"UD-IQ3_XXS (3-bit)",[58,562,563],{},"394.7 GB",[58,565,566],{},"161.3 GB",[58,568,569],{},"233.5 GB",[43,571,572,575,578,581],{},[58,573,574],{},"UD-Q4_K_XL (4-bit)",[58,576,577],{},"500.7 GB",[58,579,580],{},"202.8 GB",[58,582,583],{},"297.9 GB",[43,585,586,589,592,594],{},[58,587,588],{},"UD-Q8_K_XL (8-bit)",[58,590,591],{},"508.4 GB",[58,593,580],{},[58,595,596],{},"305.6 GB",[15,598,599],{},"That \"minimum\" is the floor before context and runtime buffers. Unsloth's own planning range for 1-bit is 128 to 145 GB.",[15,601,602],{},[251,603],{"alt":604,"src":605},"DeepSeek V4.1 Flash hardware requirements: Unsloth GGUF download size vs minimum memory by quant","/img/blog/deepseek-v4-1-flash-agents-hardware.jpg",[15,607,608],{},"What that means by machine:",[610,611,612,619,625],"ul",{},[613,614,615,618],"li",{},[462,616,617],{},"128 GB unified memory"," (DGX Spark, a 128 GB Mac): Unsloth says 1-bit UD-IQ1_S works. With 122.4 GB of weights, you're living at the edge.",[613,620,621,624],{},[462,622,623],{},"256 GB"," (a Mac Studio, per Unsloth): 3-bit UD-IQ3_XXS fits, with 94.6% top-1 agreement with the official model in Unsloth's tests.",[613,626,627,630],{},[462,628,629],{},"A 32 GB card like an RTX 5090",": it can't hold even the 1-bit weights. You'd be offloading most of the model to system RAM.",[15,632,633],{},"This is where most people get it wrong. \"Open weights\" doesn't mean \"runs on my GPU\". The budget starts at 122.4 GB.",[15,635,636],{},"Unsloth also ships an 8 GB DSpark drafter for speculative decoding, which it says makes decoding about 1.3 to 1.5x faster. Budget the memory for it.",[15,638,639],{},"The software isn't settled either. Unsloth's guide builds llama.cpp from pull request #30817, or you use Unsloth Desktop. Locally, effort is an integer from 1 to 100 (default 75).",[15,641,642,643,648],{},"DeepSeek recommends temperature 1.0, top-p 1.0 and room for 256K output tokens. For what else your box can run, see our guide to ",[644,645,647],"a",{"href":646},"/blog/openclaw-local-model-hardware","OpenClaw local model hardware",".",[100,650,652],{"id":651},"ollama-cloud-the-middle-option","Ollama Cloud: the middle option",[15,654,655,656,442,659,662],{},"Searched \"deepseek v4.1 flash ollama\"? Ollama's library has two tags, ",[64,657,658],{},"deepseek-v4.1-flash:cloud",[64,660,661],{},"deepseek-v4.1-flash:1017-cloud",", both the same model on Ollama's servers.",[15,664,665],{},"There's no local tag. What you get is Ollama's tooling on hosted inference:",[667,668,673],"pre",{"className":669,"code":670,"language":671,"meta":672,"style":672},"language-bash shiki shiki-themes github-light","ollama run deepseek-v4.1-flash:cloud\nollama launch openclaw --model deepseek-v4.1-flash:cloud\nollama launch hermes --model deepseek-v4.1-flash:cloud\n","bash","",[64,674,675,691,708],{"__ignoreMap":672},[676,677,680,684,688],"span",{"class":678,"line":679},"line",1,[676,681,683],{"class":682},"s7eDp","ollama",[676,685,687],{"class":686},"sYBdl"," run",[676,689,690],{"class":686}," deepseek-v4.1-flash:cloud\n",[676,692,694,696,699,702,706],{"class":678,"line":693},2,[676,695,683],{"class":682},[676,697,698],{"class":686}," launch",[676,700,701],{"class":686}," openclaw",[676,703,705],{"class":704},"sYu0t"," --model",[676,707,690],{"class":686},[676,709,711,713,715,718,720],{"class":678,"line":710},3,[676,712,683],{"class":682},[676,714,698],{"class":686},[676,716,717],{"class":686}," hermes",[676,719,705],{"class":704},[676,721,690],{"class":686},[15,723,724],{},"Ollama Cloud lists the same per-token prices as DeepSeek, halved off-peak. But its off-peak rule reads differently: \"outside 12:00 and 18:00 UTC on weekdays and all day on weekends\". Check the window before you schedule.",[15,726,727],{},"The plans are where it gets interesting. Pro is $20 a month with $60 of usage credits; Max is $100 with $300. Our $36 month of peak tokens fits inside Pro.",[15,729,730],{},"The catch is concurrency: 3 requests at once on Pro, 10 on Max. DeepSeek's API allows 2,500.",[15,732,733],{},"Ollama also says it hosts mainly in the United States and never logs or trains on prompts. For some teams, that matters more than price.",[100,735,737],{"id":736},"local-vs-ollama-cloud-vs-api-which-one-wed-pick","Local vs Ollama Cloud vs API: which one we'd pick",[37,739,740,755],{},[40,741,742],{},[43,743,744,746,749,752],{},[46,745],{},[46,747,748],{},"Local (Unsloth GGUF)",[46,750,751],{},"Ollama Cloud",[46,753,754],{},"DeepSeek API",[53,756,757,771,785,798,812,825],{},[43,758,759,762,765,768],{},[58,760,761],{},"Where it runs",[58,763,764],{},"Your hardware",[58,766,767],{},"Ollama's servers",[58,769,770],{},"DeepSeek's servers",[43,772,773,776,779,782],{},[58,774,775],{},"Minimum to start",[58,777,778],{},"122.4 GB memory, 233 GB disk",[58,780,781],{},"An Ollama account",[58,783,784],{},"A DeepSeek key and balance",[43,786,787,790,793,796],{},[58,788,789],{},"Token price",[58,791,792],{},"Your electricity",[58,794,795],{},"$0.30 / $1.20 peak",[58,797,795],{},[43,799,800,803,806,809],{},[58,801,802],{},"Parallel requests",[58,804,805],{},"What your box handles",[58,807,808],{},"3 (Pro) or 10 (Max)",[58,810,811],{},"2,500",[43,813,814,816,819,822],{},[58,815,95],{},[58,817,818],{},"Bring your own",[58,820,821],{},"Not on Ollama's price list",[58,823,824],{},"$0.75 per 1,000",[43,826,827,830,833,836],{},[58,828,829],{},"Best for",[58,831,832],{},"Data that can't leave",[58,834,835],{},"Small teams, a few agents",[58,837,838],{},"Volume and scale",[15,840,841],{},[251,842],{"alt":843,"src":844},"DeepSeek V4.1 Flash local vs Ollama Cloud vs DeepSeek API compared for AI agents","/img/blog/deepseek-v4-1-flash-agents-comparison.jpg",[15,846,847],{},"Our take: pick the API for anything at volume. At $0.0076 a cached run, a 128 GB machine takes a very long time to pay for itself.",[15,849,850],{},"Pick Ollama Cloud for a handful of agents and US hosting. Pick local only when the data can't leave your building, and budget 256 GB.",[15,852,853,854],{},"Whichever you pick, the model is the easy part. The hard part is running agents on it every day without watching them. That's why BetterClaw runs on your own keys, DeepSeek included, with zero markup and a model choice per agent. ",[644,855,859],{"href":856,"rel":857},"https://app.betterclaw.io/signup",[858],"nofollow","Start your agent in 60 seconds",[100,861,863],{"id":862},"how-to-wire-deepseek-v41-flash-into-an-agent","How to wire DeepSeek V4.1 Flash into an agent",[15,865,866,867,870,871,874,875,648],{},"The API speaks both OpenAI and Anthropic formats. Base URL ",[64,868,869],{},"https://api.deepseek.com"," (or ",[64,872,873],{},"/anthropic"," for the Anthropic format), model ",[64,876,66],{},[667,878,882],{"className":879,"code":880,"language":881,"meta":672,"style":672},"language-python shiki shiki-themes github-light","from openai import OpenAI\nimport os\n\nclient = OpenAI(api_key=os.environ[\"DEEPSEEK_API_KEY\"],\n                base_url=\"https://api.deepseek.com\")\n\nresp = client.chat.completions.create(\n    model=\"deepseek-flash\",\n    messages=messages,\n    tools=tools,\n    reasoning_effort=\"high\",  # low, high or max\n    extra_body={\"thinking\": {\"type\": \"enabled\"}},\n)\nmsg = resp.choices[0].message\nmessages.append({\"role\": \"assistant\", \"content\": msg.content,\n                 \"reasoning_content\": msg.reasoning_content,\n                 \"tool_calls\": msg.tool_calls})  # pass reasoning back\n","python",[64,883,884,900,907,913,940,954,959,970,984,995,1006,1024,1053,1058,1075,1098,1107],{"__ignoreMap":672},[676,885,886,890,894,897],{"class":678,"line":679},[676,887,889],{"class":888},"sD7c4","from",[676,891,893],{"class":892},"sgsFI"," openai ",[676,895,896],{"class":888},"import",[676,898,899],{"class":892}," OpenAI\n",[676,901,902,904],{"class":678,"line":693},[676,903,896],{"class":888},[676,905,906],{"class":892}," os\n",[676,908,909],{"class":678,"line":710},[676,910,912],{"emptyLinePlaceholder":911},true,"\n",[676,914,916,919,922,925,929,931,934,937],{"class":678,"line":915},4,[676,917,918],{"class":892},"client ",[676,920,921],{"class":888},"=",[676,923,924],{"class":892}," OpenAI(",[676,926,928],{"class":927},"sqxcx","api_key",[676,930,921],{"class":888},[676,932,933],{"class":892},"os.environ[",[676,935,936],{"class":686},"\"DEEPSEEK_API_KEY\"",[676,938,939],{"class":892},"],\n",[676,941,943,946,948,951],{"class":678,"line":942},5,[676,944,945],{"class":927},"                base_url",[676,947,921],{"class":888},[676,949,950],{"class":686},"\"https://api.deepseek.com\"",[676,952,953],{"class":892},")\n",[676,955,957],{"class":678,"line":956},6,[676,958,912],{"emptyLinePlaceholder":911},[676,960,962,965,967],{"class":678,"line":961},7,[676,963,964],{"class":892},"resp ",[676,966,921],{"class":888},[676,968,969],{"class":892}," client.chat.completions.create(\n",[676,971,973,976,978,981],{"class":678,"line":972},8,[676,974,975],{"class":927},"    model",[676,977,921],{"class":888},[676,979,980],{"class":686},"\"deepseek-flash\"",[676,982,983],{"class":892},",\n",[676,985,987,990,992],{"class":678,"line":986},9,[676,988,989],{"class":927},"    messages",[676,991,921],{"class":888},[676,993,994],{"class":892},"messages,\n",[676,996,998,1001,1003],{"class":678,"line":997},10,[676,999,1000],{"class":927},"    tools",[676,1002,921],{"class":888},[676,1004,1005],{"class":892},"tools,\n",[676,1007,1009,1012,1014,1017,1020],{"class":678,"line":1008},11,[676,1010,1011],{"class":927},"    reasoning_effort",[676,1013,921],{"class":888},[676,1015,1016],{"class":686},"\"high\"",[676,1018,1019],{"class":892},",  ",[676,1021,1023],{"class":1022},"sAwPA","# low, high or max\n",[676,1025,1027,1030,1032,1035,1038,1041,1044,1047,1050],{"class":678,"line":1026},12,[676,1028,1029],{"class":927},"    extra_body",[676,1031,921],{"class":888},[676,1033,1034],{"class":892},"{",[676,1036,1037],{"class":686},"\"thinking\"",[676,1039,1040],{"class":892},": {",[676,1042,1043],{"class":686},"\"type\"",[676,1045,1046],{"class":892},": ",[676,1048,1049],{"class":686},"\"enabled\"",[676,1051,1052],{"class":892},"}},\n",[676,1054,1056],{"class":678,"line":1055},13,[676,1057,953],{"class":892},[676,1059,1061,1064,1066,1069,1072],{"class":678,"line":1060},14,[676,1062,1063],{"class":892},"msg ",[676,1065,921],{"class":888},[676,1067,1068],{"class":892}," resp.choices[",[676,1070,1071],{"class":704},"0",[676,1073,1074],{"class":892},"].message\n",[676,1076,1078,1081,1084,1086,1089,1092,1095],{"class":678,"line":1077},15,[676,1079,1080],{"class":892},"messages.append({",[676,1082,1083],{"class":686},"\"role\"",[676,1085,1046],{"class":892},[676,1087,1088],{"class":686},"\"assistant\"",[676,1090,1091],{"class":892},", ",[676,1093,1094],{"class":686},"\"content\"",[676,1096,1097],{"class":892},": msg.content,\n",[676,1099,1101,1104],{"class":678,"line":1100},16,[676,1102,1103],{"class":686},"                 \"reasoning_content\"",[676,1105,1106],{"class":892},": msg.reasoning_content,\n",[676,1108,1110,1113,1116],{"class":678,"line":1109},17,[676,1111,1112],{"class":686},"                 \"tool_calls\"",[676,1114,1115],{"class":892},": msg.tool_calls})  ",[676,1117,1118],{"class":1022},"# pass reasoning back\n",[15,1120,1121,1122,1125,1126,1129],{},"That last line is the one that bites. When a request carries ",[64,1123,1124],{},"tools",", DeepSeek needs every earlier turn's ",[64,1127,1128],{},"reasoning_content"," sent back, or it returns a 400 error.",[15,1131,1132],{},"Three more from DeepSeek's docs:",[1134,1135,1136,1143,1150],"ol",{},[613,1137,1138,1139,1142],{},"In thinking mode, ",[64,1140,1141],{},"temperature"," silently does nothing.",[613,1144,1145,1146,1149],{},"Turn on ",[64,1147,1148],{},"strict"," mode for tool schemas (beta) so tool calls match your JSON schema.",[613,1151,1152],{},"1017 is tuned for DeepSeek's own agent tool, CodeBuddy and WorkBuddy. Test tool calls in yours first.",[15,1154,1155,1156,1159,1160,1162,1163,1165],{},"For OpenClaw, DeepSeek's docs say to run ",[64,1157,1158],{},"openclaw onboard --install-daemon",", pick DeepSeek and paste your key. They still show ",[64,1161,183],{},"; we'd type ",[64,1164,66],{}," so the config says what it runs.",[15,1167,1168,1169,1174],{},"In BetterClaw, the key goes on the agent itself; our ",[644,1170,1173],{"href":1171,"rel":1172},"https://docs.betterclaw.io/byok",[858],"bring your own key docs"," cover the OpenAI-compatible option with DeepSeek's base URL. Give Flash the high-volume agents (triage, lead scoring, monitoring) and a stronger model the judgment calls.",[100,1176,1178],{"id":1177},"is-deepseek-banned-in-the-us-what-the-order-actually-covers","Is DeepSeek banned in the US? What the order actually covers",[15,1180,1181],{},"Short answer: it's banned from US federal civilian agencies, not from your company.",[15,1183,1184],{},"Homeland Security published Exclusion and Removal Order #2026-01 in the Federal Register on 20 October 2026. The order is dated 24 July, under the Federal Acquisition Supply Chain Security Act.",[15,1186,1187],{},[251,1188],{"alt":1189,"src":1190},"What the US DeepSeek order covers: federal civilian agencies and their vendors, not private companies","/img/blog/deepseek-v4-1-flash-agents-us-ban.jpg",[15,1192,1193],{},"It tells federal civilian agencies to stop buying DeepSeek products and to remove them, plus \"third-party products and services developed using DeepSeek implementations\", from their IT systems. A footnote covers third-party implementations used to serve those agencies.",[15,1195,1196],{},"National security systems sit outside it. What it doesn't say: anything about private businesses using DeepSeek for their own work. It also doesn't carve out self-hosted or open-weight deployments.",[15,1198,1199],{},"So if you sell software to federal civilian agencies and it runs on DeepSeek, read the order with your lawyer, local weights or not. We're not lawyers; regulated teams should ask theirs.",[15,1201,1202],{},"The order also notes DeepSeek's servers are in China. If that's a problem for your data, local or Ollama Cloud is the fix.",[100,1204,1206],{"id":1205},"deepseek-v41-flash-vs-haiku-55-glm-53-flash-and-the-big-models","DeepSeek V4.1 Flash vs Haiku 5.5, GLM-5.3 Flash and the big models",[15,1208,1209],{},"Is it the cheapest agent model? Per token, no. Per finished task, it might be.",[37,1211,1212,1228],{},[40,1213,1214],{},[43,1215,1216,1219,1222,1225],{},[46,1217,1218],{},"Model",[46,1220,1221],{},"Input / output per 1M",[46,1223,1224],{},"Vals Index",[46,1226,1227],{},"Vals cost per test",[53,1229,1230,1242,1256,1270,1284],{},[43,1231,1232,1234,1236,1239],{},[58,1233,51],{},[58,1235,795],{},[58,1237,1238],{},"61.26% (#10)",[58,1240,1241],{},"$0.657",[43,1243,1244,1247,1250,1253],{},[58,1245,1246],{},"Claude Haiku 5.5",[58,1248,1249],{},"$0.10 / $0.50 (prompts up to 100K)",[58,1251,1252],{},"58.73% (#15)",[58,1254,1255],{},"$3.175",[43,1257,1258,1261,1264,1267],{},[58,1259,1260],{},"GLM-5.3 Flash",[58,1262,1263],{},"$0.15 / $0.50",[58,1265,1266],{},"50.86% (#27)",[58,1268,1269],{},"$2.049",[43,1271,1272,1275,1278,1281],{},[58,1273,1274],{},"Gemini 4 Argon",[58,1276,1277],{},"$2 / $10 to 30 Nov, then $4 / $20",[58,1279,1280],{},"69.24% (#4)",[58,1282,1283],{},"$13.37",[43,1285,1286,1289,1292,1295],{},[58,1287,1288],{},"Claude Opus 5.5",[58,1290,1291],{},"$4 / $20",[58,1293,1294],{},"70.18% (#3)",[58,1296,1297],{},"$28.12",[15,1299,1300],{},"Prices from each vendor's pricing page; Vals columns from Vals AI, ranked out of 33.",[15,1302,1303],{},"But then something clicked. Haiku 5.5 and GLM-5.3 Flash are cheaper per token, yet V4.1 Flash costs a fraction of either per Vals test while scoring higher. Fewer wasted tokens beat a lower sticker price.",[15,1305,1306],{},"The big models still win on accuracy, by eight to nine points. For more budget options, see our ranking of the cheapest AI models for agents.",[100,1308,1310],{"id":1309},"the-cheap-model-isnt-the-whole-bill","The cheap model isn't the whole bill",[15,1312,1313],{},"DeepSeek made the model cheap. Then it made the clock, the cache and the tools part of the price.",[15,1315,1316],{},"That's fair, and it's where agent costs are heading everywhere. The model is the cheapest piece; the habits around it decide what you pay.",[15,1318,1319],{},"A year ago the question was which model. Now it's which hour, which prefix and how many searches. That's a better question, because you control all three.",[170,1321,1322],{},[15,1323,1324],{},"The teams who win on cost won't pick the cheapest model. They'll schedule off-peak, cache the boring parts and cap the tool calls.",[1326,1327,1329,1334,1337],"callout",{"type":1328},"cta",[15,1330,1331],{},[462,1332,1333],{},"Run DeepSeek V4.1 Flash agents without babysitting them",[15,1335,1336],{},"BetterClaw runs your agents on your own keys with zero markup across 28+ providers, plus 500+ connectors. Choose the model per agent: V4.1 Flash for volume, a stronger model for the hard calls.",[15,1338,1339,1340],{},"Plans start at $19 a month on Starter. Pro is $49, or $39 billed annually, Business is $149, and Enterprise is custom, all with a 7-day free trial. ",[644,1341,1343],{"href":856,"rel":1342},[858],"Build your agent in BetterClaw",[100,1345,1347],{"id":1346},"frequently-asked-questions","Frequently Asked Questions",[1349,1350,1352],"h3",{"id":1351},"what-is-deepseek-v41-flash-1017","What is DeepSeek V4.1 Flash 1017?",[15,1354,1355,1356,648],{},"It's the 17 October 2026 update to DeepSeek's V4.1 Flash, an open-weight model with 552B backbone parameters plus a 196B Engram table, 1M context and up to 384K output. On the API you call it as ",[64,1357,66],{},[1349,1359,1361],{"id":1360},"how-much-does-deepseek-v41-flash-cost","How much does DeepSeek V4.1 Flash cost?",[15,1363,1364],{},"On DeepSeek's API it's $0.30 per million input tokens, $0.006 on a cache hit and $1.20 per million output tokens at peak (01:00 to 04:00 and 06:00 to 10:00 UTC on weekdays). Off-peak is half. Search and Fetch cost $0.75 per 1,000 successful requests.",[1349,1366,1368],{"id":1367},"how-much-vram-or-memory-does-deepseek-v41-flash-need-locally","How much VRAM or memory does DeepSeek V4.1 Flash need locally?",[15,1370,1371],{},"Unsloth's smallest quant, UD-IQ1_S, is a 233.0 GB download and needs at least 122.4 GB of RAM plus VRAM, with the 110.6 GB Engram table kept on SSD. Unsloth plans 128 to 145 GB for 1-bit and 256 to 290 GB for 3-bit.",[1349,1373,1375],{"id":1374},"can-i-run-deepseek-v41-flash-in-ollama","Can I run DeepSeek V4.1 Flash in Ollama?",[15,1377,1378,1379,442,1381,1383],{},"Only in the cloud. Ollama lists ",[64,1380,658],{},[64,1382,661],{},", both hosted, with no local tag. To run it on your own machine, use Unsloth's GGUFs.",[1349,1385,1387],{"id":1386},"is-deepseek-v41-flash-better-than-claude-haiku-55-for-agents","Is DeepSeek V4.1 Flash better than Claude Haiku 5.5 for agents?",[15,1389,1390],{},"On the Vals Index it scores 61.26% to Haiku 5.5's 58.73%, and its cost per test there is $0.657 against $3.175. Haiku is cheaper per token, so test both on your own tasks before you switch.",[1349,1392,1394],{"id":1393},"is-deepseek-banned-in-the-us","Is DeepSeek banned in the US?",[15,1396,1397],{},"DHS Order #2026-01, published 20 October 2026, removes DeepSeek products and third-party products built on DeepSeek implementations from federal civilian agency systems and procurement. It doesn't address private companies. If you sell to federal civilian agencies, check with your legal team.",[1349,1399,1401],{"id":1400},"is-deepseek-v41-flash-reliable-enough-for-production-agents","Is DeepSeek V4.1 Flash reliable enough for production agents?",[15,1403,1404,1405,1407],{},"For high-volume work like triage and scoring, yes, if you test tool calls first and pass ",[64,1406,1128],{}," back on every turn with tools. Independent Terminal-Bench 4.0 results (31.82% on Vals) sit well below DeepSeek's own 42.3.",[1409,1410,1411],"style",{},"html pre.shiki code .s7eDp, html code.shiki .s7eDp{--shiki-default:#6F42C1}html pre.shiki code .sYBdl, html code.shiki .sYBdl{--shiki-default:#032F62}html pre.shiki code .sYu0t, html code.shiki .sYu0t{--shiki-default:#005CC5}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html pre.shiki code .sD7c4, html code.shiki .sD7c4{--shiki-default:#D73A49}html pre.shiki code .sgsFI, html code.shiki .sgsFI{--shiki-default:#24292E}html pre.shiki code .sqxcx, html code.shiki .sqxcx{--shiki-default:#E36209}html pre.shiki code .sAwPA, html code.shiki .sAwPA{--shiki-default:#6A737D}",{"title":672,"searchDepth":693,"depth":693,"links":1413},[1414,1415,1416,1417,1418,1419,1420,1421,1422,1423,1424,1425],{"id":102,"depth":693,"text":103},{"id":190,"depth":693,"text":191},{"id":333,"depth":693,"text":334},{"id":434,"depth":693,"text":435},{"id":471,"depth":693,"text":472},{"id":651,"depth":693,"text":652},{"id":736,"depth":693,"text":737},{"id":862,"depth":693,"text":863},{"id":1177,"depth":693,"text":1178},{"id":1205,"depth":693,"text":1206},{"id":1309,"depth":693,"text":1310},{"id":1346,"depth":693,"text":1347,"children":1426},[1427,1428,1429,1430,1431,1432,1433],{"id":1351,"depth":710,"text":1352},{"id":1360,"depth":710,"text":1361},{"id":1367,"depth":710,"text":1368},{"id":1374,"depth":710,"text":1375},{"id":1386,"depth":710,"text":1387},{"id":1393,"depth":710,"text":1394},{"id":1400,"depth":710,"text":1401},"Guides","2026-11-05","DeepSeek V4.1 Flash 1017 costs $0.30/$1.20 per 1M tokens at peak, half off-peak. Local vs Ollama Cloud vs API, hardware needs and agent setup.","md",false,"/img/blog/deepseek-v4-1-flash-agents.jpg",null,{},"/blog/deepseek-v4-1-flash-agents","13 min read",{"title":5,"description":1436},"DeepSeek V4.1 Flash 1017: Local vs Ollama Cloud vs API","blog/deepseek-v4-1-flash-agents",[1448,1449,1450,1451,1452,1453,1454,1455],"deepseek v4.1 flash","deepseek v4.1 flash 1017","deepseek v4.1 flash price","deepseek v4.1 flash hardware requirements","deepseek v4.1 flash ollama","deepseek v4.1 flash gguf unsloth","deepseek search api pricing","deepseek banned in us","dd-ldts_jAe_iRQTdO0LWj3--vby1iQ89OkqUQBtkEU",[1458,1468,1475],{"stem":1459,"title":1460,"description":1461,"date":1462,"image":1463,"category":1464,"redirected":1438,"author":1465,"readingTime":1467},"blog/dgx-station-precio-alternativas","Precio de NVIDIA DGX Station (GB300) en 2026: cuánto cuesta y 6 alternativas más baratas","Precio de NVIDIA DGX Station: cada anuncio del GB300 de $92,887 a $159,283, el modelo para Windows, el costo mensual y 6 alternativas más baratas.","2026-11-04","/img/blog/dgx-station-precio-alternativas.jpg","Comparison",{"name":7,"role":8,"avatar":9,"url":1466,"bio":10},"https://www.betterclaw.io/about","12 min de lectura",{"stem":1469,"title":1470,"description":1471,"date":1462,"image":1472,"category":1464,"redirected":1438,"author":1473,"readingTime":1474},"blog/dgx-station-preco-alternativas","Preço do NVIDIA DGX Station (GB300) em 2026: quanto custa e 6 alternativas mais baratas","Preço do NVIDIA DGX Station: todas as ofertas GB300 de $92,887 a $159,283, o modelo Windows, o custo mensal e 6 alternativas mais baratas.","/img/blog/dgx-station-preco-alternativas.jpg",{"name":7,"role":8,"avatar":9,"url":1466,"bio":10},"12 min de leitura",{"stem":1476,"title":1477,"description":1478,"date":1462,"image":1479,"category":1464,"redirected":1438,"author":1480,"readingTime":1481},"blog/dgx-station-preis-alternativen","NVIDIA DGX Station Preis (GB300) 2026: Was sie kostet und 6 günstigere Alternativen","NVIDIA DGX Station Preis: alle GB300-Angebote von $92,887 bis $159,283, das Windows-Modell, Kosten pro Monat und 6 günstigere Alternativen.","/img/blog/dgx-station-preis-alternativen.jpg",{"name":7,"role":8,"avatar":9,"url":1466,"bio":10},"12 Minuten Lesezeit",1793972863531]