File tree Expand file tree Collapse file tree 1 file changed +17
-4
lines changed
Expand file tree Collapse file tree 1 file changed +17
-4
lines changed Original file line number Diff line number Diff line change @@ -76,12 +76,25 @@ const customFetch = async (request: Request): Promise<Response> => {
7676
7777const opencodePort = await detectPort ( 4096 ) ;
7878
79+ // Set OpenCode config before server starts to ensure timeout is applied
80+ const opencodeConfig = {
81+ permission : DEFAULT_PERMISSION_CONFIG ,
82+ provider : {
83+ opencode : {
84+ options : {
85+ timeout : 1_500_000 , // 25 minutes timeout for OpenCode provider requests
86+ } ,
87+ } ,
88+ } ,
89+ } ;
90+
91+ // Set via environment variable to ensure it's picked up by the server
92+ process . env . OPENCODE_CONFIG_CONTENT = JSON . stringify ( opencodeConfig ) ;
93+
7994const opencode = await createOpencode ( {
8095 port : opencodePort ,
81- timeout : 1_500_000 , // 25 minutes timeout for long-running LLM requests
82- config : {
83- permission : DEFAULT_PERMISSION_CONFIG ,
84- } ,
96+ timeout : 1_500_000 , // 25 minutes timeout for server startup
97+ config : opencodeConfig ,
8598} ) ;
8699
87100const sessionCache = new Map < string , string > ( ) ;
You can’t perform that action at this time.
0 commit comments