DeepSeek model behaviour
DeepSeek's reasoning models and their distilled variants: how reasoning content is exposed, why the system prompt behaves unusually, and what each size actually holds.
DeepSeek’s API is deliberately OpenAI-shaped: the same base path, the same messages array, the same choices[0].delta in a stream. That similarity is useful and it is also where the surprises come from, because the places DeepSeek differs are not announced by a different-looking response. A reasoning model returns an extra field alongside content. Four sampling parameters are accepted and discarded while two others raise a 400. A caching layer you never asked for changes the bill and reports itself in two usage counters that have no equivalent elsewhere.
The second thing to hold on to is that “DeepSeek-R1” names two different things — a hosted endpoint and a set of open weights — and the reasoning trace is exposed differently by each. These pages work through the observable behaviour of both: what is in the response, which parameters do what, what the model card and the licence actually say, and where the documented value is expected to move.
DeepSeek-V3's Context Window and Output Limit
The context length DeepSeek publishes for V3, where the number is recorded, and why the output ceiling is a separate and much smaller figure.
8 min read
DeepSeek-R1's Reasoning Tokens and How They're Billed
Where reasoning tokens appear in the usage object, why they are charged at the output rate, and a worked bill separating them from the answer you keep.
8 min read
Parsing DeepSeek-R1's think Block Out of the Response
A parser that separates R1's reasoning trace from its answer, handling both the hosted API's separate field and the open weights' literal tags.
9 min read
Function Calling in DeepSeek: Which Models and What Format
The tool-call request and response shape DeepSeek documents, which endpoints expose it, and the instability DeepSeek warns about in its own docs.
8 min read
Why DeepSeek-R1 Ignores the System Prompt
Your system message is accepted without error and has no visible effect on R1; what DeepSeek actually recommends, why the reasoning phase swamps it, and where to put the instruction instead.
8 min read
DeepSeek's Tokenizer and Vocabulary Size
The vocabulary size DeepSeek ships, the special tokens that make its templates unusual, and how to count tokens exactly rather than estimating.
8 min read
Context Caching on Disk in the DeepSeek API
DeepSeek caches prompt prefixes on disk automatically, reports hits and misses in two usage fields, and discounts the hit portion of your input.
8 min read
The Streaming Response Shape of the DeepSeek API
The SSE envelope DeepSeek emits, what a delta contains, how reasoning content arrives on its own key, and the finish_reason value that has no OpenAI equivalent.
8 min read
DeepSeek's Model Licence: What the Terms Permit
Which licence applies to DeepSeek's open-weight releases, why code and weights are licensed separately, and why the distilled variants are governed by someone else's terms.
8 min read
DeepSeek-V3's Mixture-of-Experts Architecture and Active Parameters
The total and active parameter counts DeepSeek publishes for V3, what 'active' means for a single token, and which of the two numbers predicts cost.
8 min read
Stop Sequences in the DeepSeek API
The stop parameter's shape and limit, why the matched sequence is removed from the output, and why finish_reason cannot tell you a stop sequence fired.
7 min read
DeepSeek's max_tokens Default and Output Ceiling
The default and maximum output length DeepSeek documents for each endpoint, why the reasoning endpoint's are far larger, and what truncation looks like.
8 min read
DeepSeek's Documented Content Policy Restrictions
Where DeepSeek's rules for the hosted API are published, what signal a blocked request returns, and why self-hosted weights are governed by something else entirely.
8 min read
JSON Mode Output in the DeepSeek API
How to enable DeepSeek's JSON output mode, the two conditions its documentation attaches to it, and the failure modes it does not protect you from.
8 min read
DeepSeek-R1's Distilled Variants: Context Window by Size
Each R1-distill inherits its architecture and its context window from a Qwen or Llama base, which is why the sizes do not share one number.
9 min read
Why DeepSeek-R1's Reasoning Trace Varies Run to Run
The same prompt produces a different think block every time because the reasoning phase is sampled and you cannot turn the sampling off from the API.
8 min read
DeepSeek's Two Model Names: deepseek-chat and deepseek-reasoner
Two model names on one base URL that differ in accepted parameters, response fields, output ceilings and feature support — and what changes in your client for each.
8 min read
Why DeepSeek-R1 Ignores the Temperature Parameter
Temperature is accepted without error on the reasoning endpoint and has no effect; which parameters error instead, why the sampling is fixed, and what you can still control.
8 min read
Other topics
- LLM fundamentals & architecture
- Tokens, tokenization & context windows
- Prompt engineering
- Reasoning models & test-time compute
- Multimodal AI: vision, audio, video
- RAG & retrieval
- Embeddings & vector search
- AI agents & tool use
- Structured output & function calling
- Fine-tuning & post-training
- Local inference errors, string by string
- Running local models day to day
- Testing code that calls an LLM
- Snapshot and property testing for model output
- Regression suites for prompts
- Eval gates in CI
- Flaky tests against a model
- Determinism and the cost of testing
- Contract and streaming tests
- Testing tool calls and retrieval
- Inference, serving & latency
- Rolling out a prompt change
- Testing AI systems in practice
- Forecasting a time series
- Machine learning on tabular data
- Geospatial data and models
- Understanding audio that is not speech
- Understanding video
- Core computer vision tasks
- Machine learning on graphs
- Point clouds and 3D
- Evaluation, benchmarks & LLM-as-judge
- Sensor and IoT data
- Logs and event streams
- Models over biological sequences
- Machine learning on molecules
- Embedding and searching code
- Extracting invoices and purchase orders
- Receipts, statements and tax forms
- Insurance policies and contracts
- Deeds, court filings and patents
- Extracting from medical records
- Observability & LLMOps
- CVs, certificates and identity documents
- Shipping, customs and technical documents
- Meetings, email, chat and filled-in forms
- Building an extraction pipeline
- Business, property and inspection documents
- Contract clauses and insurance claims
- Regulated and compliance documents
- Consumer, travel and closing documents
- Mapping one chat API onto another
- SDK and framework migrations
- Hallucination & failure modes
- Re-embedding and model deprecation
- Cutting over between providers
- Parity gaps, shims and legacy endpoints
- Moving between model versions
- Migrating vector stores and caches
- Mapping capabilities and parameters
- Migrating pipelines and agents
- Contracts, runbooks and rollback
- Auditing a codebase before a cutover
- Compliance and fine-tune migration
- LLM cost engineering
- Routing, cost tracking and multi-tenancy
- What a migration does to your prompts
- AI security & prompt injection
- Privacy, compliance & data residency
- AI governance, policy & society
- Building reliable AI applications
- AI hardware, GPUs & compute
- Open-weight models & local inference
- AI for developers & coding agents
- AI in industry: vertical playbooks
- AGI, superintelligence, alignment & the long future
- Machine learning foundations
- NLP fundamentals & classical tasks
- Data engineering for AI
- Synthetic data & dataset curation
- AI product design & UX
- Search, ranking & recommendation
- Enterprise adoption & change management
- AI careers, skills & teams
- Reading AI research
- AI in science & discovery
- Robotics & embodied AI
- AI economics, markets & business models
- AI myths, hype & media literacy
- Context engineering
- Shipping AI features: patterns & anti-patterns
- Build it: end-to-end AI tutorials
- Python for AI: hands-on recipes
- TypeScript, React and the web
- Frameworks and SDKs
- Errors and troubleshooting
- AI facts, numbers and statistics
- The history of AI
- The maths behind AI
- Architectures beyond the transformer
- Reinforcement learning
- Diffusion and generative media
- Speech, audio and voice engineering
- Benchmarks, one at a time
- AI search visibility
- Infrastructure and operations
- Databases and storage for AI
- Knowledge graphs and structured knowledge
- Classical ML in production
- Regulation, jurisdiction by jurisdiction
- Prompt recipes and pattern library
- AI for people who do not write code
- Writing, media and creative work
- Edge and on-device AI
- Interpretability and model internals
- Field notes
- OpenAI model behaviour
- Claude model behaviour
- Gemini model behaviour
- Llama model behaviour
- Mistral model behaviour
- Qwen model behaviour
- Cohere model behaviour
- Grok model behaviour
- Small model behaviour
- Hybrid model architectures
- Token cost by language and script
- Transliteration, romanization and script handling
- Locale-correct output
- Multilingual generation quality
- Multilingual pipelines
- The EU AI Act, article by article
- AI under the GDPR and EU data law
- US AI regulation, state and sector
- International AI governance and standards
- AI litigation and enforcement
- Running AI workloads on AWS
- Running AI workloads on Google Cloud
- Running AI workloads on Azure
- AI at the edge: Workers, Vercel and Netlify
- Serving models on Kubernetes
- Operating AI infrastructure
- Quantization formats and what they cost
- llama.cpp, flag by flag
- Ollama and the desktop local-model runtimes
- Local models on Apple Silicon
- Hardware for local inference
- Running speech and embedding models locally
- Model files, adapters and conversion
- VRAM arithmetic for local models