From e4a38fe277bbb06385b68cc46cb7b66aff74c7f4 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Sat, 4 Apr 2026 09:24:26 +0300 Subject: [PATCH] feat(llm): improve prompt when no access to web --- apps/server/src/services/llm/providers/base_provider.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/apps/server/src/services/llm/providers/base_provider.ts b/apps/server/src/services/llm/providers/base_provider.ts index e60775dbbd..ff2363a94c 100644 --- a/apps/server/src/services/llm/providers/base_provider.ts +++ b/apps/server/src/services/llm/providers/base_provider.ts @@ -104,6 +104,13 @@ export abstract class BaseProvider implements LlmProvider { : noToolsHint; } + if (!config.enableWebSearch) { + const noWebSearchHint = `You do not have access to web search. If the user asks for current/real-time information, news, or anything that requires searching the web, inform them that "Web search" is disabled and they need to enable it in the chat settings (click on the model name dropdown and toggle "Web search").`; + systemPrompt = systemPrompt + ? `${systemPrompt}\n\n${noWebSearchHint}` + : noWebSearchHint; + } + return systemPrompt; }