Repository navigation
fix(chat): favicon, URL auto-detect, and chat_id alignment for Langfuse tracing - #39
Closed
SushantGautam wants to merge 9 commits into
Closed
SushantGautam wants to merge 9 commits into
SushantGautam wants to merge 9 commits into
Conversation
Also fixes the missed bump from the 0.5.13 release (pyproject was still at 0.5.12). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The pipelines stub's filter seam already traced chat without touching providers, but wiring it required either changing a connection's base URL (connection mode) or running the full open-webui/pipelines sidecar. Add the bundled 'Studio Langfuse Capture' filter function instead: it runs inside Open WebUI's own backend, fires on every chat turn for every connection (OpenAI, Anthropic-compatible, local), and pure-taps inlet/outlet to the stub. No base URL changes, no extra containers, tracing failures never break chat. Smoke-tested against the running stub. docs/chat.md now presents this as the recommended wiring (the official Pipelines README itself recommends Functions over Pipelines for basic filters). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
No manual Open WebUI step: push_now() now also installs (or updates when the bundled file changed) 'Studio Langfuse Capture' via Open WebUI's functions API, granting access to all users. Runs at startup and after each connection change; idempotent (content compared, only pushed when changed); best-effort and never raises, so tracing can't block connection sync or startup. The startup report line includes the tracing outcome. Default target is http://helsedir-studio:9099 (studio container name on the shared Docker network); override with STUDIO_PIPELINES_URL or the function's pipelines_url valve. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The functions endpoints require id/name/content/meta on both create
and update, and function ids allow only alphanumerics and underscores:
use a stable slug id, send meta {}, and drop the redundant access-rights
call (new functions are active for all users by default). Verified
against a running Open WebUI instance.
The bundled default pointed at the Azure container name, which never resolves on a dev machine — every tap failed silently. Probe the container hostname at load time and fall back to loopback; explicit STUDIO_PIPELINES_URL still wins.
The subpath Open WebUI build requests /chat/static/favicon.png, which Caddy rewrote to a nonexistent static/favicon.png (only logo.png existed), so the tab icon 404'd. Ship a 64x64 PNG derived from the logo.
The OWUI filter sent chat_id inside body.metadata while the outlet path relied on context keys Open WebUI does not populate, so chats fell back to a random id per hop and spans never matched a stable session. Send chat_id at the body top level (both inlet and outlet) and have the stub prefer it.
Collaborator
Author
|
Superseded by a clean branch (fix/chat-tracing-followups) — this one carried the already-squashed #37 history, which is why it conflicted. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-ups to #37, all verified live against Langfuse Cloud: