You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am running a series of AI agents using langgraph. Each agent sends API call to deepseek-reasoner model. Sometimes, it gets stuck at first agent, sometimes second or third. I have also implemented five retries per agent but all five retries produce same error.
When making API calls to the deepseek-reasoner model, I am consistently receiving a JSONDecodeError: Expecting value error. This occurs even when the API returns an HTTP 200 status code, but the response body appears to be empty or malformed.
JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Steps Taken
To troubleshoot, I have:
Verified that my API key is valid and has sufficient quota.
Checked the API status page ([status.deepseek.com](http://status.deepseek.com/)) for any ongoing issues.
Implemented retry logic and fallback mechanisms, but the issue persists.
The text was updated successfully, but these errors were encountered:
Issue Description
I am running a series of AI agents using langgraph. Each agent sends API call to deepseek-reasoner model. Sometimes, it gets stuck at first agent, sometimes second or third. I have also implemented five retries per agent but all five retries produce same error.
When making API calls to the deepseek-reasoner model, I am consistently receiving a JSONDecodeError: Expecting value error. This occurs even when the API returns an HTTP 200 status code, but the response body appears to be empty or malformed.
Here is a snippet of the code I am using:
from langchain_openai import ChatOpenAI
llm_deepseek = ChatOpenAI(
model='deepseek-reasoner',
base_url="https://api.deepseek.com/",
api_key="<my_api_key>",
temperature=0,
model_kwargs={"response_format": {"type": "text"}}
)
response = llm_deepseek.invoke("formatted_prompt")
Error Details
The full traceback of the error is as follows:
JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Steps Taken
To troubleshoot, I have:
The text was updated successfully, but these errors were encountered: