mirror of
https://github.com/open-webui/open-webui.git
synced 2026-10-16 04:28:36 +00:00
fix: Correct model_id extraction from metadata for Automation in built-in tools
Automation tool: Correctly extract model ID from __metadata__['model']['id'] instead of looking for non-existent model_id field
This commit is contained in:
parent
f162d4de90
commit
40011d72e1
1 changed files with 1 additions and 1 deletions
|
|
@ -2569,7 +2569,7 @@ async def create_automation(
|
|||
return json.dumps({'error': 'User not found'})
|
||||
|
||||
# Always use the calling model for the automation
|
||||
model_id = (__metadata__ or {}).get('model_id')
|
||||
model_id = (__metadata__ or {}).get('model', {}).get('id')
|
||||
if not model_id:
|
||||
return json.dumps({'error': 'Could not detect current model'})
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue