Skip to content

fix(chat): favicon, URL auto-detect, and chat_id alignment for Langfuse tracing - #39

Closed
SushantGautam wants to merge 9 commits into
mainfrom
release/0.5.14
Closed

SushantGautam wants to merge 9 commits into
mainfrom
release/0.5.14

Conversation

@SushantGautam

Copy link
Copy Markdown
Collaborator

Follow-ups to #37, all verified live against Langfuse Cloud:

  • favicon 404: the OWUI subpath build requests /chat/static/favicon.png; Caddy rewrote it to a nonexistent static/favicon.png. Ship a 64x64 PNG derived from the logo.
  • stub URL auto-detect: the bundled function defaulted to the Azure container name (helsedir-studio), which never resolves on dev machines — every tap failed silently. Probe the hostname at load time, fall back to loopback; STUDIO_PIPELINES_URL still wins.
  • chat_id alignment: the filter sent chat_id inside body.metadata while its outlet path relied on context keys Open WebUI doesn't populate, so sessions got random ids per hop. Send chat_id at the body top level (inlet + outlet); the stub prefers it.

SushantGautam and others added 9 commits October 13, 2026 18:34
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.
@SushantGautam

Copy link
Copy Markdown
Collaborator Author

Superseded by a clean branch (fix/chat-tracing-followups) — this one carried the already-squashed #37 history, which is why it conflicted.

@SushantGautam
SushantGautam deleted the release/0.5.14 branch October 14, 2026 00:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant