You can achieve this using Transform & Replace Selection With Java Script:
I already run local models and also openrouter.ai (it wraps many models with a single API address). I use a custom endpoint and can tweak other things like the system prompt. Allowing for other OpenAI compatible APIs in the ChatGPT action would be straightforward and great.
In the next step, I think expanding the support from OpenAI to other providers in "Transform and Replace Selection with ChatGPT" would be another feature request. Of course openrouter is neat, but it is still one provider. Unfortunately for native support each API is different (Anthropic vs. Google vs. OpenAI), and the APIs do change relatively quickly. There are other differences like model names and parameters each API supports, so it will need a bit of thought about how configurable this will be. It is an additional burden and so the development cost of maintaining this feature will be higher than other actions...