[GH-ISSUE #9864] Clicking inline citations in response does not trigger citation modal when >3 citations are present #54344

Closed
opened 2026-05-05 16:07:41 -05:00 by GiteaMirror · 0 comments
Owner

Originally created by @feynmanliang on GitHub (Feb 12, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/9864

Installation Method

git clone install

Environment

  • Open WebUI Version: latest main e9d6ada25c, v0.5.10

  • Ollama (if applicable): n/a

  • Operating System: OpenSuse Linux

  • Browser (if applicable): n/a

Confirmation:

  • I have read and followed all the instructions provided in the README.md.
  • I am on 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 the exact steps to reproduce the bug in the "Steps to Reproduce" section below.

Expected Behavior:

When a chat response with citations containing >3 citations is returned and I click on an in-line citation, I expect the citation modal to be toggled.

Actual Behavior:

No modal is toggled.

Reproduction Details

Steps to Reproduce:

This Function will trigger this case

"""
title: 9864-repro
authors: [Your name here]
version: 0.1.0
required_open_webui_version: 0.3.17
license: MIT
"""

import os
import json
import asyncio
from typing import List, Union, Generator, Iterator
from pydantic import BaseModel, Field
from open_webui.utils.misc import pop_system_message
from qdrant_client import QdrantClient
from sentence_transformers import SentenceTransformer
from openai import AsyncOpenAI
from langsmith.wrappers import wrap_openai


class Pipe:
    def __init__(self):
        self.citation = False
        self.type = "manifold"

    def get_manny_models(self):
        return [
            {"id": "test", "name": "test"},
        ]

    def pipes(self) -> List[dict]:
        return self.get_manny_models()

    async def _show_citations(self, context_docs, __event_emitter__):
        for i in range(10):
            content = f"Text for doc {i}"
            title = f"DOC-{i}"
            url = "url"
            await __event_emitter__(
                {
                    "type": "citation",
                    "data": {
                        "document": [content],
                        "metadata": [
                            {
                                "source": title,
                            }
                        ],
                        "source": {"name": title},
                    },
                }
            )

    async def pipe(
        self, body: dict, __event_emitter__
    ) -> Union[str, Generator, Iterator]:
        """Main pipe method to process requests"""
        try:
            yield "FOO [DOC-2]"

            await self._show_citations([], __event_emitter__)

        except Exception as e:
            print(f"Error in pipe method: {e}")
            yield f"Error: {str(e)}"

Logs and Screenshots

Browser Console Logs:

Unable to share due to NDA

Docker Container Logs:

n/a

Screenshots/Screen Recordings (if applicable):

OpenWebUI Issue #9864 - Watch Video

Originally created by @feynmanliang on GitHub (Feb 12, 2025). Original GitHub issue: https://github.com/open-webui/open-webui/issues/9864 ## Installation Method `git clone` install ## Environment - **Open WebUI Version:** latest main e9d6ada25cd6ce84be067ba794af4c9d7116edc7, v0.5.10 - **Ollama (if applicable):** n/a - **Operating System:** OpenSuse Linux - **Browser (if applicable):** n/a **Confirmation:** - [x] I have read and followed all the instructions provided in the README.md. - [x] I am on the latest version of both Open WebUI and Ollama. - [ ] I have included the browser console logs. - [ ] I have included the Docker container logs. - [x] I have provided the exact steps to reproduce the bug in the "Steps to Reproduce" section below. ## Expected Behavior: When a chat response with citations containing >3 citations is returned and I click on an in-line citation, I expect the citation modal to be toggled. ## Actual Behavior: No modal is toggled. ## Reproduction Details **Steps to Reproduce:** This Function will trigger this case ```python """ title: 9864-repro authors: [Your name here] version: 0.1.0 required_open_webui_version: 0.3.17 license: MIT """ import os import json import asyncio from typing import List, Union, Generator, Iterator from pydantic import BaseModel, Field from open_webui.utils.misc import pop_system_message from qdrant_client import QdrantClient from sentence_transformers import SentenceTransformer from openai import AsyncOpenAI from langsmith.wrappers import wrap_openai class Pipe: def __init__(self): self.citation = False self.type = "manifold" def get_manny_models(self): return [ {"id": "test", "name": "test"}, ] def pipes(self) -> List[dict]: return self.get_manny_models() async def _show_citations(self, context_docs, __event_emitter__): for i in range(10): content = f"Text for doc {i}" title = f"DOC-{i}" url = "url" await __event_emitter__( { "type": "citation", "data": { "document": [content], "metadata": [ { "source": title, } ], "source": {"name": title}, }, } ) async def pipe( self, body: dict, __event_emitter__ ) -> Union[str, Generator, Iterator]: """Main pipe method to process requests""" try: yield "FOO [DOC-2]" await self._show_citations([], __event_emitter__) except Exception as e: print(f"Error in pipe method: {e}") yield f"Error: {str(e)}" ``` ## Logs and Screenshots **Browser Console Logs:** Unable to share due to NDA **Docker Container Logs:** n/a **Screenshots/Screen Recordings (if applicable):** [OpenWebUI Issue #9864 - Watch Video](https://www.loom.com/share/a4d8f2d3936f4c79ad2f24ce3ab6e9b7)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#54344