[GH-ISSUE #15173] issue: Custom Generation parameters for RAG does not work (OPENAI) #120801

Closed
opened 2026-05-20 22:31:28 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @Mcthomas777 on GitHub (Jun 20, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/15173

Originally assigned to: @jackthgu on GitHub.

Check Existing Issues

  • I have searched the existing issues and discussions.
  • I am using the latest version of Open WebUI.

Installation Method

Git Clone

Open WebUI Version

v0.6.13

Ollama Version (if applicable)

No response

Operating System

Ubuntu22.04

Browser (if applicable)

No response

Confirmation

  • I have read and followed all instructions in README.md.
  • I am using the latest version of both Open WebUI and Ollama.
  • I have included the browser console logs.
  • I have included the Docker container logs.
  • I have provided every relevant configuration, setting, and environment variable used in my setup.
  • I have clearly listed every relevant configuration, custom setting, environment variable, and command-line option that influences my setup (such as Docker Compose overrides, .env values, browser settings, authentication configurations, etc).
  • I have documented step-by-step reproduction instructions that are precise, sequential, and leave nothing to interpretation. My steps:
  • Start with the initial platform/version/OS and dependencies used,
  • Specify exact install/launch/configure commands,
  • List URLs visited, user input (incl. example values/emails/passwords if needed),
  • Describe all options and toggles enabled or changed,
  • Include any files or environmental changes,
  • Identify the expected and actual result at each stage,
  • Ensure any reasonably skilled user can follow and hit the same issue.

Expected Behavior

Custom Generation parameters are pursue to custom llm service (compatible with openai) when using rag (generation over documents or knowledge base).

Actual Behavior

Custom parameters are not sent when loading documents beside, but parameters are sent when not using RAG.
I provided my raw HTTP body that Irecieved from openwebui (even so I customized max_tokens, I didnt received it in the request)

Steps to Reproduce

  1. Run openwebui
  2. Load a document / Create a knowledge base
  3. Customize max_tokens
  4. Ask a question based on the document

Logs & Screenshots

b'{"model":"gpt-4","messages":[{"role":"user","content":"### Task:\nAnalyze the chat history to determine the necessity of generating search queries, in the given language. By default, prioritize generating 1-3 broad and relevant search queries unless it is absolutely certain that no additional information is required. The aim is to retrieve comprehensive, updated, and valuable information even with minimal uncertainty. If no search is unequivocally needed, return an empty list.\n\n### Guidelines:\n- Respond EXCLUSIVELY with a JSON object. Any form of extra commentary, explanation, or additional text is strictly prohibited.\n- When generating search queries, respond in the format: { \"queries\": [\"query1\", \"query2\"] }, ensuring each query is distinct, concise, and relevant to the topic.\n- If and only if it is entirely certain that no useful results can be retrieved by a search, return: { \"queries\": [] }.\n- Err on the side of suggesting search queries if there is any chance they might provide useful or updated information.\n- Be concise and focused on composing high-quality search queries, avoiding unnecessary elaboration, commentary, or assumptions.\n- Today's date is: 2025-06-19.\n- Always prioritize providing actionable and broad queries that maximize informational coverage.\n\n### Output:\nStrictly return in JSON format: \n{\n \"queries\": [\"query1\", \"query2\"]\n}\n\n### Chat History:\n<chat_history>\nUSER: Wie plane ich ein Projekt?\n</chat_history>\n"}],"stream":false}'

Additional Information

No response

Originally created by @Mcthomas777 on GitHub (Jun 20, 2025). Original GitHub issue: https://github.com/open-webui/open-webui/issues/15173 Originally assigned to: @jackthgu on GitHub. ### Check Existing Issues - [x] I have searched the existing issues and discussions. - [x] I am using the latest version of Open WebUI. ### Installation Method Git Clone ### Open WebUI Version v0.6.13 ### Ollama Version (if applicable) _No response_ ### Operating System Ubuntu22.04 ### Browser (if applicable) _No response_ ### Confirmation - [x] I have read and followed all instructions in `README.md`. - [x] I am using the latest version of **both** Open WebUI and Ollama. - [x] I have included the browser console logs. - [x] I have included the Docker container logs. - [x] I have **provided every relevant configuration, setting, and environment variable used in my setup.** - [x] I have clearly **listed every relevant configuration, custom setting, environment variable, and command-line option that influences my setup** (such as Docker Compose overrides, .env values, browser settings, authentication configurations, etc). - [x] I have documented **step-by-step reproduction instructions that are precise, sequential, and leave nothing to interpretation**. My steps: - Start with the initial platform/version/OS and dependencies used, - Specify exact install/launch/configure commands, - List URLs visited, user input (incl. example values/emails/passwords if needed), - Describe all options and toggles enabled or changed, - Include any files or environmental changes, - Identify the expected and actual result at each stage, - Ensure any reasonably skilled user can follow and hit the same issue. ### Expected Behavior Custom Generation parameters are pursue to custom llm service (compatible with openai) when using rag (generation over documents or knowledge base). ### Actual Behavior Custom parameters are not sent when loading documents beside, but parameters are sent when not using RAG. I provided my raw HTTP body that Irecieved from openwebui (even so I customized max_tokens, I didnt received it in the request) ### Steps to Reproduce 1) Run openwebui 2) Load a document / Create a knowledge base 3) Customize max_tokens 4) Ask a question based on the document ### Logs & Screenshots b'{"model":"gpt-4","messages":[{"role":"user","content":"### Task:\\nAnalyze the chat history to determine the necessity of generating search queries, in the given language. By default, **prioritize generating 1-3 broad and relevant search queries** unless it is absolutely certain that no additional information is required. The aim is to retrieve comprehensive, updated, and valuable information even with minimal uncertainty. If no search is unequivocally needed, return an empty list.\\n\\n### Guidelines:\\n- Respond **EXCLUSIVELY** with a JSON object. Any form of extra commentary, explanation, or additional text is strictly prohibited.\\n- When generating search queries, respond in the format: { \\"queries\\": [\\"query1\\", \\"query2\\"] }, ensuring each query is distinct, concise, and relevant to the topic.\\n- If and only if it is entirely certain that no useful results can be retrieved by a search, return: { \\"queries\\": [] }.\\n- Err on the side of suggesting search queries if there is **any chance** they might provide useful or updated information.\\n- Be concise and focused on composing high-quality search queries, avoiding unnecessary elaboration, commentary, or assumptions.\\n- Today\'s date is: 2025-06-19.\\n- Always prioritize providing actionable and broad queries that maximize informational coverage.\\n\\n### Output:\\nStrictly return in JSON format: \\n{\\n \\"queries\\": [\\"query1\\", \\"query2\\"]\\n}\\n\\n### Chat History:\\n<chat_history>\\nUSER: Wie plane ich ein Projekt?\\n</chat_history>\\n"}],"stream":false}' ### Additional Information _No response_
GiteaMirror added the bug label 2026-05-20 22:31:28 -05:00
Author
Owner

@tjbck commented on GitHub (Jun 21, 2025):

Instruction here isn't very clear, could you provide a thorough step by step guide? Screenshots/recording would be extremely helpful here.

<!-- gh-comment-id:2993536383 --> @tjbck commented on GitHub (Jun 21, 2025): Instruction here isn't very clear, could you provide a thorough step by step guide? Screenshots/recording would be extremely helpful here.
Author
Owner

@jackthgu commented on GitHub (Jun 23, 2025):

Hello,

To help us resolve this issue, we kindly ask you to provide the following information:

A screenshot of the current model configuration that includes the knowledge base — specifically showing whether max_token is set correctly.

The server logs at the moment the prompt is submitted (i.e., when the Enter key is pressed in the chat window). Please ensure the log level is set to DEBUG.

Please make sure this test is conducted in a new chat session.

Thank you in advance!

<!-- gh-comment-id:2994909208 --> @jackthgu commented on GitHub (Jun 23, 2025): Hello, To help us resolve this issue, we kindly ask you to provide the following information: A screenshot of the current model configuration that includes the knowledge base — specifically showing whether max_token is set correctly. The server logs at the moment the prompt is submitted (i.e., when the Enter key is pressed in the chat window). Please ensure the log level is set to DEBUG. Please make sure this test is conducted in a new chat session. Thank you in advance!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#120801