Repository navigation
Conversation
…n slow connections The default 10s timeout for /v1/models, /api/combos, and other fetch endpoints causes AbortError on WSL and other slow network setups where responses exceed 270KB. This is especially problematic when the response takes >10s to transfer. Changes: - Increase default timeouts from 10s to 60s for main fetchers - Increase enrichment/autoCombos timeouts from 5s to 30s - Update all call sites to use the new timeout values - Prevents 'config shim: fetch failed' warnings on startup
There was a problem hiding this comment.
Code Review
This pull request increases the default fetch timeouts from 10 seconds to 60 seconds (and 5 seconds to 30 seconds for auto-combos) across multiple fetchers and hooks in the plugin index file. The review feedback recommends defining these timeout values as constants at the top of the file to avoid magic numbers and duplication. Additionally, the reviewer notes that unit or integration tests should be added or updated to cover these production code changes, in accordance with the repository style guide.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| baseURL, | ||
| apiKey, | ||
| timeoutMs = 10_000, | ||
| timeoutMs = 60_000, |
There was a problem hiding this comment.
Instead of hardcoding 60_000 across multiple fetchers and call sites, it is highly recommended to define this timeout as a constant at the top of the file (e.g., near DEFAULT_MODEL_CACHE_TTL_MS). This avoids magic numbers and improves maintainability.
For example, define:
export const DEFAULT_FETCH_TIMEOUT_MS = 60_000 as const;| timeoutMs = 60_000, | |
| timeoutMs = DEFAULT_FETCH_TIMEOUT_MS, |
| */ | ||
| export const defaultOmniRouteAutoCombosFetcher: OmniRouteAutoCombosFetcher = | ||
| async (baseURL, apiKey, timeoutMs = 5_000) => { | ||
| async (baseURL, apiKey, timeoutMs = 30_000) => { |
There was a problem hiding this comment.
Similarly, define a constant for the autoCombos timeout (e.g., DEFAULT_AUTO_COMBOS_TIMEOUT_MS = 30_000 as const) at the top of the file to avoid magic numbers and duplication.
| async (baseURL, apiKey, timeoutMs = 30_000) => { | |
| async (baseURL, apiKey, timeoutMs = DEFAULT_AUTO_COMBOS_TIMEOUT_MS) => { |
| // disappearance). We do NOT wrap this in a try; let the error | ||
| // propagate to OC's UI. | ||
| rawModels = await fetcher(baseURL, apiKey, 10_000); | ||
| rawModels = await fetcher(baseURL, apiKey, 60_000); |
There was a problem hiding this comment.
According to the Repository Style Guide (Rule 9 under Hard Rules), you must always include tests when changing production code in src/. Please ensure that appropriate unit or integration tests are added or updated under the tests/ directory to cover these new timeout values.
References
- Always include tests when changing production code (src/, open-sse/, electron/, bin/). (link)
…provider mismatch OpenCode parses model IDs like 'combo/master' and extracts 'combo' as the provider name, ignoring the plugin's providerID: 'omniroute'. This causes 'No credentials for provider: combo' errors. Fix: Remove the 'combo/' prefix from buildComboKey so model IDs are just the slugified name (e.g., 'master' instead of 'combo/master'). This is consistent with how raw models are registered - they don't use a provider prefix in their IDs.
|
Closing in favor of #3551 which includes both fixes (timeout + combo prefix) with the correct approach (using omniroute/ prefix instead of removing combo/ entirely). |
|
Kilo Code Review could not run — your account is out of credits. Add credits or switch to a free model to enable reviews on this change. |
Problem
Two related issues cause failures in OpenCode:
1. AbortError on slow connections
The default 10s timeout for
/v1/models,/api/combos, and other fetch endpoints causesAbortErroron WSL and other slow network setups where responses exceed 270KB.2. 'No credentials for provider: combo'
OpenCode parses model IDs like
combo/masterand extractscomboas the provider name, ignoring the plugin'sproviderID: 'omniroute'. This causes authentication failures.Solution
Timeout fix
Combo prefix fix
combo/prefix frombuildComboKeyso model IDs are just the slugified name (e.g.,masterinstead ofcombo/master)Testing
Verified on WSL2 with:
/v1/modelsresponse: 271KB, consistently took >10s to transferAbortErrorwarningsomnirouteproviderNotes
This is a minimal fix that addresses both timeout and authentication issues.