Bug: Single document edit request triggered massive Grok 4.6 Medium token consumption (834k tokens), ignoring BYOK model config

Bug

I sent one request — read and modify a single document. Cursor’s background workspace indexing / context gathering auto-routed to Grok 4.6 Medium, ignoring my BYOK (MiniMax) config, and consumed ~834k tokens in minutes. It appeared to traverse the entire codebase rather than just the one file I asked about.

Steps to Reproduce

  1. Fresh install Cursor on new PC, configure BYOK (MiniMax)
  2. Open existing code project for the first time
  3. Send a single request: read and modify one document
  4. Check usage dashboard → Grok 4.6 Medium consumed ~834k tokens (497k + 296k + 41k)

Expected

A single-file edit should not trigger full-codebase traversal. Background tasks should respect BYOK model config.

Environment

  • Windows 10/11, Cursor IDE latest (Oct 2026, VS Code 1.128.0)
  • BYOK: MiniMax (ignored by background tasks)
  • Auto-selected: Grok 4.6 Medium

Related (staff-acknowledged)

Workaround

Settings → Codebase Indexing → Disable auto-index workspace before opening projects on a new machine.

Hi there!

We detected that this may be a bug report, so we’ve moved your post to the Bug Reports category.

To help us investigate and fix this faster, could you edit your original post to include the details from the template below?

Bug Report Template - Click to expand

Where does the bug appear (feature/product)?

  • Editor, Tab & Chat (autocomplete, Composer, in-editor agent)
  • Terminal & commands
  • Models, pricing & API keys (availability, Auto/Max, BYOK/Bedrock)
  • MCP & tools
  • Cloud Agents & Automations (cursor.com/agents, scheduled/event)
  • BugBot & Code Review
  • Cursor CLI
  • Cursor Mobile
  • Remote (SSH / Dev Containers / WSL)
  • Account, billing & login
  • Something else…

Describe the Bug
A clear and concise description of what the bug is.


Steps to Reproduce
How can you reproduce this bug? We have a much better chance at fixing issues if we can reproduce them!

  1. …
  2. …
  3. …

Expected Behavior
What is meant to happen here that isn’t working correctly?


Screenshots / Screen Recordings
If applicable, attach images or videos (.jpg, .png, .gif, .mp4, .mov)


Operating System

  • Windows 10/11
  • MacOS
  • Linux

Version Information

  • For Cursor IDE: Menu → About Cursor → Copy
  • For Cursor CLI: Run agent about in your terminal
IDE:
Version: 2.xx.x
VSCode Version: 1.105.1
Commit: ......

CLI:
CLI Version 2026.01.17-d239e66

For AI issues: which model did you use?
Model name (e.g., Sonnet 4, Tab…)


For AI issues: add Request ID with privacy disabled
Request ID: f9a7046a-279b-47e5-ab48-6e8dc12daba1
For Background Agent issues, also post the ID: bc-…


Additional Information
Add any other context about the problem here.


Does this stop you from using Cursor?

  • Yes - Cursor is unusable
  • Sometimes - I can sometimes use Cursor
  • No - Cursor works, but with this issue

The more details you provide, the easier it is for us to reproduce and fix the issue. Thanks!

Hey, thanks for the report. Let’s break it down.

The main thing is that BYOK with a custom model through Override OpenAI Base URL in Agent, Chat, and Edit only works with an active paid subscription Pro or higher. On Free, that path is blocked, so your MiniMax key wasn’t picked up. MiniMax’s own Cursor docs confirm this too: “Custom models require a Cursor Pro subscription or above”.

Because of that, on Free the model picker stays locked to Cursor Grok 4.6 Medium, and both requests were sent to Grok, not MiniMax.

About the tokens: codebase indexing creates embeddings and doesn’t use the chat model, so that usage didn’t come from indexing. It came from the agent steps themselves. To read and edit a file, the agent takes several steps like search, read, and edit, and at each step it sends the conversation context again. Most of the tokens shown there are cached input, not a full pass over the whole codebase.

To use your own MiniMax key in Agent, you’ll need an active Pro subscription or higher. After upgrading, add the model like this: Settings → Models → API Keys, turn on “OpenAI API Key” and paste the key, turn on “Override OpenAI Base URL” with MiniMax’s OpenAI-compatible endpoint, click Verify, then add the model name as a custom model.