The driver's generic command() or runCommand() API should accept a read preference, and obey the preference for these commands:
geoNear, geoSearch, geoWalk
For these exceptional commands, the driver or mongos obeys the read preference the same as for queries. Otherwise, all commands are run on the primary.
Note: In the future we'll need to add a field to commands in listCommands to distinguish new commands that should obey the read preference. The slaveOk field alone doesn't cover this: e.g., reindex has slaveOk true, but we've decided that reindex with a read preference of SECONDARY should not reindex a random secondary, it should be run on the primary.