Skip to content

fix(solana): default SolanaLLMClient to LLMClient's 600 s timeout - #94

Merged
VickyXAI merged 1 commit into
mainfrom
fix/solana-client-default-timeout
Oct 27, 2026
Merged

VickyXAI merged 1 commit into
mainfrom
fix/solana-client-default-timeout

Conversation

@VickyXAI

Copy link
Copy Markdown
Contributor

Closes #93.

Problem

SolanaLLMClient hardcoded DEFAULT_TIMEOUT = 60000 (src/solana-client.ts:69). LLMClient resolves 600 s, with a BLOCKRUN_CHAT_TIMEOUT (seconds) override (resolveDefaultTimeout(), src/client.ts:135). A moonshot/kimi-k3.1-pro turn was aborted at 60.3 s after its batch payment was sent. The SDK correctly raised BatchPaymentUnresolvedError (it never pays twice for a call in doubt), but the caller couldn't tell whether they were charged.

Change

  • SolanaLLMClient imports LLMClient's DEFAULT_TIMEOUT (the same import anthropic-compat.ts already uses) instead of keeping its own constant. One default for both clients: BLOCKRUN_CHAT_TIMEOUT when set, else 600 s. The timeout option still wins.
  • No import cycle: client.ts doesn't import solana-client.ts.
  • Media POSTs keep Math.max(this.timeout, MEDIA_SUBMIT_TIMEOUT_MS), so they're unaffected. The batch in-doubt replays already run to the client timeout, so they now get the longer window too.
  • Docs: the timeout TSDoc on SolanaLLMClientOptions, the README env table (BLOCKRUN_CHAT_TIMEOUT now applies to both clients), and the per-call timeout paragraph.

Tests

  • New test/unit/solana-client-timeout.test.ts covers the default, the env override, an invalid env value, and an explicit option, each on both clients. The first three fail on main.
  • npm test: 1073 passed, 12 skipped. Build, lint and typecheck are clean. grep -c router-core dist/index.d.ts → 0.

SolanaLLMClient hardcoded DEFAULT_TIMEOUT = 60000 while LLMClient resolves
600 s with a BLOCKRUN_CHAT_TIMEOUT (seconds) override. A long reasoning turn
was aborted at 60 s after its batch payment was sent, ending in
BatchPaymentUnresolvedError. SolanaLLMClient now imports LLMClient's
DEFAULT_TIMEOUT. Tests: default, env override, invalid env, explicit option
(3 fail on main). README documents the shared default.

Closes #93
@VickyXAI
VickyXAI merged commit 51bba02 into main Oct 27, 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.

SolanaLLMClient default timeout is 60 s (LLMClient: 600 s) — long reasoning turns are aborted and their batch payment left unresolved

1 participant