You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: add timeout mechanism for OpenRouter stream hanging issue
- Add 30-second timeout for first chunk in Task.ts specifically for OpenRouter
- Add chunk timeout monitoring in OpenRouterHandler to detect hanging streams
- Provide clear error messages when timeouts occur
- Fixes#6137 where OpenRouter requests would hang indefinitely
`OpenRouter API request timed out after ${OPENROUTER_FIRST_CHUNK_TIMEOUT/1000} seconds. This may be due to high load on OpenRouter's servers. Please try again later or switch to a different provider.`,
1826
+
),
1827
+
)
1828
+
},OPENROUTER_FIRST_CHUNK_TIMEOUT)
1829
+
})
1830
+
1831
+
// Race between the actual API call and the timeout
0 commit comments