mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-12 00:43:31 -05:00
[PR #15717] [MERGED] fix: improve cleanup_response positioning for better resource management #39555
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?
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/15717
Author: @sihyeonn
Created: 7/15/2025
Status: ✅ Merged
Merged: 7/15/2025
Merged by: @tjbck
Base:
dev← Head:fix/sh-cleanup📝 Commits (2)
17f0befrefactor: use cleanup_response on openai058369afix: improve cleanup_response positioning for better resource management📊 Changes
2 files changed (+9 additions, -13 deletions)
View changed files
📝
backend/open_webui/routers/ollama.py(+3 -1)📝
backend/open_webui/routers/openai.py(+6 -12)📄 Description
Pull Request Checklist
Note to first-time contributors: Please open a discussion post in Discussions and describe your changes before submitting a pull request.
Before submitting, make sure you've checked the following:
devbranch.Changelog Entry
Description
cleanup_responsefunction calls insend_post_requestto ensure comprehensive resource cleanup across all execution paths, preventing memory leaks and connection pool exhaustion under various error conditions.Added
Changed
cleanup_responsecalls to ensure consistent resource cleanup behaviorcleanup_responsecalls on openaiFixed
send_post_requestSecurity
Additional Information
Screenshots or Videos
Contributor License Agreement
By submitting this pull request, I confirm that I have read and fully agree to the Contributor License Agreement (CLA), and I am providing my contributions under its terms.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.