How to enable/disable reasoning in certain models

  • I am using AI SDK in my next, with providers = openrouter, groq and google generative api.
  • I sending a reasoning flag, and in route.ts, enabling/disabling them reasoning using provideOption’s setting, but some models are always providing reasning data irrespective of flag for eg = NVIDIA: Nemotron Nano 9B V2 (free) form open router, says we can disable/enable it through system prompt I am doing that also.
  • Relevant Client Code =
  • Server(route.ts) code =