Gpt-5 stuck! gpt-5 throwing timeout errors

I am trying to deploy an custom api which uses gpt-5 in aws lambda.

this is what it throws:
APIConnectionTimeoutError: Request timed out.
at OpenAI.makeRequest (C:\Users\hi\Downloads\vsm-sitemap-optimization-serverless\vsm-sitemap-optimization-serverless\node_modules\openai\client.js:266:23)
at async invokeModel (C:\Users\hi\Downloads\vsm-sitemap-optimization-serverless\vsm-sitemap-optimization-serverless\handler.js:74:32)
at async exports.handle (C:\Users\hi\Downloads\vsm-sitemap-optimization-serverless\vsm-sitemap-optimization-serverless\handler.js:149:29) {
status: undefined,
headers: undefined,
requestID: undefined,
error: undefined,
code: undefined,
param: undefined,
type: undefined
}

No results until i set reasoning_effort:minimal is it happening with everyone?
i am sending 20K characters as input.
if i switch to gpt-4 family it works perfect not with 5.

Welcome, @B_Sai_Kiran_Reddy …

Off the top of my head, maybe it’s a Usage Tier issue?

https://platform.openai.com/docs/guides/rate-limits/usage-tiers?context=tier-one

That is, if you’re a lower tier, you might not have access to the full GPT-5?

The code works okay with other models, you say?

If you are running a reasoning model (or not streaming) on a cloud worker platform that will drop inactive open connections (typically after 60 seconds), you will need to find another host.

Alternately, on the Responses endpoint, you can request a job in “background” API parameter. Then poll to get the final answer, with lower-quality user experience.

It is a paid one. I tested it with reasoning medium and verbosity high, which worked a few hours back, but now it is not working. Even yesterday, it did not work.

I first tested it locally, which was also failing with a max timeout set to 40 minutes, but I was getting a timeout error from the OpenAI API within 15-20 minutes.

In the Lambda serverless environment, it sometimes fails and sometimes passes because we may get a response within 14.9 minutes. However, if the OpenAI API takes 15.1 minutes to process, the Lambda will throw a timeout error because the Lambda’s maximum timeout is capped at 15 minutes.

Also tried streaming, did not work for me.

Trying locally, Python SDK:

from openai import Client
client = Client(timeout=1800,max_retries=0,)  # half an hour

Probably the biggest improvement is "service_tier": "priority", delivering a substantial increase in the token production rate. SLA there is 50+ TPS. 15 minutes of that is a $0.50 bill normally, then double the cost for priority. (yet just 35% of the context window for generation). Almost, “pay up or be limited”.

15+ minutes is O3-Pro with a huge processing task, or o3 deep research on the web, not my expectation of GPT-5.

Gambling a dollar when you have “background” on responses, doesn’t make sense if these long tasks are your application.

I had a separate (or the same) issue: gpt-5-chat-latest, sending it token soup the rate limiter should deny quickly because the input was larger than the 128000 context window of the “chat” model (but acceptable input for 272k of normal gpt-5): hanging forever until I got tired about 10 minutes in. You could be waiting on going nowhere.