def METHOD_NAME(config: RouteConfig):
    prov = get_provider(config.model.provider)(config)
    async def _chat(payload: chat.RequestPayload) -> chat.ResponsePayload:
        return await prov.chat(payload)
    return _chat