Lewis, who is 28 years old, is a former undrafted free agent who has six career starts and 189 career passes. He played college football at Duke and was signed by the St. Louis Rams in 2010. He has also spent time with the Cleveland Browns, Detroit Lions, Buffalo Bills, and Houston Texans.
Last year, he was with the Philadelphia Eagles, the former team of new 49ers head coach Chip Kelly. Over his NFL career, he has passed for 1,296 yards, five touchdowns, four interceptions, a completion percentage of 60.8, and a passer rating of 81.4.
Other quarterbacks on the roster include Colin Kaepernick, who is reportedly interested in a trade, Blaine Gabbert and Dylan Thompson.