Skip to content

Fix Cursor provider for newer versions#145

Merged
iamtoruk merged 3 commits intomainfrom
fix-cursor-provider-agentKv
Apr 24, 2026
Merged

Fix Cursor provider for newer versions#145
iamtoruk merged 3 commits intomainfrom
fix-cursor-provider-agentKv

Conversation

@iamtoruk
Copy link
Copy Markdown
Member

Summary

Newer Cursor versions store conversation data in agentKv:blob:* entries instead of populating tokenCount in bubbleId entries. This caused the Cursor provider to return zero usage.

Changes

  • Add fallback parser that reads agentKv entries when bubbleId returns no results
  • Estimate tokens from content length (~4 chars per token)
  • Extract model info from providerOptions.cursor.modelName

Test Results

Before: cost: 0, calls: 0
After: cost: 0.04, calls: 4, input: 1474, output: 4197

Closes #114
Closes #102

Newer Cursor versions store conversation data in agentKv entries
instead of populating tokenCount in bubbleId entries. This adds
a fallback parser that reads agentKv blobs and estimates tokens
from content length.

Closes #114
Closes #102
@iamtoruk iamtoruk merged commit 8c2fc4f into main Apr 24, 2026
3 checks passed
@iamtoruk iamtoruk deleted the fix-cursor-provider-agentKv branch April 24, 2026 18:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant