DeepSeek-V4-Pro on Foundry: every request fails with 413 "Max size: 4000 tokens" per-request cap, not TPM

Romir Chekuri 0 Reputation points
2026-07-25T08:17:48.1933333+00:00

My DeepSeek-V4-Pro deployment (Global Standard) returns HTTP 413 on every single request, regardless of input size:

{"error":{"code":"tokens_limit_reached","message":"Request body too large for deepseek-v4-pro model. Max size: 4000 tokens."}}

Even a one-word message fails, because any client with normal system-prompt overhead exceeds 4000 tokens. The model natively supports a 128K+ context window, so this appears to be a deployment-level or backend cap, not a model limitation.

Details:

  • Resource: flashai-resource (Foundry), region West US 3
  • Deployment: DeepSeek-V4-Pro, Global Standard, model version 2026-04-23
  • TPM allocated: 500K (can raise to 1M in the portal — doesn't help)
  • RPM: 250/1000 used — not throttled
  • Endpoint: OpenAI-compatible /openai/v1/chat/completions, key auth works fine
  • The quota dashboard shows only an RPM metric for this model (no TPM metric listed), and no portal setting exposes a per-request/context-length limit

What I've ruled out:

  • Not client-specific: reproduces via multiple clients and through a LiteLLM proxy
  • Not TPM/RPM throttling (usage far below limits, and the error is 413 tokens_limit_reached, not 429)
  • Redeploying and adjusting the TPM slider changes nothing
  • I've submitted the quota increase form, but it only measures TPM capacity units, which isn't the limit being hit

Use case: agentic coding tools (Cline, Codex CLI) via the OpenAI-compatible endpoint — these carry 10-20K tokens of standard prompt/tool overhead per request, so a 4000-token request cap makes the deployment unusable.

Question: Is the 4000-token per-request limit on DeepSeek-V4-Pro Global Standard deployments intentional, and can it be raised for a subscription/deployment? If it's a backend default, what is the correct channel to request an increase, since the quota form only covers TPM? I've seen the same class of issue reported for other Foundry serverless models (e.g. an 18K cap on Mistral), so a pointer to the right escalation path would help others too.

Foundry Models
Foundry Models

A catalog of AI models in Microsoft Foundry that you can discover, compare, and deploy using Azure’s built‑in tools for evaluation, fine‑tuning, and inference


1 answer

Sort by: Most helpful
  1. Sina Salam 31,376 Reputation points Volunteer Moderator
    2026-07-27T08:55:46.14+00:00

    Hello Romir Chekuri,

    Welcome to the Microsoft Q&A and thank you for posting your questions here.

    I understand that your DeepSeek-V4-Pro on Foundry: every request fails with 413 "Max size: 4000 tokens" per-request cap, not TPM.

    Regarding your questions:

    Is the 4000-token per-request limit on DeepSeek-V4-Pro Global Standard deployments intentional, and can it be raised for a subscription/deployment? If it's a backend default, what is the correct channel to request an increase, since the quota form only covers TPM? I've seen the same class of issue reported for other Foundry serverless models (e.g. an 18K cap on Mistral), so a pointer to the right escalation path would help others too.

    • It is being enforced by the deployed Foundry endpoint. Whether it is an intentional service limit or a backend defect cannot be determined by the customer and requires Microsoft Support to confirm.
    • There is no documented self-service method to increase the per-request input limit for Azure AI Foundry serverless model deployments.
    • No. TPM controls throughput and cannot change a 413 request-size validation limit.
    • No. It only handles TPM/RPM capacity, not per-request payload limits.

    Since you've opened an Azure Support technical case, is the best they will fix 4,000-token rejection.

    I hope this is helpful. Please! Do not hesitate to let me know if you have any other questions, steps or clarifications.


    Please do not close the thread by upvoting and accepting the answer if any part of it is helpful.

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.