If you tag your materials in the file with some useful strings you could switch materials along the lines of the script I posted in:
Cycles in v6 indeed isn’t per se available as render engine, by default only as viewport mode. I believe the script points to some ideas also for checking the viewport mode. Basically you ask the viewport for its RealtimeDisplayMode, and in a try-catch block you try to query for some property. If it succeeds you have a viewport using the realtime engine integration. It could be Cycles.
To check the current renderer set through Rendering panel or Render > Current Render menu:
import Rhino.Render as rr
import Rhino.PlugIns as rp
ruid = rr.Utilities.DefaultRenderPlugInId
info = rp.PlugIn.GetPlugInInfo(ruid)
print(ruid)
print(info.Name)
Note that there is also an event that you can subscribe. It fires whenever the current renderer is changed:
https://developer.rhino3d.com/api/RhinoCommon/html/E_Rhino_RhinoApp_RendererChanged.htm