Market clearing and intermediate consumption

Dear all,

I have a model with multiple sectors that produce from KL and intermediate consumption.

When setting the market clearing condition of each sector: p_sectorY_sector = p_sector(Demand_sector + Export) - p_importsImports, p_sectorYsector is equal to gross output.

Or p_sector*Y_sector should be net output ? Should I take out from the market clearing conditions of each sector intermediate consumption, as (Demand_sector + Export - Imports) should be equal to value added, hence the product of labor compensation and capital rental revenues?
If I follow the value added approach:

wL_sector + rK_sector = sum of final consumption + exports - imports, then I should have:

p_sectorY_sector = p_sector(Demand_sector + Export) - p_importsImports + p_icIntermediateConsumption → for this approach, it will be consistent with national accounts, and my calibration. If I consider the first approach, whithout netting intermediate consumption, then I have an inconsistency in my model with national accounts as total consumption in the model will the overestimated compared what is measured in national accounts. Indeed, if I follow the national account approach, then VA should be equal to the sum of consumption plus investments plus exports minus imports. So in the model I should have for each market clearing condition that p_sectorY_sector = p_sector(Demand_sector + Export) - p_importsImports + p_icIntermediateConsumption

Thank you