-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Closed as not planned
Closed as not planned
Copy link
Labels
Issue - Needs ScopingValid, but needs effort estimate or design input before work can start.Valid, but needs effort estimate or design input before work can start.bugSomething isn't workingSomething isn't working
Description
App Version
3.25.5
API Provider
OpenAI Compatible
Model Used
Qwen3-Coder-30B-A3B
Roo Code Task Links (Optional)
No response
π Steps to Reproduce
- Open RooCode on the Roo repository
- Pass it two big files (like Task.ts and ClineProvider.ts)
- Ask it to analyze the files in any way
π₯ Outcome Summary
On a slow model, after 5 minutes the connection will get terminated due to
(a) OpenAI using fetch under the hood
(b) fetch using undici under the hood
(c) undici having a separate bodyTimeout which defaults to 5 minutes (300s)
This becomes especially annoying when coupled with context condensing (which makes i.e. llama.cpp unable to use prompt caching).
Preferrably, if a timeout parameter could be added to the provider, then something like this could possibly work:
import { fetch as undiciFetch } from 'undici';
function customFetch(input: RequestInfo | URL, init?: RequestInit) {
// Convert the standard fetch parameters to Undici format
const undiciOptions = {
...init,
bodyTimeout: 180000
}
// Type assertion to handle the compatibility issue
return undiciFetch(input as any, undiciOptions as any) as any
}and then:
this.client = new OpenAI({
baseURL,
apiKey,
defaultHeaders: headers,
timeout: 180000,
// Use customFetch to inject Undici's extended options like bodyTimeout
fetch: customFetch
})(with the configured timeout instead of 30 minutes)
π Relevant Logs or Errors (Optional)
terminated
Retry attempt 1
Retrying now...characharm and blake-hamm
Metadata
Metadata
Assignees
Labels
Issue - Needs ScopingValid, but needs effort estimate or design input before work can start.Valid, but needs effort estimate or design input before work can start.bugSomething isn't workingSomething isn't working
Type
Projects
Status
Done