Usage & Costs

SmartCursorX tracks token usage and estimated costs across all AI provider interactions. This helps you monitor consumption, manage budgets, and optimize model selection.

Usage Tracking

Every AI chat request is logged with:

Stored Data

Usage records are stored in the local SQLite database (smart-cursor-x.sqlite):

Cost Estimation

The CostEstimatorService calculates costs using built-in pricing tables:

ProviderPricing Model
OpenAIPer-model tiers (GPT-4, GPT-3.5, etc.)
AnthropicPer-model tiers (Claude 3 Opus, Sonnet, Haiku)
OpenRouterFetches real-time pricing from OpenRouter API
GeminiFlat rate per model
Ollama / Zen / LocalZero cost (flagged as $0.00)

Custom Pricing

For custom providers, costs default to $0.00. You can configure pricing by registering custom models with specific cost parameters.

Token Budget Monitoring

The conversation panel displays:

Budget Configuration

Token budget warnings trigger at configurable thresholds:

Model Statistics

The Model Stats panel shows per-model aggregates:

Clearing Data

To reset usage statistics:

  1. Open Settings → Usage & Costs
  2. Click Clear All Stats
  3. Confirm the action
  4. All records are permanently deleted

This does not affect chat history — only the token usage and cost records.