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 } }