mirror of
https://github.com/open-webui/open-webui.git
synced 2026-07-12 02:54:03 -05:00
[GH-ISSUE #10176] chatgpt api direct connection + google pse error #135526
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @neridisoq on GitHub (Feb 17, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/10176
Bug Report
Important Notes
Before submitting a bug report: Please check the Issues or Discussions section to see if a similar issue or feature request has already been posted. It's likely we're already tracking it! If you’re unsure, start a discussion post first. This will help us efficiently focus on improving the project.
Collaborate respectfully: We value a constructive attitude, so please be mindful of your communication. If negativity is part of your approach, our capacity to engage may be limited. We’re here to help if you’re open to learning and communicating positively. Remember, Open WebUI is a volunteer-driven project managed by a single maintainer and supported by contributors who also have full-time jobs. We appreciate your time and ask that you respect ours.
Contributing: If you encounter an issue, we highly encourage you to submit a pull request or fork the project. We actively work to prevent contributor burnout to maintain the quality and continuity of Open WebUI.
Bug reproducibility: If a bug cannot be reproduced with a
:mainor:devDocker setup, or a pip install with Python 3.11, it may require additional help from the community. In such cases, we will move it to the "issues" Discussions section due to our limited resources. We encourage the community to assist with these issues. Remember, it’s not that the issue doesn’t exist; we need your help!Note: Please remove the notes above when submitting your post. Thank you for your understanding and support!
Installation Method
docker
Environment
Open WebUI Version: 0.5.12
Ollama (if applicable):
Operating System: Ubuntu 24.04
Browser (if applicable): [e.g., Chrome 100.0, Firefox 98.0]
Confirmation:
Expected Behavior:
just searching web and showing answer
Actual Behavior:
i tried to use web search via pse + o1-preview. i am tier 1 on open ai api.
{'error': {'message': "Unsupported value: 'messages[0].role' does not support 'system' with this model.", 'type': 'invalid_request_error', 'param': 'messages[0].role', 'code': 'unsupported_value'}}
this happened. it happened on the o1-mini and o1-preview. not on 4o
searching with o1 was okay but answering with that info is not working
Description
Bug Summary:
crash with google pse and chatgpt-o1 direct connection
searching with o1 was okay but answering with that info is not working
Reproduction Details
Steps to Reproduce:
setup google pse, connect openapi on settings, search anything (mine was "카트라이더 드리프트에 대한 유저의 평가 알려줘")
Logs and Screenshots
Browser Console Logs:
Failed to load resource: the server responded with a status of 400 ()Understand this errorAI
+layout.svelte:332 chatCompletion Objecterror: {message: "Unsupported value: 'messages[0].role' does not support 'system' with this model.", type: 'invalid_request_error', param: 'messages[0].role', code: 'unsupported_value'}Prototype: Object
Y @ +layout.svelte:332Understand this errorAI
/api/chat/completions:1
Docker Container Logs:
pipe:function_openai_proxy_pipe
{'model': 'o1-mini', 'messages': [{'role': 'user', 'content': '### Task:\nYou are an autocompletion system. Continue the text in
<text>based on the completion type in<type>and the given language. \n\n### Instructions:\n1. Analyze<text>for context and meaning. \n2. Use<type>to guide your output: \n - General: Provide a natural, concise continuation. \n - Search Query: Complete as if generating a realistic search query. \n3. Start as if you are directly continuing<text>. Do not repeat, paraphrase, or respond as a model. Simply complete the text. \n4. Ensure the continuation:\n - Flows naturally from<text>. \n - Avoids repetition, overexplaining, or unrelated ideas. \n5. If unsure, return:{ "text": "" }. \n\n### Output Rules:\n- Respond only in JSON format:{ "text": "<your_completion>" }.\n\n### Examples:\n#### Example 1: \nInput: \nGeneral \nThe sun was setting over the horizon, painting the sky \nOutput: \n{ "text": "with vibrant shades of orange and pink." }\n\n#### Example 2: \nInput: \nSearch Query \nTop-rated restaurants in \nOutput: \n{ "text": "New York City for Italian cuisine." } \n\n---\n### Context:\n<chat_history>\nUSER: 카트라이더 드리프트에 대한 유저의 평가 알려줘\nASSISTANT: \n</chat_history>\nsearch query \n카트라이더 드리프트에 대한 유저의 평가 알려줘 \n#### Output:\n'}], 'stream': False}INFO: 192.168.0.1:0 - "POST /api/v1/tasks/auto/completions HTTP/1.1" 200 OK
INFO: 192.168.0.1:0 - "POST /api/v1/users/user/info/update HTTP/1.1" 200 OK
Failed to parse JSON: data: [DONE]
pipe:function_openai_proxy_pipe
{'model': 'o1-mini', '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-02-17.\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: 카트라이더 드리프트에 대한 유저의 평가 알려줘\n</chat_history>\n'}], 'stream': False}
INFO: 211.210.160.7:0 - "POST /api/chat/completed HTTP/1.1" 200 OK
INFO: 211.210.160.7:0 - "POST /api/v1/chats/861dbc0b-66d4-45ae-949c-a74a500926cd HTTP/1.1" 200 OK
INFO: 211.210.160.7:0 - "GET /api/v1/chats/?page=1 HTTP/1.1" 200 OK
INFO [open_webui.routers.retrieval] save_docs_to_vector_db: document 조재윤(게임 개발자)/평가/카트라이더: 드리프트 - 나무위키, 넥슨 '카트라이더: 드리프트' 초반 성적은? < 모바일 < 종합/경제 < 기사본문 - 더게임스데일리, 카트라이더: 드리프트/평가 - 나무위키 web-search-ef3923bca9391bdfe6dd50d8ccbcb8bacb5b236962900ce5567f
INFO [open_webui.routers.retrieval] adding to collection web-search-ef3923bca9391bdfe6dd50d8ccbcb8bacb5b236962900ce5567f
INFO [open_webui.retrieval.utils] query_doc:result '24244702-7771-4985-a88c-6fcd34f1ac0f', '597478a7-8703-4ea6-aa74-3a4c0970c2b5', '9e4398a9-c218-40e9-8e7a-486ea8311708' {'embedding_config': '{"engine": "", "model": "sentence-transformers/all-MiniLM-L6-v2"}', 'language': 'ko', 'source': 'https://namu.wiki/w/%EC%A1%B0%EC%9E%AC%EC%9C%A4(%EA%B2%8C%EC%9E%84%20%EA%B0%9C%EB%B0%9C%EC%9E%90)/%ED%8F%89%EA%B0%80/%EC%B9%B4%ED%8A%B8%EB%9D%BC%EC%9D%B4%EB%8D%94:%20%EB%93%9C%EB%A6%AC%ED%94%84%ED%8A%B8', 'start_index': 3, 'title': '조재윤(게임 개발자)/평가/카트라이더: 드리프트 - 나무위키'}, {'embedding_config': '{"engine": "", "model": "sentence-transformers/all-MiniLM-L6-v2"}', 'language': 'ko', 'source': 'https://namu.wiki/w/%EC%B9%B4%ED%8A%B8%EB%9D%BC%EC%9D%B4%EB%8D%94:%20%EB%93%9C%EB%A6%AC%ED%94%84%ED%8A%B8/%ED%8F%89%EA%B0%80', 'start_index': 3, 'title': '카트라이더: 드리프트/평가 - 나무위키'}, {'embedding_config': '{"engine": "", "model": "sentence-transformers/all-MiniLM-L6-v2"}', 'language': 'ko', 'source': 'https://namu.wiki/w/%EC%A1%B0%EC%9E%AC%EC%9C%A4(%EA%B2%8C%EC%9E%84%20%EA%B0%9C%EB%B0%9C%EC%9E%90)/%ED%8F%89%EA%B0%80/%EC%B9%B4%ED%8A%B8%EB%9D%BC%EC%9D%B4%EB%8D%94:%20%EB%93%9C%EB%A6%AC%ED%94%84%ED%8A%B8', 'start_index': 2761, 'title': '조재윤(게임 개발자)/평가/카트라이더: 드리프트 - 나무위키'}
INFO [open_webui.retrieval.utils] query_doc:result '597478a7-8703-4ea6-aa74-3a4c0970c2b5', '24244702-7771-4985-a88c-6fcd34f1ac0f', 'd5349eb5-a415-40be-8c07-0179ac03a0af' {'embedding_config': '{"engine": "", "model": "sentence-transformers/all-MiniLM-L6-v2"}', 'language': 'ko', 'source': 'https://namu.wiki/w/%EC%B9%B4%ED%8A%B8%EB%9D%BC%EC%9D%B4%EB%8D%94:%20%EB%93%9C%EB%A6%AC%ED%94%84%ED%8A%B8/%ED%8F%89%EA%B0%80', 'start_index': 3, 'title': '카트라이더: 드리프트/평가 - 나무위키'}, {'embedding_config': '{"engine": "", "model": "sentence-transformers/all-MiniLM-L6-v2"}', 'language': 'ko', 'source': 'https://namu.wiki/w/%EC%A1%B0%EC%9E%AC%EC%9C%A4(%EA%B2%8C%EC%9E%84%20%EA%B0%9C%EB%B0%9C%EC%9E%90)/%ED%8F%89%EA%B0%80/%EC%B9%B4%ED%8A%B8%EB%9D%BC%EC%9D%B4%EB%8D%94:%20%EB%93%9C%EB%A6%AC%ED%94%84%ED%8A%B8', 'start_index': 3, 'title': '조재윤(게임 개발자)/평가/카트라이더: 드리프트 - 나무위키'}, {'embedding_config': '{"engine": "", "model": "sentence-transformers/all-MiniLM-L6-v2"}', 'language': 'ko', 'source': 'https://namu.wiki/w/%EC%A1%B0%EC%9E%AC%EC%9C%A4(%EA%B2%8C%EC%9E%84%20%EA%B0%9C%EB%B0%9C%EC%9E%90)/%ED%8F%89%EA%B0%80/%EC%B9%B4%ED%8A%B8%EB%9D%BC%EC%9D%B4%EB%8D%94:%20%EB%93%9C%EB%A6%AC%ED%94%84%ED%8A%B8', 'start_index': 60, 'title': '조재윤(게임 개발자)/평가/카트라이더: 드리프트 - 나무위키'}
INFO [open_webui.retrieval.utils] query_doc:result '24244702-7771-4985-a88c-6fcd34f1ac0f', '597478a7-8703-4ea6-aa74-3a4c0970c2b5', '9e4398a9-c218-40e9-8e7a-486ea8311708' {'embedding_config': '{"engine": "", "model": "sentence-transformers/all-MiniLM-L6-v2"}', 'language': 'ko', 'source': 'https://namu.wiki/w/%EC%A1%B0%EC%9E%AC%EC%9C%A4(%EA%B2%8C%EC%9E%84%20%EA%B0%9C%EB%B0%9C%EC%9E%90)/%ED%8F%89%EA%B0%80/%EC%B9%B4%ED%8A%B8%EB%9D%BC%EC%9D%B4%EB%8D%94:%20%EB%93%9C%EB%A6%AC%ED%94%84%ED%8A%B8', 'start_index': 3, 'title': '조재윤(게임 개발자)/평가/카트라이더: 드리프트 - 나무위키'}, {'embedding_config': '{"engine": "", "model": "sentence-transformers/all-MiniLM-L6-v2"}', 'language': 'ko', 'source': 'https://namu.wiki/w/%EC%B9%B4%ED%8A%B8%EB%9D%BC%EC%9D%B4%EB%8D%94:%20%EB%93%9C%EB%A6%AC%ED%94%84%ED%8A%B8/%ED%8F%89%EA%B0%80', 'start_index': 3, 'title': '카트라이더: 드리프트/평가 - 나무위키'}, {'embedding_config': '{"engine": "", "model": "sentence-transformers/all-MiniLM-L6-v2"}', 'language': 'ko', 'source': 'https://namu.wiki/w/%EC%A1%B0%EC%9E%AC%EC%9C%A4(%EA%B2%8C%EC%9E%84%20%EA%B0%9C%EB%B0%9C%EC%9E%90)/%ED%8F%89%EA%B0%80/%EC%B9%B4%ED%8A%B8%EB%9D%BC%EC%9D%B4%EB%8D%94:%20%EB%93%9C%EB%A6%AC%ED%94%84%ED%8A%B8', 'start_index': 2761, 'title': '조재윤(게임 개발자)/평가/카트라이더: 드리프트 - 나무위키'}
pipe:function_openai_proxy_pipe
{'model': 'o1-mini', '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-02-17.\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: 카트라이더 드리프트에 대한 유저의 평가 알려줘\n</chat_history>\n'}], 'stream': False}
INFO: 211.210.160.7:0 - "POST /api/v1/tasks/auto/completions HTTP/1.1" 200 OK
pipe:function_openai_proxy_pipe
{'stream': True, 'model': 'o1-mini', 'messages': [{'role': 'system', 'content': '### Task:\nRespond to the user query using the provided context, incorporating inline citations in the format [source_id] only when the <source_id> tag is explicitly provided in the context.\n\n### Guidelines:\n- If you don't know the answer, clearly state that.\n- If uncertain, ask the user for clarification.\n- Respond in the same language as the user's query.\n- If the context is unreadable or of poor quality, inform the user and provide the best possible answer.\n- If the answer isn't present in the context but you possess the knowledge, explain this to the user and provide the answer using your own understanding.\n- Only include inline citations using [source_id] when a <source_id> tag is explicitly provided in the context. \n- Do not cite if the <source_id> tag is not provided in the context. \n- Do not use XML tags in your response.\n- Ensure citations are concise and directly related to the information provided.\n\n### Example of Citation:\nIf the user asks about a specific topic and the information is found in "whitepaper.pdf" with a provided <source_id>, the response should include the citation like so: \n* "According to the study, the proposed method increases efficiency by 20% [whitepaper.pdf]."\nIf no <source_id> is present, the response should omit the citation.\n\n### Output:\nProvide a clear and direct response to the user's query, including inline citations in the format [source_id] only when the <source_id> tag is present in the context.\n\n\n<source_id>0</source_id><source_context>카트라이더: 드리프트/평가 - 나무위키</source_context>\n<source_id>1</source_id><source_context>조재윤(게임 개발자)/평가/카트라이더: 드리프트 - 나무위키</source_context>\n<source_id>2</source_id><source_context>조재윤(게임 개발자)/평가/카트라이더: 드리프트 - 나무위키</source_context>\n\n\n<user_query>\n카트라이더 드리프트에 대한 유저의 평가 알려줘\n</user_query>\n'}, {'role': 'user', 'content': '카트라이더 드리프트에 대한 유저의 평가 알려줘'}]}
INFO: 192.168.0.1:0 - "POST /api/chat/completions HTTP/1.1" 200 OK
INFO: 211.210.160.7:0 - "POST /api/v1/chats/861dbc0b-66d4-45ae-949c-a74a500926cd HTTP/1.1" 200 OK
pipe:function_openai_proxy_pipe
{'model': 'o1-mini', 'messages': [{'role': 'user', 'content': '### Task:\nGenerate a concise, 3-5 word title with an emoji summarizing the chat history.\n### Guidelines:\n- The title should clearly represent the main theme or subject of the conversation.\n- Use emojis that enhance understanding of the topic, but avoid quotation marks or special formatting.\n- Write the title in the chat's primary language; default to English if multilingual.\n- Prioritize accuracy over excessive creativity; keep it clear and simple.\n### Output:\nJSON format: { "title": "your concise title here" }\n### Examples:\n- { "title": "📉 Stock Market Trends" },\n- { "title": "🍪 Perfect Chocolate Chip Recipe" },\n- { "title": "Evolution of Music Streaming" },\n- { "title": "Remote Work Productivity Tips" },\n- { "title": "Artificial Intelligence in Healthcare" },\n- { "title": "🎮 Video Game Development Insights" }\n### Chat History:\n<chat_history>\nUSER: 카트라이더 드리프트에 대한 유저의 평가 알려줘\nASSISTANT: Error: 400 Client Error: Bad Request for url: https://api.openai.com/v1/chat/completions\n</chat_history>'}], 'stream': False, 'max_completion_tokens': 1000}
pipe:function_openai_proxy_pipe
{'model': 'o1-mini', 'messages': [{'role': 'user', 'content': '### Task:\nGenerate 1-3 broad tags categorizing the main themes of the chat history, along with 1-3 more specific subtopic tags.\n\n### Guidelines:\n- Start with high-level domains (e.g. Science, Technology, Philosophy, Arts, Politics, Business, Health, Sports, Entertainment, Education)\n- Consider including relevant subfields/subdomains if they are strongly represented throughout the conversation\n- If content is too short (less than 3 messages) or too diverse, use only ["General"]\n- Use the chat's primary language; default to English if multilingual\n- Prioritize accuracy over specificity\n\n### Output:\nJSON format: { "tags": ["tag1", "tag2", "tag3"] }\n\n### Chat History:\n<chat_history>\nUSER: 카트라이더 드리프트에 대한 유저의 평가 알려줘\nASSISTANT: Error: 400 Client Error: Bad Request for url: https://api.openai.com/v1/chat/completions\n</chat_history>'}], 'stream': False}
Screenshots/Screen Recordings (if applicable):
Additional Information
[Include any additional details that may help in understanding and reproducing the issue. This could include specific configurations, error messages, or anything else relevant to the bug.]
Note
If the bug report is incomplete or does not follow the provided instructions, it may not be addressed. Please ensure that you have followed the steps outlined in the README.md and troubleshooting.md documents, and provide all necessary information for us to reproduce and address the issue. Thank you!