mirror of
https://github.com/open-webui/open-webui.git
synced 2026-07-16 14:39:31 -05:00
[PR #23796] [MERGED] perf: reuse request db session in get_model_profile_image #50421
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/23796
Author: @Classic298
Created: 4/16/2026
Status: ✅ Merged
Merged: 4/17/2026
Merged by: @tjbck
Base:
dev← Head:claude/fix-db-session-profile-image-rF6Q3📝 Commits (1)
1b930f1perf: reuse request db session in get_model_profile_image📊 Changes
1 file changed (+6 additions, -2 deletions)
View changed files
📝
backend/open_webui/routers/models.py(+6 -2)📄 Description
Pass the request-scoped AsyncSession into Models.get_model_by_id so the endpoint no longer opens a fresh DB session on every call, avoiding an extra connection acquisition per profile image request.
Contributor License Agreement
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.