async def test_empty_optional_fields(self, mock_model_response):
        """Test tools work with empty optional fields."""
        tool = ChatTool()

        with patch.object(tool, "create_model") as mock_create_model:
            mock_model = MagicMock()
            mock_model.generate_content.return_value = mock_model_response()
            mock_create_model.return_value = mock_model

            # Test with no files parameter
            result = await tool.execute({"prompt": "Hello"})

            assert len(result) == 1
            output = json.loads(result[0].text)
            assert output["status"] == "success"
Test tools work with empty optional fields.
tests/test_prompt_regression.py