When using the Cursor SDK, you must map Pi's native thinking levels to the specific values expected by the Cursor models.
Pi Thinking Levels: off, minimal, low, medium, high, xhigh, max.
Mapping Rules:
off $\rightarrow$ none (if supported), else off, else false.minimal $\rightarrow$ minimal.low $\rightarrow$ low.medium $\rightarrow$ medium.high $\rightarrow$ high (or true for boolean-only thinking models).xhigh $\rightarrow$ xhigh (or extra-high).max $\rightarrow$ max.
Important Implementation Details:
- Use
null for unsupported Pi levels so the system can skip or clamp them natively. - For models that only support boolean
thinking (true/false), use an explicit mapping where unsupported levels are null to avoid accidental enablement. - The
thinkingLevelMap only controls Pi-native behavior; the actual ModelSelection.params for Agent.create() must be constructed using the active Pi level and discovered Cursor metadata.
// Example shape for boolean-only thinking models
{
off: "false",
minimal: null,
low: null,
medium: null,
high: "true",
xhigh: null,
max: null,
}