setmodel(modname) does:
self.model = modname;
self.modelindex = modelindexforname(modname);
'modelindexforname' is some made up name for some internal part of the setmodel function, based upon the order precache_model calls were made in.
there is no other hidden state.
the engine does not use the .model field for much, specifically, it checks only if it is empty or not. never anything else.
the function putclientinserver uses setmodel to do the modelindexforname lookup, but otherwise doesn't really care.
there is powerups/ring-of-invis code which leaves the model set to progs/player.mdl, and overrides only the modelindex as required. its a hack. a big ugly hack. but means that there's no scan through the precache lists for every single frame (not that there would need to be anyway if it were written less lazily).
look for where modelindex_player is used to figure out id's hack.