This commit is contained in:
Timothy Jaeryang Baek
2026-07-15 22:45:00 -04:00
parent 9e2536aa57
commit 588f129695
17 changed files with 54 additions and 33 deletions
+9 -3
View File
@@ -2523,10 +2523,16 @@ async def process_chat_payload(request, form_data, user, metadata, model):
)
available_skills = []
view_skill_ids = []
chat = None
if metadata.get('chat_id') and not metadata['chat_id'].startswith(('local:', 'channel:')):
chat = await Chats.get_chat_by_id(metadata['chat_id'])
use_builtin_tools = (
bool(metadata.get('session_id'))
and metadata.get('params', {}).get('function_calling') != 'legacy'
and (model.get('info', {}).get('meta', {}).get('capabilities') or {}).get('builtin_tools', True)
(chat and (chat.meta or {}).get('internal') is True and (chat.meta or {}).get('type') == 'note')
or (
bool(metadata.get('session_id'))
and metadata.get('params', {}).get('function_calling') != 'legacy'
and (model.get('info', {}).get('meta', {}).get('capabilities') or {}).get('builtin_tools', True)
)
)
if skill_ids: