Both criteria are "maximum" so the lower of the two maximums would apply and still comply with both.
You must comply with the building code, first. OSHA is an occupational requirement and in this case does not conflict with the code, so you do not have to seek a variance from either. It will obviously change your stair angle and could present a dimensional issue.
It is easier to justify a building code deviation than it is to justify an OSHA deviation, but I would go through a documentation process showing your decision and why, just for your protection, in the event you decide to deviate. If your application is on a path of egress or concerns Life Safety issues, I would not deviate from the code requirements without significant justification.