#63587·zed

Connection forcibly closed by remote host (os error 10054) when streaming with Z.ai API on Windows

Author: kogu1988Created Sep 1, 2026Updated Sep 29, 2026
Labelsstate:needs infoarea:networkstate:needs reproarea:ai/openai compatible

Reproduction steps

Description

When using the Z.ai (glm-5.3-flash) model via the openai_compatible provider on Windows 11, requests consistently fail during agent turns / response streaming with os error 10054 (WSAECONNRESET / Connection forcibly closed by remote host).

Error Messages Observed

  • error sending HTTP request to Zai API: Varolan bir bağlantı uzaktaki bir ana bilgisayar tarafından zorla kapatıldı. (os error 10054)
  • Error in model response stream: error sending HTTP request to Zai API
  • Error in run turn: error sending HTTP request to Zai API

Steps to Reproduce

  1. Configure Zai under language_models.openai_compatible in settings.json.
  2. Open the Assistant panel / Agent mode (acp_thread).
  3. Send a prompt to glm-5.3-flash.
  4. The request fails or stream gets abruptly dropped with os error 10054.

Current vs. Expected behavior

Expected Behavior

The HTTP/SSE stream connection should stay open and complete response decoding, or gracefully retry without unhandled I/O connection reset errors.

Current Behavior

When using the Z.ai (glm-5.3-flash) model via the openai_compatible provider on Windows 11, requests consistently fail during agent turns / response streaming with os error 10054 (WSAECONNRESET / Connection forcibly closed by remote host).

Zed version and system specs

Environment & System Specs

  • Zed Version: v1.17.2+stable.349.c8e44cfa7bda9b2e22c8d6934d78969352e7f61a (Zed)
  • OS: Windows 10.0.26200
  • Architecture: x86_64
  • Memory: 31.7 GiB
  • GPU: Intel(R) UHD Graphics || Intel Corporation || 31.0.101.5081
  • Provider: openai_compatible (Z.ai)
  • Model: glm-5.3-flash

Attach Zed log file

2026-09-02T00:55:17+03:00 ERROR [agent] Error in model response stream: error sending HTTP request to Zai API

Caused by: 0: error sending request for url (https://api.z.ai/api/paas/v4/chat/completions) 1: client error (SendRequest) 2: connection error 3: Varolan bir bağlantı uzaktaki bir ana bilgisayar tarafından zorla kapatıldı. (os error 10054)

2026-09-02T00:55:17+03:00 ERROR [acp_thread] Error in run turn: error sending HTTP request to Zai API

Caused by: 0: error sending request for url (https://api.z.ai/api/paas/v4/chat/completions) 1: client error (SendRequest) 2: connection error 3: Varolan bir bağlantı uzaktaki bir ana bilgisayar tarafından zorla kapatıldı. (os error 10054)

Relevant Zed settings

Relevant settings.json Configuration

json
{
  "language_models": {
    "openai_compatible": {
      "Zai": {
        "api_url": "[https://api.z.ai/api/paas/v4](https://api.z.ai/api/paas/v4)",
        "available_models": [
          {
            "name": "glm-5.3-flash",
            "max_tokens": 1048576,
            "max_output_tokens": 128000,
            "max_completion_tokens": 128000,
            "reasoning_effort": "low",
            "capabilities": {
              "tools": true,
              "images": false,
              "parallel_tool_calls": true,
              "prompt_cache_key": true,
              "chat_completions": true,
              "interleaved_reasoning": true,
              "max_tokens_parameter": true
            }
          }
        ]
      }
    }
  }
}


### Relevant Keymap

<details><summary>keymap.json</summary>

<!-- Paste your keymap file inside the code block. -->
```json

(for AI issues) Model provider details

Provider: z.ai Model: GLM 5.3 flash Agent

If you are using WSL on Windows, what flavor of Linux are you using?

None