mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-05 18:38:17 -05:00
[PR #4392] [CLOSED] Return meaningful errors when an undefined model is selected #21481
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/4392
Author: @simon3z
Created: 8/5/2024
Status: ❌ Closed
Base:
dev← Head:main📝 Commits (1)
811386bfix: improve exception handling📊 Changes
1 file changed (+35 additions, -61 deletions)
View changed files
📝
backend/main.py(+35 -61)📄 Description
Pull Request Checklist
As first-time contributor I described the issue here: https://github.com/open-webui/open-webui/discussions/4390
Before submitting, make sure you've checked the following:
devbranch.[ ] Documentation: Have you updated relevant documentation Open WebUI Docs, or other documentation sources?[ ] Dependencies: Are there any new dependencies? Have you updated the dependency versions in the documentation?Changelog Entry
Description
get_modelthat throws a consistent exception in case the model is not defined. This also fixes the issue that in some instances the model selection wasn't properly throwing a descriptive exception.JSONResponsehandling both theHTTPExceptionobject and the genericExceptionobject. This fixes the issue that sometimes thee.argstuple did not contain enough items to properly construct theJSONResponseAdded
get_modelJSONResponseinexception_json_responseChanged
get_modelandexception_json_responseFixed
e.args🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.