Skip to content

fix(timeout): raise default chat timeout 120s→600s (env-configurable)#14

Merged
VickyXAI merged 1 commit into
BlockRunAI:mainfrom
KillerQueen-Z:fix/default-chat-timeout
Jun 26, 2026
Merged

fix(timeout): raise default chat timeout 120s→600s (env-configurable)#14
VickyXAI merged 1 commit into
BlockRunAI:mainfrom
KillerQueen-Z:fix/default-chat-timeout

Conversation

@KillerQueen-Z

Copy link
Copy Markdown
Contributor

Problem

DEFAULT_CHAT_TIMEOUT = 120 (and LLMClient/AsyncLLMClient default timeout=120) is too low for reasoning models (opus-4.8 / deepseek-v4-pro take 200–300s+). Non-streaming calls time out at 120s; the client raises while the gateway finishes server-side and settles x402 → charged but missing from the caller's logs.

Change

  • solana_client.py DEFAULT_CHAT_TIMEOUT and client.py LLMClient/AsyncLLMClient default timeout: 120s → 600s.
  • Both now read the BLOCKRUN_CHAT_TIMEOUT env var.

Notes

  • 600s matches the OpenAI/Anthropic SDK defaults.
  • For streaming this is a per-chunk read timeout (survives long total durations); for non-stream it bounds the whole call.
  • Pairs with blockrun-litellm passing this timeout explicitly.

120s timed out non-streaming reasoning calls, which routinely take 200-300s+.
On timeout the client raises while the gateway keeps generating server-side
and settles x402 — so the wallet is charged but the call is missing from the
caller's logs. Default 600s aligns with the OpenAI/Anthropic SDKs; override
via the BLOCKRUN_CHAT_TIMEOUT env var. For streaming this is a per-chunk read
timeout; for non-stream it bounds the whole call.
@VickyXAI VickyXAI merged commit 5194711 into BlockRunAI:main Jun 26, 2026
0 of 3 checks passed
VickyXAI added a commit that referenced this pull request Jun 26, 2026
…lient (#15)

Follow-up to #14, which raised the OpenAI-compat chat default to an
env-configurable 600s but left AnthropicClient — the native opus-4.8
/v1/messages path, exactly the reasoning case that needs 200–300s —
hardcoded at 120s. Mirror the same BLOCKRUN_CHAT_TIMEOUT env default,
fix stale 'default: 120' docstrings in client.py + anthropic_client.py,
and black-format solana_client.py (the lint that failed #14's CI).

Co-authored-by: 1bcMax <viewitter@gmail.com>
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.

2 participants