Google models struggle with Mermaid diagrams

Describe the Bug

Title, this is especially occuring with function names / parameters / syntax that conflict with the mermaid diagram for instance (){} characters

Steps to Reproduce

  • Conversation with a Google model (2.5 Pro or 2.5 flash for example)
  • Ask it to create a mermaid diagram / cursor will do it
  • Syntax error

Expected Behavior

The mermaid diagram renders

Operating System

MacOS

Current Cursor Version (Menu → About Cursor → Copy)

Version: 1.0.0 (Universal)
VSCode Version: 1.96.2
Commit: 53b99ce608cba35127ae3a050c1738a959750860
Date: 2025-06-04T19:21:39.410Z
Electron: 34.5.1
Chromium: 132.0.6834.210
Node.js: 20.19.0
V8: 13.2.152.41-electron.0
OS: Darwin arm64 24.5.0

Does this stop you from using Cursor

No - Cursor works, but with this issue