Skip to content

The upstream provider did not respond before the proxy timeout.  #86

Closed

Description

@shin2k2

504 Upstream Timeout

The upstream provider did not respond before the proxy timeout. You must retry with a smaller request or select a faster provider.

Time
July 10, 2026, 4:12:46 PM

Request
ocx-mrelm6fu-33

Model
qwen3.6-35b-a3b-ud-mlx

Provider
lm-studio

Error
upstream_server_error

Upstream Cause
Provider timeout after 200000ms during web-search

Duration
200019ms

Original Log
{
"requestId": "ocx-mrelm6fu-33",
"timestamp": 1783667566362,
"model": "qwen3.6-35b-a3b-ud-mlx",
"provider": "lm-studio",
"requestedModel": "lm-studio/qwen3.6-35b-a3b-ud-mlx",
"requestedEffort": "low",
"configuredServiceTier": "default",
"status": 504,
"durationMs": 200019,
"errorCode": "upstream_server_error",
"closeReason": "non_stream",
"upstreamError": "Provider timeout after 200000ms during web-search",
"usageStatus": "unreported"
}

Activity

  1. changed the title [-]The upstream provider did not respond before the proxy timeout. You must retry with a smaller request or select a faster provider.[/-] [+]The upstream provider did not respond before the proxy timeout. [/+] on Jul 10, 2026
  2. lidge-jun commented on Jul 10, 2026

    @lidge-jun
    Owner

    Resolved in v2.7.6 by commit 1f146adf.

    The reported error:

    Provider timeout after 200000ms during web-search

    came from the old web-search loop applying the global connectTimeoutMs (default: 200,000 ms) to the entire non-streaming routed-model iteration, including response generation.

    Starting with v2.7.6, routed-model web-search iterations are streamed internally, and the timeouts are separated:

    • connectTimeoutMs — DNS/TCP/TLS and response headers only
    • webSearchSidecar.routedModelStallTimeoutMs — continuous inactivity between routed-model response-body bytes
    • webSearchSidecar.timeoutMs — one hosted web-search request

    Every non-empty response chunk resets routedModelStallTimeoutMs, so a slow LM Studio generation may run longer than 200 seconds as long as it keeps producing bytes.

    For a local model that can stay silent for more than 200 seconds during prefill/thinking, merge the following into ~/.opencodex/config.json:

    {
      "connectTimeoutMs": 600000,
      "webSearchSidecar": {
        "routedModelStallTimeoutMs": 600000
      }
    }

    Restart opencodex after editing the configuration.

    connectTimeoutMs only needs raising if LM Studio takes more than 200 seconds to return response headers; routedModelStallTimeoutMs is the important setting when headers arrive but the model produces no body bytes for an extended period.

    Please update to v2.7.6 and reopen if the timeout still reproduces with these settings.

  3. lidge-jun commented on Jul 10, 2026

    @lidge-jun
    Owner

    Closing — this was resolved in v2.7.6 (commit 1f146ad). See the earlier comment for config guidance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions