Grok-Block! Made with Cursor to prevent pesky default model overrides!

Hi folks! Gotta say I absolutely love Cursor and use it every day. It is definitely the best AI integrated coding platform out there.

If you search the forums, you’ll notice that there are lots of instances of Cursor “accidentally” switching user’s default model parameters to Grok models. The dev team insists that this is a bug, however, I found a GetDefaultModelNudgeData API call that is made every time Cursor starts up.

I’m sure this is all going to get fixed by the devs and we won’t have to suffer through this “bug” much longer, but I figured I’d help out a little for those that may be a little impatient like me.

Without further ado, I’d like to introduce Grok-Block! Grok-Block is an open source tool I built with cursor that has two components:

  1. A quiet little service called cursor-nudge-guard that simply resets the nudge flag to false, preventing any nudged models from overriding your current settings.

  2. A set of pre-prompt hooks that simply checks if grok is the currently selected model for the prompt and just prevents the prompt from executing, letting you know that a grok model is currently selected.

I’ve only tested this on windows, but I would love contributions to ensure this works across mac and linux as well!

Hey @cyonic, thanks for sharing this!

FYI there’s a built-in setting for this now, so you shouldn’t need the service. Open Cursor Settings → Agents, and under Conversation set Default Model to Last Used.

With “Cursor Default”, Cursor can suggest and switch the default model for new chats. With “Last Used”, new chats keep whatever model you last picked, including after a restart.

Of course! Happy to help the community. You are correct that those settings do exist, but you can check my post history where I used cursor to find the specific API call your ide makes to override these settings when the company wants to promote a new model, which interestingly has only ever been Grok. Thanks!