I was impressed that Copilot even works well on languages not advertised as supported.
If it isn't, then Copilot has previously used OpenAI Codex (which is based on GPT-3)
Source: https://github.blog/2023-03-22-github-copilot-x-the-ai-power...
It was so unexpected for me that I had to pause for a second to process what happened.