From 0612c2f43baa498ec16dfb7481303a20b30f6946 Mon Sep 17 00:00:00 2001 From: arjunpredev <141591528+arjunpredev@users.noreply.github.com> Date: Mon, 19 Oct 2026 11:51:42 -0400 Subject: [PATCH] docs: DeepSeek V4.1 Flash examples and Ask AI writer use the 1017 id Every example, catalog row and code sample that names the default model now uses deepseek/deepseek-v4.1-flash-1017; the Ask AI writer (ASK_AI_MODEL) moves with it. Changelog entry for 2026-10-19. The old id keeps working. Co-Authored-By: Claude Opus 5.5 --- agents.mdx | 4 +-- ai-gateway/api/chat-completions.mdx | 8 ++--- ai-gateway/api/usage.mdx | 2 +- ai-gateway/models.mdx | 6 ++-- ai-gateway/overview.mdx | 2 +- ai-gateway/quickstart.mdx | 10 +++--- ai-gateway/routing-and-fallbacks.mdx | 2 +- ai-gateway/tools-and-structured-output.mdx | 2 +- api-reference/ai-gateway.openapi.json | 42 +++++++++++----------- changelog.mdx | 7 ++++ coding-agent/built-in.mdx | 6 ++-- site/worker/chat.ts | 2 +- site/wrangler.jsonc | 2 +- skill.md | 2 +- 14 files changed, 52 insertions(+), 45 deletions(-) diff --git a/agents.mdx b/agents.mdx index 78a1d37..b71628d 100644 --- a/agents.mdx +++ b/agents.mdx @@ -103,7 +103,7 @@ const client = new OpenAI({ baseURL: 'https://api.pre.dev/v1', apiKey: process.e const { data: completion, response } = await client.chat.completions .create({ - model: 'deepseek/deepseek-v4.1-flash', + model: 'deepseek/deepseek-v4.1-flash-1017', messages: [{ role: 'user', content: 'Write a one-line welcome message for a todo app.' }], }) .withResponse(); @@ -119,7 +119,7 @@ from openai import OpenAI client = OpenAI(base_url="https://api.pre.dev/v1", api_key=os.environ["PREDEV_API_KEY"]) raw = client.chat.completions.with_raw_response.create( - model="deepseek/deepseek-v4.1-flash", + model="deepseek/deepseek-v4.1-flash-1017", messages=[{"role": "user", "content": "Write a one-line welcome message for a todo app."}], ) print(raw.parse().choices[0].message.content) diff --git a/ai-gateway/api/chat-completions.mdx b/ai-gateway/api/chat-completions.mdx index 5bc1171..7570804 100644 --- a/ai-gateway/api/chat-completions.mdx +++ b/ai-gateway/api/chat-completions.mdx @@ -12,7 +12,7 @@ curl --fail-with-body -i https://api.pre.dev/v1/chat/completions \ -H "Authorization: Bearer $PREDEV_API_KEY" \ -H "Content-Type: application/json" \ -d '{ - "model": "deepseek/deepseek-v4.1-flash", + "model": "deepseek/deepseek-v4.1-flash-1017", "messages": [ { "role": "system", "content": "Answer in one sentence." }, { "role": "user", "content": "Why is the sky blue?" } @@ -26,7 +26,7 @@ const client = new OpenAI({ baseURL: 'https://api.pre.dev/v1', apiKey: process.e const { data: completion, response } = await client.chat.completions .create({ - model: 'deepseek/deepseek-v4.1-flash', + model: 'deepseek/deepseek-v4.1-flash-1017', messages: [ { role: 'system', content: 'Answer in one sentence.' }, { role: 'user', content: 'Why is the sky blue?' }, @@ -43,7 +43,7 @@ from openai import OpenAI client = OpenAI(base_url="https://api.pre.dev/v1", api_key=os.environ["PREDEV_API_KEY"]) raw = client.chat.completions.with_raw_response.create( - model="deepseek/deepseek-v4.1-flash", + model="deepseek/deepseek-v4.1-flash-1017", messages=[ {"role": "system", "content": "Answer in one sentence."}, {"role": "user", "content": "Why is the sky blue?"}, @@ -79,7 +79,7 @@ The body is the standard chat completion response. `id` is the pre.dev generatio { "id": "pdg-7c1e4b52-9a3d-4f8e-b0c6-2d5a8e913f47", "object": "chat.completion", - "model": "deepseek/deepseek-v4.1-flash", + "model": "deepseek/deepseek-v4.1-flash-1017", "choices": [ { "index": 0, diff --git a/ai-gateway/api/usage.mdx b/ai-gateway/api/usage.mdx index f8f9aa4..8559a87 100644 --- a/ai-gateway/api/usage.mdx +++ b/ai-gateway/api/usage.mdx @@ -33,7 +33,7 @@ curl --fail-with-body "https://api.pre.dev/v1/usage?days=30" \ "totals": { "requests": 1840, "credits": 87.5 }, "by_model": [ { - "model": "deepseek/deepseek-v4.1-flash", + "model": "deepseek/deepseek-v4.1-flash-1017", "path": "/chat/completions", "requests": 1702, "credits": 41.2, diff --git a/ai-gateway/models.mdx b/ai-gateway/models.mdx index 929f205..38437a5 100644 --- a/ai-gateway/models.mdx +++ b/ai-gateway/models.mdx @@ -5,7 +5,7 @@ description: "Use any model id from the pre.dev catalog and read credit prices f The gateway serves hundreds of models from every major lab. Use the model id exactly as listed by [`GET /v1/models`](/ai-gateway/api/models): if the catalog lists it, `model: "/"` works here. -Example ids: `anthropic/claude-sonnet-5`, `deepseek/deepseek-v4.1-flash`, `google/gemini-3.8-flash`, and `openai/gpt-6-luna`. +Example ids: `anthropic/claude-sonnet-5`, `deepseek/deepseek-v4.1-flash-1017`, `google/gemini-3.8-flash`, and `openai/gpt-6-luna`. Some models also have variant ids in the catalog, such as a `:free` or `:batch` suffix; use them exactly as listed. Append `:online` to a model id to add web search, the same as the `web` plugin. See [fallbacks and advanced options](/ai-gateway/routing-and-fallbacks). @@ -20,8 +20,8 @@ Each row describes the model (`id`, `name`, `context_length`, supported modaliti ```json { - "id": "deepseek/deepseek-v4.1-flash", - "name": "DeepSeek: DeepSeek V4.1 Flash", + "id": "deepseek/deepseek-v4.1-flash-1017", + "name": "DeepSeek: DeepSeek V4.1 Flash 1017", "context_length": 1048576, "predev": { "credits_per_m_input": 2.5, diff --git a/ai-gateway/overview.mdx b/ai-gateway/overview.mdx index 7d6f881..3e98681 100644 --- a/ai-gateway/overview.mdx +++ b/ai-gateway/overview.mdx @@ -39,7 +39,7 @@ The pre.dev AI Gateway is an OpenAI-compatible API for hundreds of models from e ## What you send -Model ids are `/` strings exactly as listed by [`GET /v1/models`](/ai-gateway/api/models), for example `anthropic/claude-sonnet-5`, `deepseek/deepseek-v4.1-flash`, `google/gemini-3.8-flash`, or `openai/gpt-6-luna`. There are no separate pre.dev-specific model names. +Model ids are `/` strings exactly as listed by [`GET /v1/models`](/ai-gateway/api/models), for example `anthropic/claude-sonnet-5`, `deepseek/deepseek-v4.1-flash-1017`, `google/gemini-3.8-flash`, or `openai/gpt-6-luna`. There are no separate pre.dev-specific model names. The standard chat completion fields (`messages`, `temperature`, `max_tokens`, `stop`, and so on) work as you would expect. The pre.dev AI API also supports these options, described on [fallbacks and advanced options](/ai-gateway/routing-and-fallbacks): diff --git a/ai-gateway/quickstart.mdx b/ai-gateway/quickstart.mdx index d55a59b..a09888b 100644 --- a/ai-gateway/quickstart.mdx +++ b/ai-gateway/quickstart.mdx @@ -6,7 +6,7 @@ description: "Send a chat completion through api.pre.dev/v1 with curl or a stock import ApiKeyLocation from "/snippets/api-key-location.mdx"; -Send one chat completion to `deepseek/deepseek-v4.1-flash` and read the credits it charged. +Send one chat completion to `deepseek/deepseek-v4.1-flash-1017` and read the credits it charged. ## Before you start @@ -23,7 +23,7 @@ Store it as `PREDEV_API_KEY`. A Free workspace can spend 5 credits on gateway ca -H "Authorization: Bearer $PREDEV_API_KEY" \ -H "Content-Type: application/json" \ -d '{ - "model": "deepseek/deepseek-v4.1-flash", + "model": "deepseek/deepseek-v4.1-flash-1017", "messages": [{ "role": "user", "content": "Say hello in five words." }] }' ``` @@ -40,7 +40,7 @@ Store it as `PREDEV_API_KEY`. A Free workspace can spend 5 credits on gateway ca }); const completion = await client.chat.completions.create({ - model: 'deepseek/deepseek-v4.1-flash', + model: 'deepseek/deepseek-v4.1-flash-1017', messages: [{ role: 'user', content: 'Say hello in five words.' }], }); console.log(completion.choices[0].message.content); @@ -59,7 +59,7 @@ Store it as `PREDEV_API_KEY`. A Free workspace can spend 5 credits on gateway ca ) completion = client.chat.completions.create( - model="deepseek/deepseek-v4.1-flash", + model="deepseek/deepseek-v4.1-flash-1017", messages=[{"role": "user", "content": "Say hello in five words."}], ) print(completion.choices[0].message.content) @@ -78,7 +78,7 @@ Store it as `PREDEV_API_KEY`. A Free workspace can spend 5 credits on gateway ca }); const { text } = await generateText({ - model: predev('deepseek/deepseek-v4.1-flash'), + model: predev('deepseek/deepseek-v4.1-flash-1017'), prompt: 'Say hello in five words.', }); console.log(text); diff --git a/ai-gateway/routing-and-fallbacks.mdx b/ai-gateway/routing-and-fallbacks.mdx index 6e4034f..95b7598 100644 --- a/ai-gateway/routing-and-fallbacks.mdx +++ b/ai-gateway/routing-and-fallbacks.mdx @@ -11,7 +11,7 @@ Send `models` instead of a single `model`. The gateway tries each in order, and ```json { - "models": ["anthropic/claude-sonnet-5", "openai/gpt-6-luna", "deepseek/deepseek-v4.1-flash"], + "models": ["anthropic/claude-sonnet-5", "openai/gpt-6-luna", "deepseek/deepseek-v4.1-flash-1017"], "route": "fallback", "messages": [{ "role": "user", "content": "Summarize the plot of Dune in two sentences." }] } diff --git a/ai-gateway/tools-and-structured-output.mdx b/ai-gateway/tools-and-structured-output.mdx index da32615..4cbe458 100644 --- a/ai-gateway/tools-and-structured-output.mdx +++ b/ai-gateway/tools-and-structured-output.mdx @@ -164,7 +164,7 @@ Add the `response-healing` plugin to repair near-valid JSON from models without ```json { - "model": "deepseek/deepseek-v4.1-flash", + "model": "deepseek/deepseek-v4.1-flash-1017", "plugins": [{ "id": "response-healing" }], "response_format": { "type": "json_object" }, "messages": [{ "role": "user", "content": "Return {\"ok\": true} as JSON." }] diff --git a/api-reference/ai-gateway.openapi.json b/api-reference/ai-gateway.openapi.json index 4e4ce95..2211022 100644 --- a/api-reference/ai-gateway.openapi.json +++ b/api-reference/ai-gateway.openapi.json @@ -83,7 +83,7 @@ "basic": { "summary": "One question", "value": { - "model": "deepseek/deepseek-v4.1-flash", + "model": "deepseek/deepseek-v4.1-flash-1017", "max_tokens": 100, "stream": false, "reasoning": { @@ -100,7 +100,7 @@ "streaming": { "summary": "Streaming", "value": { - "model": "deepseek/deepseek-v4.1-flash", + "model": "deepseek/deepseek-v4.1-flash-1017", "max_tokens": 100, "stream": true, "reasoning": { @@ -117,7 +117,7 @@ "json_output": { "summary": "Structured JSON output", "value": { - "model": "deepseek/deepseek-v4.1-flash", + "model": "deepseek/deepseek-v4.1-flash-1017", "max_tokens": 200, "reasoning": { "enabled": false @@ -155,7 +155,7 @@ "fallbacks": { "summary": "Fallback models", "value": { - "model": "deepseek/deepseek-v4.1-flash", + "model": "deepseek/deepseek-v4.1-flash-1017", "models": [ "google/gemini-3.8-flash" ], @@ -198,7 +198,7 @@ "id": "pdg-043293a6-d1a8-4695-81fe-603ad4661ebb", "object": "chat.completion", "created": 1790500000, - "model": "deepseek/deepseek-v4.1-flash", + "model": "deepseek/deepseek-v4.1-flash-1017", "choices": [ { "index": 0, @@ -221,7 +221,7 @@ "schema": { "type": "string" }, - "example": "data: {\"id\":\"pdg-043293a6-d1a8-4695-81fe-603ad4661ebb\",\"object\":\"chat.completion.chunk\",\"created\":1790500000,\"model\":\"deepseek/deepseek-v4.1-flash\",\"system_fingerprint\":null,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"Hello there,\"},\"finish_reason\":null}]}\n\n: processing\n\ndata: {\"id\":\"pdg-043293a6-d1a8-4695-81fe-603ad4661ebb\",\"object\":\"chat.completion.chunk\",\"created\":1790500000,\"model\":\"deepseek/deepseek-v4.1-flash\",\"system_fingerprint\":null,\"choices\":[{\"index\":0,\"delta\":{\"content\":\" nice to meet you.\"},\"finish_reason\":\"stop\"}]}\n\ndata: {\"id\":\"pdg-043293a6-d1a8-4695-81fe-603ad4661ebb\",\"object\":\"chat.completion.chunk\",\"created\":1790500000,\"model\":\"deepseek/deepseek-v4.1-flash\",\"system_fingerprint\":null,\"choices\":[],\"usage\":{\"prompt_tokens\":12,\"completion_tokens\":8,\"total_tokens\":20}}\n\ndata: [DONE]\n" + "example": "data: {\"id\":\"pdg-043293a6-d1a8-4695-81fe-603ad4661ebb\",\"object\":\"chat.completion.chunk\",\"created\":1790500000,\"model\":\"deepseek/deepseek-v4.1-flash-1017\",\"system_fingerprint\":null,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"Hello there,\"},\"finish_reason\":null}]}\n\n: processing\n\ndata: {\"id\":\"pdg-043293a6-d1a8-4695-81fe-603ad4661ebb\",\"object\":\"chat.completion.chunk\",\"created\":1790500000,\"model\":\"deepseek/deepseek-v4.1-flash-1017\",\"system_fingerprint\":null,\"choices\":[{\"index\":0,\"delta\":{\"content\":\" nice to meet you.\"},\"finish_reason\":\"stop\"}]}\n\ndata: {\"id\":\"pdg-043293a6-d1a8-4695-81fe-603ad4661ebb\",\"object\":\"chat.completion.chunk\",\"created\":1790500000,\"model\":\"deepseek/deepseek-v4.1-flash-1017\",\"system_fingerprint\":null,\"choices\":[],\"usage\":{\"prompt_tokens\":12,\"completion_tokens\":8,\"total_tokens\":20}}\n\ndata: [DONE]\n" } } }, @@ -254,17 +254,17 @@ { "lang": "cURL", "label": "cURL", - "source": "curl --fail-with-body https://api.pre.dev/v1/chat/completions \\\n -H \"Authorization: Bearer $PREDEV_API_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\"model\":\"deepseek/deepseek-v4.1-flash\",\"max_tokens\":100,\"stream\":false,\"reasoning\":{\"enabled\":false},\"messages\":[{\"role\":\"user\",\"content\":\"Say hello in five words.\"}]}'" + "source": "curl --fail-with-body https://api.pre.dev/v1/chat/completions \\\n -H \"Authorization: Bearer $PREDEV_API_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\"model\":\"deepseek/deepseek-v4.1-flash-1017\",\"max_tokens\":100,\"stream\":false,\"reasoning\":{\"enabled\":false},\"messages\":[{\"role\":\"user\",\"content\":\"Say hello in five words.\"}]}'" }, { "lang": "Python", "label": "Python (OpenAI SDK)", - "source": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(base_url=\"https://api.pre.dev/v1\", api_key=os.environ[\"PREDEV_API_KEY\"])\n\ncompletion = client.chat.completions.create(\n model=\"deepseek/deepseek-v4.1-flash\",\n max_tokens=100,\n extra_body={\"reasoning\": {\"enabled\": False}},\n messages=[{\"role\": \"user\", \"content\": \"Say hello in five words.\"}],\n)\nprint(completion.choices[0].message.content)" + "source": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(base_url=\"https://api.pre.dev/v1\", api_key=os.environ[\"PREDEV_API_KEY\"])\n\ncompletion = client.chat.completions.create(\n model=\"deepseek/deepseek-v4.1-flash-1017\",\n max_tokens=100,\n extra_body={\"reasoning\": {\"enabled\": False}},\n messages=[{\"role\": \"user\", \"content\": \"Say hello in five words.\"}],\n)\nprint(completion.choices[0].message.content)" }, { "lang": "JavaScript", "label": "Node.js (OpenAI SDK)", - "source": "import OpenAI from 'openai';\n\nconst client = new OpenAI({ baseURL: 'https://api.pre.dev/v1', apiKey: process.env.PREDEV_API_KEY });\n\nconst completion = await client.chat.completions.create({\n model: 'deepseek/deepseek-v4.1-flash',\n max_tokens: 100,\n reasoning: { enabled: false },\n messages: [{ role: 'user', content: 'Say hello in five words.' }],\n});\nconsole.log(completion.choices[0].message.content);" + "source": "import OpenAI from 'openai';\n\nconst client = new OpenAI({ baseURL: 'https://api.pre.dev/v1', apiKey: process.env.PREDEV_API_KEY });\n\nconst completion = await client.chat.completions.create({\n model: 'deepseek/deepseek-v4.1-flash-1017',\n max_tokens: 100,\n reasoning: { enabled: false },\n messages: [{ role: 'user', content: 'Say hello in five words.' }],\n});\nconsole.log(completion.choices[0].message.content);" } ] } @@ -290,7 +290,7 @@ "$ref": "#/components/schemas/CompletionRequest" }, "example": { - "model": "deepseek/deepseek-v4.1-flash", + "model": "deepseek/deepseek-v4.1-flash-1017", "prompt": "The sky is blue because", "max_tokens": 40, "stream": false @@ -321,7 +321,7 @@ "id": "pdg-043293a6-d1a8-4695-81fe-603ad4661ebb", "object": "text_completion", "created": 1790500000, - "model": "deepseek/deepseek-v4.1-flash", + "model": "deepseek/deepseek-v4.1-flash-1017", "choices": [ { "index": 0, @@ -340,7 +340,7 @@ "schema": { "type": "string" }, - "example": "data: {\"id\":\"pdg-043293a6-d1a8-4695-81fe-603ad4661ebb\",\"object\":\"text_completion\",\"created\":1790500000,\"model\":\"deepseek/deepseek-v4.1-flash\",\"choices\":[{\"index\":0,\"text\":\" sunlight scatters\",\"finish_reason\":null}]}\n\ndata: {\"id\":\"pdg-043293a6-d1a8-4695-81fe-603ad4661ebb\",\"object\":\"text_completion\",\"created\":1790500000,\"model\":\"deepseek/deepseek-v4.1-flash\",\"choices\":[{\"index\":0,\"text\":\" off air molecules.\",\"finish_reason\":\"stop\"}]}\n\ndata: {\"id\":\"pdg-043293a6-d1a8-4695-81fe-603ad4661ebb\",\"object\":\"text_completion\",\"created\":1790500000,\"model\":\"deepseek/deepseek-v4.1-flash\",\"choices\":[],\"usage\":{\"prompt_tokens\":6,\"completion_tokens\":7,\"total_tokens\":13}}\n\ndata: [DONE]\n" + "example": "data: {\"id\":\"pdg-043293a6-d1a8-4695-81fe-603ad4661ebb\",\"object\":\"text_completion\",\"created\":1790500000,\"model\":\"deepseek/deepseek-v4.1-flash-1017\",\"choices\":[{\"index\":0,\"text\":\" sunlight scatters\",\"finish_reason\":null}]}\n\ndata: {\"id\":\"pdg-043293a6-d1a8-4695-81fe-603ad4661ebb\",\"object\":\"text_completion\",\"created\":1790500000,\"model\":\"deepseek/deepseek-v4.1-flash-1017\",\"choices\":[{\"index\":0,\"text\":\" off air molecules.\",\"finish_reason\":\"stop\"}]}\n\ndata: {\"id\":\"pdg-043293a6-d1a8-4695-81fe-603ad4661ebb\",\"object\":\"text_completion\",\"created\":1790500000,\"model\":\"deepseek/deepseek-v4.1-flash-1017\",\"choices\":[],\"usage\":{\"prompt_tokens\":6,\"completion_tokens\":7,\"total_tokens\":13}}\n\ndata: [DONE]\n" } } }, @@ -395,7 +395,7 @@ "basic": { "summary": "One question", "value": { - "model": "deepseek/deepseek-v4.1-flash", + "model": "deepseek/deepseek-v4.1-flash-1017", "input": "Say hello in five words.", "max_output_tokens": 100, "reasoning": { @@ -407,7 +407,7 @@ "streaming": { "summary": "Streaming", "value": { - "model": "deepseek/deepseek-v4.1-flash", + "model": "deepseek/deepseek-v4.1-flash-1017", "input": "Say hello in five words.", "max_output_tokens": 100, "reasoning": { @@ -443,7 +443,7 @@ "id": "pdg-043293a6-d1a8-4695-81fe-603ad4661ebb", "object": "response", "created_at": 1790500000, - "model": "deepseek/deepseek-v4.1-flash", + "model": "deepseek/deepseek-v4.1-flash-1017", "status": "completed", "output": [ { @@ -468,7 +468,7 @@ "schema": { "type": "string" }, - "example": "event: response.created\ndata: {\"type\":\"response.created\",\"response\":{\"id\":\"pdg-043293a6-d1a8-4695-81fe-603ad4661ebb\",\"object\":\"response\",\"created_at\":1790500000,\"model\":\"deepseek/deepseek-v4.1-flash\",\"status\":\"in_progress\",\"output\":[]}}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"output_index\":0,\"content_index\":0,\"delta\":\"Hello there,\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"output_index\":0,\"content_index\":0,\"delta\":\" nice to meet you.\"}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"response\":{\"id\":\"pdg-043293a6-d1a8-4695-81fe-603ad4661ebb\",\"object\":\"response\",\"created_at\":1790500000,\"model\":\"deepseek/deepseek-v4.1-flash\",\"status\":\"completed\",\"output\":[{\"type\":\"message\",\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"Hello there, nice to meet you.\"}]}],\"usage\":{\"input_tokens\":12,\"output_tokens\":8,\"total_tokens\":20}}}\n" + "example": "event: response.created\ndata: {\"type\":\"response.created\",\"response\":{\"id\":\"pdg-043293a6-d1a8-4695-81fe-603ad4661ebb\",\"object\":\"response\",\"created_at\":1790500000,\"model\":\"deepseek/deepseek-v4.1-flash-1017\",\"status\":\"in_progress\",\"output\":[]}}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"output_index\":0,\"content_index\":0,\"delta\":\"Hello there,\"}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"output_index\":0,\"content_index\":0,\"delta\":\" nice to meet you.\"}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"response\":{\"id\":\"pdg-043293a6-d1a8-4695-81fe-603ad4661ebb\",\"object\":\"response\",\"created_at\":1790500000,\"model\":\"deepseek/deepseek-v4.1-flash-1017\",\"status\":\"completed\",\"output\":[{\"type\":\"message\",\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"Hello there, nice to meet you.\"}]}],\"usage\":{\"input_tokens\":12,\"output_tokens\":8,\"total_tokens\":20}}}\n" } } }, @@ -2525,7 +2525,7 @@ "errors": 0 }, { - "model": "deepseek/deepseek-v4.1-flash", + "model": "deepseek/deepseek-v4.1-flash-1017", "path": "/chat/completions", "requests": 1702, "credits": 41.2, @@ -2962,7 +2962,7 @@ "message": "The model returned an error", "code": 429, "metadata": { - "raw": "deepseek/deepseek-v4.1-flash is temporarily rate-limited." + "raw": "deepseek/deepseek-v4.1-flash-1017 is temporarily rate-limited." } } } @@ -3587,7 +3587,7 @@ "model": { "type": "string", "description": "A model id exactly as listed by `GET /v1/models`.", - "example": "deepseek/deepseek-v4.1-flash" + "example": "deepseek/deepseek-v4.1-flash-1017" }, "models": { "type": "array", @@ -3864,7 +3864,7 @@ "properties": { "model": { "type": "string", - "example": "deepseek/deepseek-v4.1-flash" + "example": "deepseek/deepseek-v4.1-flash-1017" }, "prompt": { "oneOf": [ @@ -3964,7 +3964,7 @@ "properties": { "model": { "type": "string", - "example": "deepseek/deepseek-v4.1-flash" + "example": "deepseek/deepseek-v4.1-flash-1017" }, "input": { "description": "A string, or an array of input items (messages, function call outputs, and so on). Send the whole conversation: responses are not stored, and `previous_response_id` is not supported.", diff --git a/changelog.mdx b/changelog.mdx index af706f0..641a4b2 100644 --- a/changelog.mdx +++ b/changelog.mdx @@ -7,6 +7,13 @@ User-facing changes to the pre.dev API, SDKs, and dashboard. Subscribe via the [GitHub releases page](https://github.com/predotdev/predev-api/releases) to get notified on every SDK bump. +## 2026-10-19 + +### Coding agent on DeepSeek V4.1 Flash 1017 + +- The coding agent's default model is now DeepSeek V4.1 Flash 1017, the October 17 snapshot of DeepSeek V4.1 Flash. The model picker still lists it as **DeepSeek V4.1 Flash**. +- In the [AI Gateway](/ai-gateway/models), its id is `deepseek/deepseek-v4.1-flash-1017`. Apps that name `deepseek/deepseek-v4.1-flash` keep working. + ## 2026-10-12 ### Chat-only projects, in one Projects list diff --git a/coding-agent/built-in.mdx b/coding-agent/built-in.mdx index fe61fa0..a413f63 100644 --- a/coding-agent/built-in.mdx +++ b/coding-agent/built-in.mdx @@ -33,7 +33,7 @@ const res = await fetch('/predev-ai/chat/completions', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ - model: 'deepseek/deepseek-v4.1-flash', + model: 'deepseek/deepseek-v4.1-flash-1017', max_tokens: 1024, messages: [{ role: 'user', content: 'Summarize this note in three bullets: …' }], }), @@ -60,7 +60,7 @@ const client = new OpenAI({ // POST /api/summarize { text: string } export async function summarize(text: string) { const completion = await client.chat.completions.create({ - model: 'deepseek/deepseek-v4.1-flash', + model: 'deepseek/deepseek-v4.1-flash-1017', messages: [ { role: 'system', content: 'Summarize the user text in three bullets.' }, { role: 'user', content: text }, @@ -83,7 +83,7 @@ client = OpenAI( # POST /api/summarize {"text": "..."} def summarize(text: str) -> str: completion = client.chat.completions.create( - model="deepseek/deepseek-v4.1-flash", + model="deepseek/deepseek-v4.1-flash-1017", messages=[ {"role": "system", "content": "Summarize the user text in three bullets."}, {"role": "user", "content": text}, diff --git a/site/worker/chat.ts b/site/worker/chat.ts index 004ddae..0411ff1 100644 --- a/site/worker/chat.ts +++ b/site/worker/chat.ts @@ -18,7 +18,7 @@ import { askJev, type JevQuestion, type JevResult } from './jev'; import { readDocsFile, searchSections, type SectionHit } from './search'; import { splitPage } from './sections'; -const DEFAULT_WRITER = 'deepseek/deepseek-v4.1-flash'; +const DEFAULT_WRITER = 'deepseek/deepseek-v4.1-flash-1017'; const DEFAULT_JEV = 'jev-1.13.0'; const MAX_MESSAGES = 12; const MAX_MESSAGE_CHARS = 4000; diff --git a/site/wrangler.jsonc b/site/wrangler.jsonc index da3a344..5d5737a 100644 --- a/site/wrangler.jsonc +++ b/site/wrangler.jsonc @@ -18,7 +18,7 @@ { "name": "MCP_LIMITER", "namespace_id": "4102", "simple": { "limit": 600, "period": 60 } } ], "vars": { - "ASK_AI_MODEL": "deepseek/deepseek-v4.1-flash", + "ASK_AI_MODEL": "deepseek/deepseek-v4.1-flash-1017", "ASK_AI_JEV_MODEL": "jev-1.13.0", "ASK_AI_JEV": "on" }, diff --git a/skill.md b/skill.md index 1dde9e6..80c3cb6 100644 --- a/skill.md +++ b/skill.md @@ -60,7 +60,7 @@ from openai import OpenAI client = OpenAI(base_url="https://api.pre.dev/v1", api_key=os.environ["PREDEV_API_KEY"]) reply = client.chat.completions.create( - model="deepseek/deepseek-v4.1-flash", + model="deepseek/deepseek-v4.1-flash-1017", messages=[{"role": "user", "content": "Write a one-line welcome message."}], ) print(reply.choices[0].message.content)