Skip to content

fix: default client timeout to 900s (large OCR/document jobs exceed openai's 600s default)#9

Merged
Abhinavexist merged 1 commit into
mainfrom
fix/default-timeout
Jul 21, 2026
Merged

fix: default client timeout to 900s (large OCR/document jobs exceed openai's 600s default)#9
Abhinavexist merged 1 commit into
mainfrom
fix/default-timeout

Conversation

@Abhinavexist

Copy link
Copy Markdown
Collaborator

Mirror of interfaze-python #21.

Root cause

Interfaze's `/v1/chat/completions` runs synchronously with a hard 800s server cap (`export const maxDuration = 800`). openai-node defaults to 600s — below the server's own limit — so large multi-page PDF→markdown / OCR / vision requests time out client-side even though the server would still return.

Measured live (via the Python SDK, same server): the whole 15-page "Attention" paper → markdown takes 242s; larger docs scale past 600s but stay under the 800s server cap.

Fix

Default `timeout` to 900000ms (server cap + buffer), overridable via `new Interfaze({ timeout })`. A user-supplied `timeout` is respected. Tests: default is 900000ms; explicit `timeout` overrides it.

…jobs aren't cut short

Interfaze's /v1/chat/completions runs synchronously with an 800s server cap
(maxDuration=800). openai-node defaults to a 600s timeout — below the server's
own limit — so large multi-page PDF->markdown / OCR / vision requests time out
client-side even though the server would still return. Default to 900000ms
(server cap + buffer), overridable via new Interfaze({ timeout }).
@Abhinavexist
Abhinavexist merged commit f61310e into main Jul 21, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant