Whenever I try to access the assistants page a toast appears with the message “Failed to load assistants: TypeError: Failed to fetch”
From Chrome dev tools I saw that the request
GET https: //api (at) openai (at) com/v1/assistants?limit=100
is responding with status code 500 and the following body
{
“error”: {
“message”: “The server had an error processing your request. Sorry about that! You can retry your request, or contact us through our help center at help (at) openai (at) com if you keep seeing this error. (Please include the request ID req_5<…> in your email.)”,
“type”: “server_error”,
“param”: null,
“code”: null
}
}
I suppose it is a bug server-side in OpenAI, however I can access my personal account assistants without error.
Support at help (at) openai (at) com only directs me to a bot that ends my conversation as soon as I say what the problem is.
Does anyone experienced a similar issue? Is there any way to resolve it from client side? 2 days and no news from OpenAI yet…
I know there are some bugs related to usage and quota. Not getting response means that they are working on it and will fix it. in meanwhile to try use different account if its urgent.
We have 2 accounts. In one of them we discovered one of the Assistants was raising an error when read through the API. In this case, I cleared the Assistant Instructions (via API, because the read was not working, but the update was)
In our second account we didn’t find the “bad” assistant, thus we still have not found a Solution. Support only tells me they will reach me with a solution (it has been 2 months….)
4 months, no solution. Almost no answer from support.
Some tickets from 12 weeks ago not event seen
Some tickets from 3 week ago seen but not answered.
I guess their support is really bad
There is no problem with the API backend itself, it might be you are using a IP address that can not access the API server. Or try remove assistant and add it again if is for development purpose. OpenAI will not response in case when there is no issue and the issue you are facing is not related to the API or your account.
Here is an example for Nodejs and Python. I tested both and both will return list of the assistants that I created.
import axios, { AxiosError } from 'axios';
import dotenv from 'dotenv';
// Load environment variables from .env file
dotenv.config();
// Check if OPENAI_API_KEY is set
if (!process.env.OPENAI_API_KEY) {
console.error('OPENAI_API_KEY is not set in the environment variables');
process.exit(1);
}
async function listAssistants() {
try {
const response = await axios.get('https://api.openai.com/v1/assistants', {
params: {
order: 'desc',
limit: 20,
},
headers: {
'Authorization': `Bearer ${process.env.OPENAI_API_KEY}`,
'OpenAI-Beta': 'assistants=v2',
},
});
console.log(response.data);
} catch (error) {
if (error instanceof AxiosError) {
console.error('API Error:', error.response?.data || error.message);
} else {
console.error('Unexpected error:', error);
}
}
}
listAssistants();
Python:
import os
import requests
from requests.exceptions import RequestException
# Load environment variables
from dotenv import load_dotenv
load_dotenv()
# Check if OPENAI_API_KEY is set
if not os.getenv('OPENAI_API_KEY'):
print('OPENAI_API_KEY is not set in the environment variables')
exit(1)
def list_assistants():
try:
response = requests.get(
'https://api.openai.com/v1/assistants',
params={'order': 'desc', 'limit': 20},
headers={
'Authorization': f"Bearer {os.getenv('OPENAI_API_KEY')}",
'OpenAI-Beta': 'assistants=v2'
}
)
response.raise_for_status() # Raise exception for non-200 status codes
print(response.json())
except RequestException as e:
print(f'API Error: {e.response.json() if e.response else e}')
except Exception as e:
print(f'Unexpected error: {e}')
list_assistants()
I think is a parsing error in one of my assistants instructions.
If I lower the limit from 10 to 1 it works (same call, same api token, same organization).