mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-07 11:28:35 -05:00
[GH-ISSUE #23841] issue: fetch_url tool call returns PDF files in binary, overwhelming most models #58751
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 @Davimalu on GitHub (Apr 17, 2026).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/23841
Check Existing Issues
Installation Method
Docker
Open WebUI Version
v0.8.12
Ollama Version (if applicable)
No response
Operating System
Debian 13
Browser (if applicable)
Firefox 149.0.2
Confirmation
README.md.Expected Behavior
The
fetch_urlmethod should detect that a PDF is being downloaded and pass the extracted text to the model instead of raw binary dataActual Behavior
When a model calls
fetch_urlon a .pdf document or a website that redirects to a .pdf document, it will write the documents raw binary string into the models context window, e.g.This completely overwhelms most models and they stop their response
Steps to Reproduce
search_webtool call)fetch_urlwill retrieve the PDF and write the raw binary into the models context windowLogs & Screenshots
Additional Information
I was able to fix the issue by providing a custom implementation of
fetch_url. This was generated using Claude Opus 4.6 and is probably not production ready, but I thought I'd leave it here as an example how the issue can be solved:@tjbck commented on GitHub (Apr 21, 2026):
Addressed in dev.