惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Engineering at Meta
Engineering at Meta
C
Cyber Attacks, Cyber Crime and Cyber Security
博客园 - 司徒正美
月光博客
月光博客
Hugging Face - Blog
Hugging Face - Blog
T
Tailwind CSS Blog
罗磊的独立博客
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
博客园 - 三生石上(FineUI控件)
博客园_首页
博客园 - 【当耐特】
Cisco Talos Blog
Cisco Talos Blog
J
Java Code Geeks
C
CXSECURITY Database RSS Feed - CXSecurity.com
S
SegmentFault 最新的问题
人人都是产品经理
人人都是产品经理
Jina AI
Jina AI
AWS News Blog
AWS News Blog
S
Schneier on Security
NISL@THU
NISL@THU
F
Fortinet All Blogs
L
LINUX DO - 热门话题
Google DeepMind News
Google DeepMind News
量子位
IT之家
IT之家
T
The Exploit Database - CXSecurity.com
爱范儿
爱范儿
GbyAI
GbyAI
T
The Blog of Author Tim Ferriss
T
Tor Project blog
V
Vulnerabilities – Threatpost
V
Visual Studio Blog
宝玉的分享
宝玉的分享
Spread Privacy
Spread Privacy
L
Lohrmann on Cybersecurity
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Y
Y Combinator Blog
D
Darknet – Hacking Tools, Hacker News & Cyber Security
P
Privacy International News Feed
S
Securelist
P
Palo Alto Networks Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
A
Arctic Wolf
T
Tenable Blog
B
Blog
C
CERT Recently Published Vulnerability Notes
P
Proofpoint News Feed
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
T
Threat Research - Cisco Blogs
T
Threatpost

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant Common SOC 2 Failures (Real World) Stop Vibe-Checking Your AI App: A Practical Guide to Evals How to Use SonarQube and SonarScanner Locally to Level Up Your Code Quality Your Next To-Do App Is Dead — I Replaced Mine with an OpenClaw AI Sign a Nostr event in 60 lines of Python using coincurve — no nostr-sdk, no nbxplorer, no rust toolchain ITGC Audit Explained Like You’re in Big 4 Patch Tuesday abril 2026: Microsoft parcha 163 vulnerabilidades y un zero-day en SharePoint Stop scraping everything: a better way to track competitor price changes Listing on MCPize + the Official MCP Registry while routing payments OUTSIDE the marketplace — how I kept 100% of my x402 revenue Building an AI-Powered Risk Intelligence System Using Serverless Architecture Why We Ripped Function Overloading Out of Our AI Toolchain Testing AI-Generated Code: How to Actually Know If It Works SaaS Churn Is Killing Your Business. Here Is What to Do About It (Without a Support Team) The Speed of AI Is No Longer Linear - And Self-Improving Models Are Why How to Implement RBAC for MCP Tools: A Practical Guide for Engineering Teams From Standard Quote to Persuasive Proposal: AI Automation for Arborists I built a CLI that scaffolds complete multi-tenant SaaS apps Axios CVE-2025–62718: The Silent SSRF Bug That Could Be Hiding in Your Node.js App Right Now The dashboard that ended our friendship Data Pipelines Explained Simply (and How to Build Them with Python) The Hidden Cost of AI Systems Nobody Talks About. undefined vs undeclared, and how typeof behaves Switching from file-based jobs to NATS/Kafka in Rust without changing code io_uring Adventures: Rust Servers That Love Syscalls Why Agentic AI is Killing the Traditional Database The POUR principles of web accessibility for developers and designers Quantum Neural Network 3D — A Deep Dive into Interactive WebGL Visualization How To Install Caveman In Codex On macOS And Windows Automation Pipeline Reliability: Why Your Workflow Breaks When Nobody Is Watching I Built an 'Open World' AI Coding Agent — It Works From ANY Folder From Freelancing to Product: A Tech Service Company's SaaS Transformation China's AI Giants: Adding Tencent Hunyuan & ByteDance Doubao to AI University (74 Providers) On the Vibe Coders and Their Lies clerk: Auto-Summarize Your Claude Code Sessions AI Weekly — 2026/04/10–04/17 | The Model Lockdown Is Here, but the Toolchain Is the Real Battleground AI 週報 — 2026/04/10–2026/04/17 模型封鎖潮來了,但工具鏈才是真戰場 Maybe this is how Open-Source apps are born... 🚀 Fine-Tune LLMs with LoRA and QLoRA: 2026 Guide tRPC v11 + Next.js App Router: End-to-End Type Safety Without the Boilerplate ShadCN UI in 2026: Why I Stopped Installing Component Libraries and Started Owning My Components SaaS Billing in React Server Components: Stripe + Supabase Without a Single `useEffect` Join our DEV Weekend Challenge — $1,000 in Prizes Across TEN winners! Submissions Due April 20 at 6:59 AM UTC. Implementing FSRS Spaced Repetition in Flutter + Supabase — Adding Memory Science to an AI Learning App "I Texted My Localhost From the Train — Claude Code Fixed the Bug Before I Got Home" I Built a Sales Prep AI and It Went Deeper Than Expected Design to Code #2: One JSON, Eleven Outputs Solving the 100M-Row Problem: A Summary Table Pattern for High-Volume Push Notification Logs Flutter Web With Wasm: What Actually Changes For Developers I Built 50 Royalty-Free Soundtracks for My Side Project in a Weekend Using AI Music Generation The Vibe Coding Security Checklist: 7 Things to Check Before You Ship Stop Letting Googlebot Guess Fix Your React App's SEO Right Desconstruindo o Streaming do LinkedIn: Como Criar um Engine de Extração de Vídeo de Alta Performance com HLS e FFmpeg (EDA Part-1) EDA (Exploratory Data Analysis) Explained With Real Life — Why Looking at Your Data Is the Most Important Step in Machine Learning Brand Relationship Management at Scale: Our 4-Touch Outreach System for 200+ Brands Why String.fromEnvironment() Might Return an Empty String in Dart JGuardrails 1.0.0 — Hardening Java LLM Apps Against Jailbreaks, Toxicity, and Prompt Injection Plan and Schedule a Full Week of Threads Content From One Claude Conversation Coding Cat Oran Ep3, Five Tables Changed Everything Updated: BFF Pattern I'm done watching freelancers get buried by 200 proposals. So I'm building the alternative. This is my first post BFS Algorithm in Java Step by Step Tutorial with Examples Tracking LLM Pricing Monthly: An Open Dataset for 22 AI Models How We Measure Content ROI on a Comparison Site: Revenue Attribution Without Perfect Data Introducing Nova AI Ops: The AI-Native Operating System for SRE Teams I built a free desktop video downloader for Windows — Grabbit How Talkie OCR Helps Vision-Impaired & Dyslexic Users Read the World Around Them VRCFaceTracking安装和iPhone面捕配置教程,有bug Even CrowdStrike Can't See Your Agents The Automation Gold Rush: What n8n Workflows and Claude Are Opening Up for Developers Right Now
DeepSeek's Response API Isn't OpenAI Responses. That One Parser Mistake Drops the Reasoning.
tokenmixai · 2026-06-27 · via DEV Community

I keep seeing developers use "DeepSeek response API" and "OpenAI Responses API" as if they mean the same thing.

They do not.

That small naming mistake can make your integration look like it works while quietly dropping the most important field in the response: reasoning_content.

I spent time checking the DeepSeek V4 docs and the live TokenMix model catalog. The practical answer is simple:

DeepSeek is OpenAI-compatible at the Chat Completions layer. It is not documented as OpenAI /responses compatible.

TL;DR

  • No, DeepSeek's response protocol is not the OpenAI /responses API. It is /chat/completions.
  • The important extra field is choices[0].message.reasoning_content.
  • If your wrapper only parses message.content, you may lose DeepSeek's thinking output.
  • DeepSeek V4 now uses deepseek-v4-flash and deepseek-v4-pro; old deepseek-chat and deepseek-reasoner names are scheduled for deprecation.
  • TokenMix supports DeepSeek V4 Flash and Pro through one OpenAI-compatible base URL, with reasoning, streaming, JSON, tools, structured output, and prompt caching marked in its live catalog.

What actually changed

DeepSeek V4 moved the model naming story forward.

The old mental model was:

Old model name What people assumed
deepseek-chat normal chat
deepseek-reasoner reasoning model

The newer V4 model IDs are:

New model Best read
deepseek-v4-flash cheaper/high-throughput V4
deepseek-v4-pro stronger reasoning/coding V4

DeepSeek's docs say the older deepseek-chat and deepseek-reasoner names are compatibility aliases heading toward deprecation on 2026-07-24 15:59 UTC.

That means I would not build new production code around the old names.

The response object that matters

If you are used to OpenAI Chat Completions, this will look familiar:

{
  "choices": [
    {
      "message": {
        "content": "final answer",
        "reasoning_content": "thinking output",
        "tool_calls": []
      },
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 123,
    "completion_tokens": 456,
    "completion_tokens_details": {
      "reasoning_tokens": 300
    }
  }
}

The trap is that most basic wrappers only do this:

answer = response.choices[0].message.content

That gets the final answer.

It does not get the thinking output.

For some products, that is fine. For debugging, evals, agent traces, and tool workflows, it is not fine.

The parser I would use

I would parse DeepSeek responses explicitly:

def parse_deepseek_response(response):
    choice = response.choices[0]
    message = choice.message

    return {
        "answer": getattr(message, "content", None),
        "reasoning": getattr(message, "reasoning_content", None),
        "tool_calls": getattr(message, "tool_calls", None),
        "finish_reason": choice.finish_reason,
        "usage": getattr(response, "usage", None),
    }

That is not fancy. It is the minimum safe parser.

The point is not to show chain of thought to users. The point is to avoid silently losing fields that affect debugging, evals, and tool-call continuation.

The tool-call caveat

This is the part I would not ignore.

DeepSeek's thinking-mode docs distinguish normal multi-turn chat from tool-call workflows.

For ordinary multi-turn conversations, you do not need to pass prior chain-of-thought content back.

But when tool calls are involved, DeepSeek says the intermediate reasoning_content after a tool call must be passed back in the following request.

That means a generic OpenAI wrapper can fail in a very boring way:

  1. It receives reasoning_content.
  2. It stores only role and content.
  3. It calls your tool.
  4. It sends the next request without the reasoning field.
  5. The model's tool workflow loses context.

That is the kind of bug that does not always crash. It just makes the agent worse.

The decision tree

Here is how I would decide what to implement:

def deepseek_integration_plan(app):
    if app["uses_old_model_names"]:
        return "Migrate from deepseek-chat/deepseek-reasoner to deepseek-v4-flash or deepseek-v4-pro."

    if app["uses_tools"] and app["thinking_enabled"]:
        return "Preserve reasoning_content across tool-call turns. Do not use a content-only wrapper."

    if app["needs_json"]:
        return "Use response_format={\"type\":\"json_object\"} and still validate the result."

    if app["high_volume"]:
        return "Start with deepseek-v4-flash and track cache hit/miss tokens."

    if app["hard_reasoning"]:
        return "Benchmark deepseek-v4-pro with reasoning enabled."

    return "Use Chat Completions compatibility, but parse DeepSeek-specific fields explicitly."

I like this tree because it avoids the biggest false choice.

The question is not "Is DeepSeek OpenAI-compatible?"

The question is "Which compatibility layer are you depending on?"

TokenMix angle: one endpoint, but still parse the fields

TokenMix exposes DeepSeek through an OpenAI-compatible base URL:

https://api.tokenmix.ai/v1

The live catalog currently lists:

Model Reasoning JSON Tools Streaming Prompt cache
deepseek/deepseek-v4-flash yes yes yes yes yes
deepseek/deepseek-v4-pro yes yes yes yes yes

That is useful because you can route DeepSeek alongside OpenAI, Claude, Gemini, Qwen, GLM, and other models through one endpoint.

But the same caveat remains:

OpenAI-compatible routing gets the request through.

Correct parsing still belongs to you.

Cost math in one minute

The cost story is also easy to misunderstand.

DeepSeek direct pricing separates cache-hit input, cache-miss input, and output tokens.

TokenMix publishes catalog rates for routing through its endpoint.

For example, using the live TokenMix catalog rates I checked:

Model Input / 1M Output / 1M
DeepSeek V4 Flash $0.132353 $0.264706
DeepSeek V4 Pro $0.419118 $0.838235

So a 10M input / 2M output workload is roughly:

Flash = 10 * 0.132353 + 2 * 0.264706 = $1.85
Pro   = 10 * 0.419118 + 2 * 0.838235 = $5.87

That makes Flash the obvious first route for high-volume tasks.

I would only pay for Pro where Flash fails on your actual evals.

What I'd do in production

If I were shipping DeepSeek V4 this week, I would:

  • Stop using old model names in new code.
  • Parse content, reasoning_content, tool_calls, finish_reason, and usage.
  • Preserve reasoning_content in thinking-mode tool workflows.
  • Use JSON mode only with explicit prompt instructions and validation.
  • Track cache hit/miss tokens separately.
  • Start with Flash, then escalate to Pro only on failing tasks.
  • Put DeepSeek behind a router instead of making it the only backend.

That last point matters.

One endpoint does not remove the need for fallback.

It just makes fallback less painful.

Disclosure

If you want DeepSeek, OpenAI, Claude, Gemini, Qwen, GLM and other models behind one OpenAI-compatible endpoint, that is roughly what TokenMix does. Disclosure: I work on the research side. Full cited breakdown is on the original article.

Bottom line

DeepSeek response compatibility is real, but it is not the OpenAI Responses API.

Treat it as Chat Completions compatibility plus DeepSeek-specific fields. Parse reasoning_content intentionally, migrate to V4 model IDs, and do not let a generic wrapper quietly erase the data you need for reasoning, tools, and evals.

Have you seen OpenAI-compatible wrappers drop provider-specific fields like reasoning_content or cache usage? How did you handle it?