From 973650e6a027edbc62e6a5c2a0eaa704ade2b439 Mon Sep 17 00:00:00 2001 From: Shadow Date: Fri, 6 Mar 2026 15:50:13 -0600 Subject: [PATCH] fix: remove Feishu SDK timeout fields (#38267) (thanks @ant1eicher) --- CHANGELOG.md | 1 + extensions/feishu/src/media.test.ts | 11 ++--------- extensions/feishu/src/media.ts | 4 ---- 3 files changed, 3 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 99c04190526..0aab6a4c94a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -208,6 +208,7 @@ Docs: https://docs.openclaw.ai - Windows/Plugin install: when OpenClaw runs on Windows via Bun and `npm-cli.js` is not colocated with the runtime binary, fall back to `npm.cmd`/`npx.cmd` through the existing `cmd.exe` wrapper so `openclaw plugins install` no longer fails with `spawn EINVAL`. (#38056) Thanks @0xlin2023. - Telegram/send retry classification: retry grammY `Network request ... failed after N attempts` envelopes in send flows without reclassifying plain `Network request ... failed!` wrappers as transient, restoring the intended retry path while keeping broad send-context message matching tight. (#38056) Thanks @0xlin2023. - Gateway/probes: keep `/health`, `/healthz`, `/ready`, and `/readyz` reachable when the Control UI is mounted at `/`, preserve plugin-owned route precedence on those paths, and make `/ready` and `/readyz` report channel-backed readiness with startup grace plus `503` on disconnected managed channels, while `/health` and `/healthz` stay shallow liveness probes. (#18446) Thanks @vibecodooor, @mahsumaktas, and @vincentkoc. +- Feishu/media downloads: drop invalid timeout fields from SDK method calls now that client-level `httpTimeoutMs` applies to requests. (#38267) Thanks @ant1eicher. ## 2026.3.2 diff --git a/extensions/feishu/src/media.test.ts b/extensions/feishu/src/media.test.ts index 122b4477809..7fd5a0a7bd8 100644 --- a/extensions/feishu/src/media.test.ts +++ b/extensions/feishu/src/media.test.ts @@ -182,7 +182,7 @@ describe("sendMediaFeishu msg_type routing", () => { ); }); - it("uses image upload timeout override for image media", async () => { + it("uploads image for image media", async () => { await sendMediaFeishu({ cfg: {} as any, to: "user:ou_target", @@ -190,11 +190,7 @@ describe("sendMediaFeishu msg_type routing", () => { fileName: "photo.png", }); - expect(imageCreateMock).toHaveBeenCalledWith( - expect.objectContaining({ - timeout: 120_000, - }), - ); + expect(imageCreateMock).toHaveBeenCalled(); expect(messageCreateMock).toHaveBeenCalledWith( expect.objectContaining({ data: expect.objectContaining({ msg_type: "image" }), @@ -320,7 +316,6 @@ describe("sendMediaFeishu msg_type routing", () => { expect(imageGetMock).toHaveBeenCalledWith( expect.objectContaining({ path: { image_key: imageKey }, - timeout: 120_000, }), ); expect(result.buffer).toEqual(Buffer.from("image-data")); @@ -512,7 +507,6 @@ describe("downloadMessageResourceFeishu", () => { expect.objectContaining({ path: { message_id: "om_audio_msg", file_key: "file_key_audio" }, params: { type: "file" }, - timeout: 120_000, }), ); expect(result.buffer).toBeInstanceOf(Buffer); @@ -532,7 +526,6 @@ describe("downloadMessageResourceFeishu", () => { expect.objectContaining({ path: { message_id: "om_img_msg", file_key: "img_key_1" }, params: { type: "image" }, - timeout: 120_000, }), ); expect(result.buffer).toBeInstanceOf(Buffer); diff --git a/extensions/feishu/src/media.ts b/extensions/feishu/src/media.ts index 6d9f821c602..4aba038b4a9 100644 --- a/extensions/feishu/src/media.ts +++ b/extensions/feishu/src/media.ts @@ -106,7 +106,6 @@ export async function downloadImageFeishu(params: { const response = await client.im.image.get({ path: { image_key: normalizedImageKey }, - timeout: FEISHU_MEDIA_HTTP_TIMEOUT_MS, }); const buffer = await readFeishuResponseBuffer({ @@ -146,7 +145,6 @@ export async function downloadMessageResourceFeishu(params: { const response = await client.im.messageResource.get({ path: { message_id: messageId, file_key: normalizedFileKey }, params: { type }, - timeout: FEISHU_MEDIA_HTTP_TIMEOUT_MS, }); const buffer = await readFeishuResponseBuffer({ @@ -202,7 +200,6 @@ export async function uploadImageFeishu(params: { // eslint-disable-next-line @typescript-eslint/no-explicit-any -- SDK accepts Buffer or ReadStream image: imageData as any, }, - timeout: FEISHU_MEDIA_HTTP_TIMEOUT_MS, }); // SDK v1.30+ returns data directly without code wrapper on success @@ -277,7 +274,6 @@ export async function uploadFileFeishu(params: { file: fileData as any, ...(duration !== undefined && { duration }), }, - timeout: FEISHU_MEDIA_HTTP_TIMEOUT_MS, }); // SDK v1.30+ returns data directly without code wrapper on success