From 49af3a9c585643626b2b854560f7bd06a6f2a2e0 Mon Sep 17 00:00:00 2001 From: Simon <10131203+gaomeng1900@users.noreply.github.com> Date: Wed, 24 Dec 2025 19:00:43 +0800 Subject: [PATCH] fix: illegal custom fetch --- packages/llms/src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/llms/src/index.ts b/packages/llms/src/index.ts index 38f2527..6e9fab9 100644 --- a/packages/llms/src/index.ts +++ b/packages/llms/src/index.ts @@ -71,7 +71,7 @@ export function parseLLMConfig(config: LLMConfig): Required { temperature: config.temperature ?? DEFAULT_TEMPERATURE, maxTokens: config.maxTokens ?? DEFAULT_MAX_TOKENS, maxRetries: config.maxRetries ?? LLM_MAX_RETRIES, - customFetch: config.customFetch ?? globalThis.fetch, + customFetch: (config.customFetch ?? fetch).bind(globalThis), // fetch will be illegal unless bound } }