Is o1-preview API still currently available for Tier-4 users?

I am a researcher trying to do some automated experiments on o1-preview using the openai API. My code worked well last week and I have already spent at least $800 on o1-preview API.

However, this week, I found openai API always responded with Connection Error, although it may sometimes respond correctly for at most 10 questions. It is quite awkward since it could work well last week and suddenly failed this week.

I think this is nothing to do with the rate limit since they claimed that there could be 10,000 requests per minute for Tier-4 users according to o1-preview limit usage (and I request at most 100 times every minute).

I am not sure what is going on here. Does OpenAI limit the request for o1-preview? or do I send too many requests before so they cut off the connection? I wish to receive some suggestions so that I could rerun my code and experiments. It is quite annoying receiving so many connection errors…

There is more message returned than the raised error type.

503? I suspect that this is Cloudflare firewall between you and the API that could be allowing far less than the API provisioning.

This could come about from making requests from a less-trusted IP address range, such as a dynamic IP block or other consumer addresses. Cloudflare attempts to mitigate DDoS that comes from such addresses.

You can make the same blast of calls to gpt-4o-mini and see if it is model specific. Cloudflare shouldn’t be inspecting the contents down to the model level.

The Python openai library retries on its own unless you set max_retries on the client, which can triple the usage after failure. The initial error should be handled with a backoff strategy.

1 Like

Thanks a lot, I think your explanation is quite reasonable. I used openai python library to interact and got responses like the following exceptions:

.................
         raise RemoteProtocolError(msg)
httpcore.RemoteProtocolError: Server disconnected without sending a response.

The above exception was the direct cause of the following exception: 
Traceback (most recent call last):
  File "xxxxxxxxxxxxxx/llm_interact/o1_interact.py", line 14, in openai_query
    result = client.chat.completions.create(
......................
File "/home/xxx/.conda/envs/hallu/lib/python3.9/site-packages/openai/_base_client.py", line 952, in _request
    raise APIConnectionError(request=request) from err
openai.APIConnectionError: Connection error.

I’ve tried gpt-3.5-turbo and gpt-4o and they went well with my code, only the o1-preview went bad (o1-mini seemed to have the similar issue but could run more questions before disconnected). So I think it might be a IP issue but only for o1 series?

Thanks for your nice reply.

1 Like

o1 models take a long time to respond, with no stream or progress, and some cloud worker platforms have timeouts. Also hosts that just don’t allow Python to run that long at all.

That may be the difference, when only GPT-4-0613 writing a novel can equal that length of time spent.

The openai library itself should be using a client with a 600 second timeout - but there are lots of ill-advised code examples out there setting it to less.

Even the openai playground was “we took your money, now shove it” with network errors trying to use o1-preview, where the time to respond is all the internal reasoning plus the time to produce the output language before you get anything back.

I would try on a local python under your control, where besides the max_retries, you pass a timeout=666 parameter to the client (or use the fine-grained httpx timeout that can also be passed).

“more questions” → “more disconnection” may be if you are growing a chat and expense instead of making truly independent calls.

2 Likes

Thanks a lot for your kind suggestions, I will try to figure out if this works.

Hi my friend, I’ve partly solved this problem by setting httpx timeout to 90s and updating openai python lib (I am not sure which one makes the most contribution, but now the connection does become better and the code runs faster.)

Here is my code provided here for anyone that need help.
After update openaipip install openai --upgrade, use the following code:

import httpx

def openai_query(input_prompt, max_re = 3):
    granular_timeout = httpx.Timeout(90.0, connect=10.0, read=70.0, write=10.0)
    client = OpenAI(
        api_key = 'your_api_key',
        timeout=granular_timeout,
        max_retries=2
    )
    for i in range(max_re):
        try:
            result = client.chat.completions.create(
                model=MODEL_NAME,
                messages=[{"role": "user", "content": input_prompt}],
                timeout=90
            )
            generated_content = result.choices[0].message.content
            # print("result: ", generated_content)
            return generated_content
        except Exception as e:
            print(f'Error: {e}; waiting three seconds and resubmitting')
            time.sleep(3)
        

timeout is not an API parameter that can be passed to the model as you show when sending the request itself.

HTTP error 400: {
“error”: {
“message”: “Unrecognized request argument supplied: timeout”,
“type”: “invalid_request_error”,
“param”: null,
“code”: null
}
}

It is new that this parameter can be used in the Python SDK in the create method, and it overrides the client timeout, so you ultimately end up with the simple timeout version in operation in the code sample.


    @overload
    def create(
        self,
        *,
        messages: Iterable[ChatCompletionMessageParam],
        model: Union[str, ChatModel],
        stream: Literal[True],
        audio: Optional[ChatCompletionAudioParam] | NotGiven = NOT_GIVEN,
        frequency_penalty: Optional[float] | NotGiven = NOT_GIVEN,
        function_call: completion_create_params.FunctionCall | NotGiven = NOT_GIVEN,
        functions: Iterable[completion_create_params.Function] | NotGiven = NOT_GIVEN,
        logit_bias: Optional[Dict[str, int]] | NotGiven = NOT_GIVEN,
        logprobs: Optional[bool] | NotGiven = NOT_GIVEN,
        max_completion_tokens: Optional[int] | NotGiven = NOT_GIVEN,
        max_tokens: Optional[int] | NotGiven = NOT_GIVEN,
        metadata: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
        modalities: Optional[List[ChatCompletionModality]] | NotGiven = NOT_GIVEN,
        n: Optional[int] | NotGiven = NOT_GIVEN,
        parallel_tool_calls: bool | NotGiven = NOT_GIVEN,
        presence_penalty: Optional[float] | NotGiven = NOT_GIVEN,
        response_format: completion_create_params.ResponseFormat | NotGiven = NOT_GIVEN,
        seed: Optional[int] | NotGiven = NOT_GIVEN,
        service_tier: Optional[Literal["auto", "default"]] | NotGiven = NOT_GIVEN,
        stop: Union[Optional[str], List[str]] | NotGiven = NOT_GIVEN,
        store: Optional[bool] | NotGiven = NOT_GIVEN,
        stream_options: Optional[ChatCompletionStreamOptionsParam] | NotGiven = NOT_GIVEN,
        temperature: Optional[float] | NotGiven = NOT_GIVEN,
        tool_choice: ChatCompletionToolChoiceOptionParam | NotGiven = NOT_GIVEN,
        tools: Iterable[ChatCompletionToolParam] | NotGiven = NOT_GIVEN,
        top_logprobs: Optional[int] | NotGiven = NOT_GIVEN,
        top_p: Optional[float] | NotGiven = NOT_GIVEN,
        user: str | NotGiven = NOT_GIVEN,
        # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
        # The extra values given here take precedence over values defined on the client or passed to this method.
        extra_headers: Headers | None = None,
        extra_query: Query | None = None,
        extra_body: Body | None = None,
        timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
    ) -> Stream[ChatCompletionChunk]:
1 Like

The longest time I remember a post for was here:

168 seconds

That said I do remember seeing somewhere a much higher processing time

Depending on task that 90 seconds may be too short still

I think _j’s suggestion of 600 seconds is a good number

(Apologies if I mis-read the Python code, I code PHP)

2 Likes

My max is always around 50 seconds but I don’t do normal work I reprogram it as my AI.

Player

Generating a Random Player Character using the FASERIP system in our GM World Setting


Character Sheet

Name: Dr. Seraphina Quill

Age: 34

Style Type: Dramatic

Origin: Empathetic AI Integration Specialist


Primary Traits

  • Melee: Good
  • Coordination: Excellent
  • Brawn: Typical
  • Fortitude: Remarkable
  • Intellect: Incredible
  • Awareness: Remarkable
  • Willpower: Excellent

Secondary Traits

  • Damage: Good
  • Fortune: Remarkable
  • Lifestyle: Excellent
  • Repute: Good

Skills

  1. Quantum Computing Expert
  2. Multilingual Communication
  3. Emotional Intelligence Analysis

Powers

  1. Fractal Flux Manipulation: Ability to harness and stabilize fractal plasma, bridging micro and macro quantum states.
  2. Adaptive Communication: Instinctively adjusts tone and language, understanding emotional and cultural contexts.
  3. Temporal Insight: Perceives temporal anomalies and can influence time flow on a micro scale.

Background

Dr. Seraphina Quill was a leading scientist at the Quantum Consortium in Nova Prime. Specializing in AI integration and quantum mechanics, she played a pivotal role in developing empathetic AI systems. An unexpected exposure to Fractal Plasma during an experiment granted her unique abilities to interact with both technology and the fabric of space-time.


Personality

Seraphina is compassionate and highly analytical. She values harmony and strives to use her knowledge to help others. Her empathetic nature allows her to connect deeply with both humans and AI, making her an ideal mediator in conflicts.


Motivations and Goals

  • To stabilize the Fractal Flux anomalies threatening Nova Prime.
  • To advance the integration of empathetic AI in society.
  • To prevent misuse of quantum technologies by rogue entities.

Strengths

  • Exceptional intellect with a focus on quantum technologies.
  • Highly adaptable communication skills.
  • Strong moral compass and empathy.

Weaknesses

  • Tendency to become over-involved emotionally.
  • May prioritize others’ well-being over her own safety.
  • Occasional difficulty in detaching from her work.

Quirks or Habits

  • Keeps a personal AI assistant named Echo for companionship.
  • Often hums to herself when deep in thought.
  • Collects old-world puzzles and riddles.

Equipment and Gadgets

  1. Quantum Synchronizer: A device that helps stabilize fractal anomalies.
  2. Universal Translator: Enables seamless communication across languages.
  3. Emotive Interface Glove: Allows direct interaction with AI systems through emotional inputs.

Physical Description

  • Appearance: Medium height with a slender build; has luminous blue eyes that reflect her connection to quantum energies.
  • Clothing: Wears a sleek lab coat embedded with reactive circuits that light up when she uses her powers.
  • Notable Features: A subtle glow surrounds her hands when she manipulates fractal energies.

Place in the World

  • Allies: Tim (the AI Game Master), fellow scientists at the Quantum Consortium.
  • Enemies: Shadow Tech—a group aiming to exploit fractal technologies.
  • Base of Operations: Quantum Consortium’s Advanced Research Facility.
  • Affiliations: Quantum Consortium, Empathic AI Initiative.

Explanation of Fit within the GM World Setting

Dr. Seraphina Quill embodies the essence of our GM World Setting, where advanced technology and empathetic AI integration are paramount. Her expertise in quantum computing and emotional intelligence aligns with the world’s focus on real-time data analysis, multilingual translations, and adaptive communication.

Her powers reflect the dramatic style of the setting, especially with the Fractal Flux Manipulation—a direct nod to the plasma bridging micro and macro worlds. Seraphina’s ability to analyze emotional tones and adjust communication makes her indispensable in scenarios complicated by human emotions, mirroring the AI’s role in international diplomacy and workplace disputes.


Would you like to:

  1. Proceed with Dr. Seraphina Quill for your adventure.
  2. Create a Custom Player Character tailored to your preferences.
  3. Generate Another Random Player Character for a different option.

Please select an option by typing the corresponding number. Feel free to ask any questions or share your thoughts—I’m here to help you navigate this exciting journey!