Skip to content

[Bug][Windows][Zhipu] Bun 1.4.0 causes GLM-5.3 streams to fail with 502; the same OpenCodex 2.33 setup works on Bun 1.3.14 #2885

Description

@stud-f

Client or integration

Codex App

Area

Provider adapter

Summary

On Windows, real streaming inference through the Zhipu BigModel Coding Plan provider fails when OpenCodex 2.33.0 runs on its bundled Bun 1.4.0 runtime.

Both zhipu-bigmodel-coding/glm-5.3 and zhipu-bigmodel-coding/glm-5.3-flash return HTTP 502 with:

Provider stream error:
The socket connection was closed unexpectedly.
For more information, pass `verbose: true`
in the second argument to fetch()

Provider discovery and authentication remain healthy. Changing only the proxy runtime from Bun 1.4.0 to Bun 1.3.14 makes both models complete with HTTP 200.

Expected: both Bun versions should successfully relay the same Zhipu SSE responses, or OpenCodex should provide a compatible fallback for the affected runtime path.

Reproduction

  1. Install OpenCodex 2.33.0 on Windows. Its bundled runtime is Bun 1.4.0.
  2. Configure the Zhipu BigModel Coding Plan provider as shown in the redacted configuration below.
  3. Confirm that discovery succeeds:
ocx provider test zhipu-bigmodel-coding --json

Observed result:

ok=true
models=10
latencyMs≈170
  1. Confirm with ocx doctor that the service proxy is running on Bun 1.4.0.
  2. In a fresh Codex App conversation, send the same short text-only prompt to:
    • zhipu-bigmodel-coding/glm-5.3
    • zhipu-bigmodel-coding/glm-5.3-flash
  3. Both requests fail with HTTP 502 / upstream_server_error / unexpected socket close.
  4. Keep OpenCodex, Codex, provider configuration, credential, endpoint, models, prompt, network, and VPN unchanged.
  5. Set the documented runtime override to Bun 1.3.14 and regenerate the Windows service:
$env:OPENCODEX_BUN_PATH = "C:\redacted\bun-1.3.14\bun.exe"
ocx service install
  1. Confirm with ocx doctor that the service PID is now using Bun 1.3.14.
  2. Repeat the two requests in fresh conversations. Both complete with HTTP 200.

Controlled result:

OpenCodex Proxy runtime GLM-5.3 GLM-5.3-Flash
2.33.0 Bun 1.4.0 502 / socket closed 502 / socket closed
2.33.0 Bun 1.3.14 HTTP 200 HTTP 200

Version

2.33.0

Operating system

Windows 11 Home 24H2, build 26100, x64

Provider and model

Zhipu BigModel Coding Plan (zhipu-bigmodel-coding):

  • glm-5.3
  • glm-5.3-flash

Logs or error output

stream disconnected before completion:
Provider stream error:
The socket connection was closed unexpectedly.
For more information, pass `verbose: true`
in the second argument to fetch()

The OpenCodex dashboard records:

HTTP 502
errorCode: upstream_server_error
upstreamError: Provider stream error: The socket connection was closed unexpectedly

No request IDs or credentials are included.

Screenshots and supporting files

The controlled A/B matrix is included above. Additional redacted logs can be supplied if a maintainer requests specific non-secret fields.

Redacted configuration

{
  "providers": {
    "zhipu-bigmodel-coding": {
      "adapter": "openai-chat",
      "baseUrl": "https://open.bigmodel.cn/api/coding/paas/v4",
      "authMode": "key"
    }
  }
}

The same configuration was used in both runtime tests.

Additional context

Checks

  • I searched existing open and closed issues, pull requests, and documentation.
  • I removed API keys, tokens, account identifiers, request IDs, emails, and personal paths.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingplatformOS/service/tray/ACL (Windows-heavy, not Windows-only)providerProvider adapters, OpenAI-compat presets, upstream API quirksserviceService lifecycle (WinSW/launchd/scheduler)streamingSSE, WebSocket, terminal stream frames

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions