fix: illegal custom fetch

This commit is contained in:
Simon
2025-12-24 19:00:43 +08:00
parent 20ad3d04d2
commit 49af3a9c58

View File

@@ -71,7 +71,7 @@ export function parseLLMConfig(config: LLMConfig): Required<LLMConfig> {
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
}
}