[PR #22775] [CLOSED] fix: make fetch_url max_content_length configurable via env var #26860

Closed
opened 2026-04-20 06:44:48 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/22775
Author: @Jah-yee
Created: 3/17/2026
Status: Closed

Base: mainHead: main


📝 Commits (1)

  • 92ad7ed fix: make fetch_url max_content_length configurable via env var

📊 Changes

1 file changed (+3 additions, -1 deletions)

View changed files

📝 backend/open_webui/tools/builtin.py (+3 -1)

📄 Description

Summary

  • Add WEBUI_MAX_FETCH_URL_LENGTH env var support (default: 50000)
  • Allows users to customize the max content length for fetch_url tool
  • Fixes issue where max content length is hardcoded

Changes

  • Added import os to builtin.py
  • Changed hardcoded max_length = 50000 to max_length = int(os.environ.get("WEBUI_MAX_FETCH_URL_LENGTH", "50000"))

Fixes #22774


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/open-webui/open-webui/pull/22775 **Author:** [@Jah-yee](https://github.com/Jah-yee) **Created:** 3/17/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (1) - [`92ad7ed`](https://github.com/open-webui/open-webui/commit/92ad7ed7d096bb8ea3397625c3b29df6c9089cd0) fix: make fetch_url max_content_length configurable via env var ### 📊 Changes **1 file changed** (+3 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `backend/open_webui/tools/builtin.py` (+3 -1) </details> ### 📄 Description ## Summary - Add `WEBUI_MAX_FETCH_URL_LENGTH` env var support (default: 50000) - Allows users to customize the max content length for fetch_url tool - Fixes issue where max content length is hardcoded ## Changes - Added `import os` to builtin.py - Changed hardcoded `max_length = 50000` to `max_length = int(os.environ.get("WEBUI_MAX_FETCH_URL_LENGTH", "50000"))` ## Related Issue Fixes #22774 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-20 06:44:48 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#26860