Code
The OpenAItools / tool_calls schema is forwarded as-is by the gateway. The upstream Workers AI model must support function calling. @cf/zai-org/glm-4.7-flash does.
cookbook/90_models/cloudflare/tool_use.py
Usage
1
Set up your virtual environment
2
Set your environment variables
3
Install dependencies
4
Run Agent