Skip to content

Enhanced ChatGPT Clone: Features Agents, MCP, Skills, DeepSeek, Anthropic, AWS, OpenAI, Responses API, Azure, Groq, o1, GPT-5, Mistral, OpenRouter, Vertex AI, Gemini, Artifacts, AI model switching, message search, Code Interpreter, langchain, DALL-E-3, OpenAPI Actions, Functions, Secure Multi-User Auth, Presets, open-source for self-hosting. Active

🐛 fix: Gemini system instructions not sent with null RAG_API_URL (#4920)

Alex Torregrosa000641c619a9
diff --git a/api/app/clients/GoogleClient.js b/api/app/clients/GoogleClient.js
index 15f2e6dc63..b7cc987e45 100644
--- a/api/app/clients/GoogleClient.js
+++ b/api/app/clients/GoogleClient.js
@@ -697,7 +697,7 @@ class GoogleClient extends BaseClient {
promptPrefix = `${promptPrefix ?? ''}\n${this.options.artifactsPrompt}`.trim();
}
- if (this.options?.promptPrefix?.length) {
+ if (promptPrefix.length) {
requestOptions.systemInstruction = {
parts: [
{