This is just a guess, but make sure your KoboldCPP version is back to 1.111.1. The OpenRouter key has to have credits on it, and sometimes extra characters slip in while pasting into the API key field, so try quick setup if you haven't already.
The version automatically reverts to version 1.111.1 when I start a game, so... And it's in this version that I'm experiencing the bug. I'm going to try your thing for the openrouter.