fix: default client timeout to 900s (large OCR/document jobs exceed openai's 600s default)#9
Merged
Merged
Conversation
…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 }).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.