Repository navigation
fix(solana): default SolanaLLMClient to LLMClient's 600 s timeout - #94
Merged
Merged
Conversation
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
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.
Closes #93.
Problem
SolanaLLMClienthardcodedDEFAULT_TIMEOUT = 60000(src/solana-client.ts:69).LLMClientresolves 600 s, with aBLOCKRUN_CHAT_TIMEOUT(seconds) override (resolveDefaultTimeout(),src/client.ts:135). Amoonshot/kimi-k3.1-proturn was aborted at 60.3 s after its batch payment was sent. The SDK correctly raisedBatchPaymentUnresolvedError(it never pays twice for a call in doubt), but the caller couldn't tell whether they were charged.Change
SolanaLLMClientimportsLLMClient'sDEFAULT_TIMEOUT(the same importanthropic-compat.tsalready uses) instead of keeping its own constant. One default for both clients:BLOCKRUN_CHAT_TIMEOUTwhen set, else 600 s. Thetimeoutoption still wins.client.tsdoesn't importsolana-client.ts.Math.max(this.timeout, MEDIA_SUBMIT_TIMEOUT_MS), so they're unaffected. The batch in-doubt replays already run to the clienttimeout, so they now get the longer window too.timeoutTSDoc onSolanaLLMClientOptions, the README env table (BLOCKRUN_CHAT_TIMEOUTnow applies to both clients), and the per-calltimeoutparagraph.Tests
test/unit/solana-client-timeout.test.tscovers 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.