Skip to content

OpenAI timeouts are broken, and Runner doesn't enforce them consistently #78

Description

@athewsey

Per openai/openai-python#2599, timeout settings are not actually being respected in upstream OpenAI Python SDK - and therefore also not in our OpenAI Endpoints.

This seems mostly like something that should be fixed upstream rather than worked around in LLMeter - but then I noticed the Runner does make some attempt to enforce that _invoke_n_no_wait is abandoned after N requests * Runner.timeout (for count-bound runs only)... And the Runner docstring does claim that the timeout setting is enforced (without disclaiming different run types). I'd note that even for count-bound runs, enforcing total timeout is not the same as enforcing request-level timeout.

We should try to clarify the behaviour here and improve its consistency if practical. If Runner-level enforcement is possible, it could be a nice guard against inconsistencies or errors in Endpoint implementations... But _invoke_n_no_wait is currently just a synchronous while loop of direct self._endpoint.invoke(p) so i don't think it'll be easy to add without another layer of asyncio/thread delegation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions