feat(shared): support BB_BROWSER_TIMEOUT env var#210
Open
cold2600438-lgtm wants to merge 1 commit into
Open
Conversation
ef11cee to
206898b
Compare
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.
Summary
Allow users to override the default command timeout via the
BB_BROWSER_TIMEOUTenvironment variable, instead of having to modify the source code.Problem
When running site adapters that interact with LLM services (e.g., qwen/search), the SSE stream response can take 30–120 seconds depending on the query complexity. The current hardcoded 30-second timeout causes
Command timeouterrors for these long-running operations.Solution
Read
BB_BROWSER_TIMEOUTfromprocess.envwith a fallback to the original 30000ms (30s), preserving backward compatibility.Usage
BB_BROWSER_TIMEOUT=120000 bb-browser site qwen/search "..."
Changes
packages/shared/src/constants.ts:COMMAND_TIMEOUTnow reads fromprocess.env.BB_BROWSER_TIMEOUT