The latter is cost-driven inflation with several limitations:
First of all, the demand elasticity is small,
Second, commodities are basic materials, not only raw materials, but also the foundation of the whole economy, otherwise it will not cause inflation, at most, it is the price increase of a certain commodity.
Third, domestic production lags far behind consumption and must rely on imports.
Fourth, regardless of the above characteristics, the only thing the country encounters is oil.
Off-topic, your last sentence "the balance of payments surplus makes the currency appreciate externally, but must it depreciate internally?" The answer is yes in the long run, not necessarily in the short term, because the exchange rate can be manipulated.