Weather tool pattern (TypeScript)
A weather tool is an application-owned function: the model chooses a tool and arguments, but your application must validate them, call a weather service, and return the result. TheRouter does not supply a weather API or execute your code.
This guide uses the official OpenAI client with TheRouter; it is not a TheRouter-owned SDK. The therouter and @therouter/sdk packages previously named here are not currently published in the public package registries.