To make it short: I’m now using an existing opensource tool for VSCode which can point to my local server. It’s called open copilot and is licensed under Apache 2 which allows commercial use.
Once setting up the url for your local server you can query the extension “cody” with the icon on the left sidebar or within inline code.
Its somewhat usable on my machine.