[PR #2799] [MERGED] Enable use of http_proxy environment variable in openai and ollama calls #7901

Closed
opened 2025-11-11 17:39:39 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/2799
Author: @mindspawn
Created: 6/4/2024
Status: Merged
Merged: 6/4/2024
Merged by: @tjbck

Base: devHead: proxy-fix


📝 Commits (8)

📊 Changes

2 files changed (+5 additions, -5 deletions)

View changed files

📝 backend/apps/ollama/main.py (+3 -3)
📝 backend/apps/openai/main.py (+2 -2)

📄 Description

Changelog Entry

Description

ClientSession method in aiohttp module requires trust_env=True to use http_proxy from the environment. Without this, open-webui breaks in a proxy only environment.

Related Documentation: https://docs.aiohttp.org/en/stable/client_reference.html

Added

  • Enable use of http_proxy for openai and ollama API calls

Changed

  • Add trust_env True to all ClientSession calls

Fixed


🔄 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/2799 **Author:** [@mindspawn](https://github.com/mindspawn) **Created:** 6/4/2024 **Status:** ✅ Merged **Merged:** 6/4/2024 **Merged by:** [@tjbck](https://github.com/tjbck) **Base:** `dev` ← **Head:** `proxy-fix` --- ### 📝 Commits (8) - [`c6c5c0d`](https://github.com/open-webui/open-webui/commit/c6c5c0ddb21612cf83421a504f62ebfef5e3d7c9) Merge pull request #2787 from open-webui/dev - [`e0772c6`](https://github.com/open-webui/open-webui/commit/e0772c68078466b705091db425712bcf498b04ba) Merge pull request #2788 from open-webui/dev - [`de162a1`](https://github.com/open-webui/open-webui/commit/de162a1f32481f033cae41dd740da4faad813977) Merge pull request #2789 from open-webui/dev - [`0ac04c9`](https://github.com/open-webui/open-webui/commit/0ac04c9518783933dd2d9272be0ee7a278a23fbd) Merge pull request #2791 from open-webui/dev - [`8a94d8a`](https://github.com/open-webui/open-webui/commit/8a94d8a226e33b3aeee5772e71b6acf90a096fab) Merge pull request #2794 from open-webui/dev - [`11bb1a6`](https://github.com/open-webui/open-webui/commit/11bb1a6f7d5760d48d39bc7fae5f82f6c65ffc47) Merge pull request #2795 from open-webui/dev - [`94ebf02`](https://github.com/open-webui/open-webui/commit/94ebf027197e5bf8faa58e83c6ce1f0a65441bfd) Enable http_proxy use for openai calls. - [`74ed74f`](https://github.com/open-webui/open-webui/commit/74ed74f1a4ec30b6ea6fc2124395d9033451edf2) Enable http_proxy use for ollama calls. ### 📊 Changes **2 files changed** (+5 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `backend/apps/ollama/main.py` (+3 -3) 📝 `backend/apps/openai/main.py` (+2 -2) </details> ### 📄 Description # Changelog Entry ### Description ClientSession method in aiohttp module requires trust_env=True to use http_proxy from the environment. Without this, open-webui breaks in a proxy only environment. Related Documentation: https://docs.aiohttp.org/en/stable/client_reference.html ### Added - Enable use of http_proxy for openai and ollama API calls ### Changed - Add trust_env True to all ClientSession calls ### Fixed - #2798 --- <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 2025-11-11 17:39:39 -06: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#7901