Dynamic code generation for calling APIs, not sure what is a fancy term for this approach.
https://www.anthropic.com/engineering/advanced-tool-use#:~:t...
Anthropic themselves support this style of tool calling with code first party now too.
Cloudflare published this article which I guess can be relevant https://blog.cloudflare.com/code-mode/
this assumes generated code is always correct and does exactly what's needed.
Something like https://github.com/huggingface/smolagents
Needs a sandbox, otherwise blindly executing generated code is not acceptable