Premier Barry O'Farrell has blasted his federal colleagues for abandoning the schools funding agreement he struck with the former Labor government, saying they should stop acting like an opposition.

Mr O'Farrell singled out Education Minister Christopher Pyne for criticism after he learned through the media that the funding promised to NSW as part of the Gonski reforms was at risk.

"Can I just make this point to the federal Education Minister," he said. "In all my years in politics, I have worked out that it is best to have respectful discussions and consultations in private, not through the media.