(Resolved - Service seems back) DeepSeek-V3(x) model only works with stream option True, otherwise timeout

Xiwei Zhou 10 Reputation points
2025-04-22T23:28:51.4466667+00:00

DeepSeek-V3 and DeepSeek-V3-0324 model stop working on non-streaming request.

Simple use the example shows timeout. Using "stream=True" then works.

import os
from azure.ai.inference import ChatCompletionsClient
from azure.ai.inference.models import SystemMessage, UserMessage
from azure.core.credentials import AzureKeyCredential

endpoint = "https://XXXXXX.services.ai.azure.com/models"
model_name = "DeepSeek-V3-0324"

client = ChatCompletionsClient(
    endpoint=endpoint,
    credential=AzureKeyCredential("<API_KEY>"),
)

response = client.complete(
    messages=[
        SystemMessage(content="You are a helpful assistant."),
        UserMessage(content="I am going to Paris, what should I see?")
    ],
    max_tokens=2048,
    temperature=0.8,
    top_p=0.1,
    presence_penalty=0.0,
    frequency_penalty=0.0,
    model=model_name
)

print(response.choices[0].message.content)
Azure AI services
Azure AI services
A group of Azure services, SDKs, and APIs designed to make apps more intelligent, engaging, and discoverable.
3,614 questions
{count} vote

1 answer

Sort by: Most helpful
  1. JAYA SHANKAR G S 3,960 Reputation points Microsoft External Staff Moderator
    2025-04-24T06:59:19.16+00:00

    Hello @Xiwei Zhou ,

    I am converting the comment to answer so that it will help the community to find better solution.

    Issue:
    The DeepSeek-V3 and DeepSeek-V3-0324 models were returning timeouts or internal server errors for non-streaming (stream=False) requests. However, streaming requests (stream=True) continued to work as expected.

    Solution:
    This issue appears to be transient and related to temporary backend unavailability. If you encounter similar errors with non-streaming requests (such as timeouts or internal server errors), please try the following steps:

    1. Retry the request after a short wait, as the service may take time for fully available after deployment.
    2. If the issue persists beyond a reasonable period, capture the apim-request-id from the response headers and share it with Azure support for further investigation.

    Please do accept the solution and give feedback by clicking on yes.

    Thank you


Your answer

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