Lewis signed a one-year deal with the 49ers, the Sacramento Bee reports.
Lewis - who has spent time with the Bills, Browns, and Eagles - has a 60.8 percent career completion rate and a 5:4 TD:INT ratio. In the likely event that the 49ers trade disgruntled quarterback Colin Kaepernick this offseason, then Lewis would immediately be in the mix for a backup role during training camp, assuming the team doesn't bring in another signal caller.