Files
openclaw/extensions/zai
NIO 598f13a5f3 fix(zai): keep probe deadline through stalled error-body reads (#109026)
* fix(zai): keep probe deadline through stalled error-body reads

Fixes an issue where Z.AI endpoint detection could hang indefinitely
when a probe returned error headers and then stalled on the error
response body. The previous helper cleared the AbortSignal as soon as
fetch resolved headers, so a never-chunking error body bypassed the
probe deadline.

Keep one AbortController deadline across the probe request and the
bounded error-body read, and pass a clamped chunkTimeoutMs into
readResponseWithLimit so a stalled error body fails closed inside the
remaining budget. The chunkTimeoutMs is clamped to the remaining
deadline after fetch returns headers, so the idle timeout does not
outlast the overall probe deadline.

Tighten the stalled-body test timing assertion from 5s to 2x timeoutMs
to verify the deadline is actually respected.

* fix(zai): enforce probe body deadline

Co-authored-by: NIO <noreply@github.com>

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
Co-authored-by: NIO <noreply@github.com>
2026-07-18 21:51:15 +01:00
..
2026-06-04 21:02:07 -04:00

Z.AI OpenClaw provider

Official OpenClaw provider plugin for Z.AI.

Install

openclaw plugins install @openclaw/zai-provider

Docs

See docs/providers/zai.md in the OpenClaw repository, or the published docs at https://docs.openclaw.ai/providers/zai.