Market making and optimal portfolio liquidation in the context of electronic limit order books are of considerably practical importance for high frequency (HF) market makers as well as more traditional brokerage firms supplying optimal execution services for clients. In general the two problems are based on probabilistic models defined on certain reference probability spaces. However, due to uncertainty in model parameters or in periods of extreme market turmoil, ambiguity concerning the correct underlying probability measure may appear and an assessment of model risk, as well as the uncertainty on the choice of the model itself, becomes important, as for a market maker or a trader attempting to liquidate large positions, the uncertainty may result in unexpected consequences due to severe mispricing. This paper focuses on the market making and the optimal liquidation problems using limit orders, accounting for model risk or uncertainty. Both are formulated as stochastic optimal control problems, with the controls being the spreads, relative to a reference price, at which orders are placed. The models consider uncertainty in both the drift and volatility of the underlying reference price, for the study of the effect of the uncertainty on the behavior of the market maker, accounting also for inventory restriction, as well as on the optimal liquidation using limit orders.