Skip to content

Commit 3f7fc1a

Browse files
fix: Fix the error that occurs when the task model does not exist (open-webui#23169)
1 parent 60676bf commit 3f7fc1a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

backend/open_webui/utils/task.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def get_task_model_id(default_model_id: str, task_model: str, task_model_externa
1919
# Set the task model
2020
task_model_id = default_model_id
2121
# Check if the user has a custom task model and use that model
22-
if models[task_model_id].get('connection_type') == 'local':
22+
if models.get(task_model_id, {}).get('connection_type') == 'local':
2323
if task_model and task_model in models:
2424
task_model_id = task_model
2525
else:

0 commit comments

Comments
 (0)