Even if the model was FOSS, the infrastructure needed to run it would be costly.
Given the cost of single GPT-3 codex query, it's very likely that Microsoft/Github is still taking a huge operating loss at 10USD per month.
Probably costs 3-4 times that to power the infra. They’ll make money back if they’re able to do several step changes of improvement in cost optimization.
If it should, it's a lot more complicated than that. "Open source" isn't a boolean where as long as you share your source you're compliant. Licenses usually require that a copyright notice be redistributed along with any source code and / or attribution in other ways, sometimes they require details of any modifications, etc. They're not doing that.
I’m especially curious about this if it trains on GPLv3 and AGPL licensed code.
Yes, it is a derived work and should be GPL if it was trained on GPL code.