I’m not sure if something like this exists, otherwise it would be a nice (and imho) not too complex addition.
I currently experiment with OSL, which prevents me to use GPU rendering. So it would be nice if I had a node which offers global values, e.g. quality level, OSL enabled, … This node would be handy to make ‘branched’ shaders like ‘if OSL is enabled, use the OSL node, otherwise use diffuse shader’ or ‘if quality level is > 2 use diffuse/glossy, otherwise just use the diffuse branch’. This would allow faster previews.
If something like this is already possible, please tell me how. Otherwise, please let me know if you find this feature useful and where I can add a feature request