Short answer
The official DeepSeek-R1 configuration on Hugging Face sets max_position_embeddings to 163,840. That verifies a model-configuration value; by itself, it does not establish the model’s advertised context window or guarantee that a hosted API accepts that many tokens. The reviewed official materials do not explain the relationship between this configuration value and a separately advertised model window. (huggingface.co)
For a specific hosted endpoint, check its provider listing. For example, DeepInfra lists 163,840 as the context length for deepseek-ai/DeepSeek-R1-0528. That is a provider- and model-specific listing, not a universal API limit.
The 128K figure is separate: DeepSeek’s August 2025 announcement assigned 128K context to the then-current deepseek-chat and deepseek-reasoner API aliases. It is historical API information—not a statement of R1’s model-configuration value, and not an explanation of how that value maps to an advertised R1 window. DeepSeek later announced that those aliases would be retired after July 24, 2026. (github.com)
Which context limit applies?
| What you are using | What the available documentation says | How to interpret it |
|---|---|---|
| DeepSeek-R1 open weights | The official Hugging Face config.json sets max_position_embeddings to 163,840. |
A model configuration value—not, on its own, a provider API guarantee or a separate advertised-window statement. (huggingface.co) |
| DeepInfra’s hosted R1-0528 | DeepInfra lists 163,840 for deepseek-ai/DeepSeek-R1-0528. |
A provider-specific endpoint listing. Confirm the limit for the exact model and deployment you use. |
DeepSeek’s former deepseek-reasoner API alias |
DeepSeek’s 2025 announcement said the alias had 128K context; the alias was later scheduled for retirement after July 24, 2026. | Historical hosted-API information. It does not establish the open-weight model’s advertised context window or a current R1 API limit. (github.com) |
These numbers should not be collapsed into one universal API limit: they refer to a configuration value, a named third-party endpoint, and historical API aliases. DeepSeek’s current API model table lists V4-family models, not an R1 API model; those models’ specifications should not be transferred to R1. (github.com)
How to check whether an R1 endpoint fits your workload
- Identify the exact model ID and provider. “DeepSeek-R1” may mean downloadable weights, an R1 update such as R1-0528, or a third-party hosted endpoint. Record the provider’s exact API model ID.
- Check that endpoint’s current context limit. For example, DeepInfra lists 163,840 for
deepseek-ai/DeepSeek-R1-0528. Do not assume another host offers the same allowance. - Check the provider’s token-accounting rules. If its documentation says input and output share a context window, compare the prompt—including retained conversation history and tool messages—with the expected generated output against that shared cap. If it documents separate input or output limits, check them separately. Do not infer an output allowance from a context figure alone.
- Leave room for the answer. As a planning example—not a claim about any provider’s enforcement—if an endpoint confirms a shared 163,840-token budget and a request uses 120,000 input tokens, the arithmetic leaves at most 43,840 tokens for output before reaching that total. Set the requested output limit below the remaining capacity if you need a margin.
A large configuration or endpoint limit describes capacity, not guaranteed retrieval quality. The available R1-specific evidence here does not establish a long-context recall guarantee, so test your own documents and task before relying on the full window.
Bottom line
The official DeepSeek-R1 configuration sets 163,840 maximum positions. Treat that as a configuration value—not, without additional documentation, a definitive advertised model window or a universal API limit. For production use, check the exact provider and model ID; DeepInfra, for example, lists 163,840 for its R1-0528 endpoint. The former deepseek-reasoner API’s 128K figure is historical API information and does not resolve the model-specification question. (huggingface.co)
