diff --git a/backend/open_webui/utils/anthropic.py b/backend/open_webui/utils/anthropic.py index 0d2ddf3b9c..bb0f64321c 100644 --- a/backend/open_webui/utils/anthropic.py +++ b/backend/open_webui/utils/anthropic.py @@ -422,7 +422,7 @@ def convert_openai_to_anthropic_response(openai_response: dict, model: str = '') content.append({'type': 'text', 'text': msg_content}) # Tool calls → tool_use blocks - tool_calls = message.get('tool_calls', []) + tool_calls = message.get('tool_calls') or [] for tc in tool_calls: func = tc.get('function', {}) try: