fix(timeout): default chat timeout → env-configurable 600s#6
Merged
Conversation
Reasoning models (opus-4.8/deepseek-v4-pro) think 200-300s+; old default cut them off. Override via BLOCKRUN_CHAT_TIMEOUT env. Mirrors blockrun-llm 1.4.7.
VickyXAI
added a commit
that referenced
this pull request
Jun 26, 2026
…rs (#7) Follow-up to #6, which added the env-configurable 600s DEFAULT_TIMEOUT but only wired it into the native LLMClient path. The OpenAI/Anthropic drop-in wrappers hardcoded 60000ms (openai-compat passed truthy 60000 into LLMClient; anthropic-compat used it directly), so README drop-in users still timed out at 60s on reasoning calls. Export DEFAULT_TIMEOUT from client.ts; both wrappers now fall through to it. Fix stale default:60000 doc comments. Co-authored-by: 1bcMax <viewitter@gmail.com>
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.
What
Raise the SDK's default chat HTTP timeout from 60s to an env-configurable 600s.
The old
DEFAULT_TIMEOUT = 60000(60s) cut off long reasoning-model calls. Reasoning models (opus-4.8,deepseek-v4-pro) routinely think for 200–300s+ on non-streaming completions, hitting anAbortErrorbefore the response arrives.Change
src/client.ts: replace the hard-coded60000withresolveDefaultTimeout(), which readsprocess.env.BLOCKRUN_CHAT_TIMEOUTin seconds (×1000 → ms), with a safe numeric parse (finite & positive) and a fallback to600_000ms (600s).options.timeoutoverrides are preserved unchanged (this.timeout = options.timeout || DEFAULT_TIMEOUT).blockrun-llmSDK (DEFAULT_CHAT_TIMEOUT = float(os.environ.get("BLOCKRUN_CHAT_TIMEOUT", "600"))).Verification
npm run typecheck— cleannpm run build(tsup) — successnpm run lint(eslint) — cleannpx vitest run— 197 passed, 12 integration skipped