diff --git a/core/llm/index.ts b/core/llm/index.ts index f7545ba95..7e336ef07 100644 --- a/core/llm/index.ts +++ b/core/llm/index.ts @@ -489,6 +489,9 @@ export abstract class BaseLLM implements ILLM { } private _shouldRequestDirectly() { + if (typeof window === "undefined") { + return true; + } return (window as any)?.ide !== "vscode"; }