Skip to content

Implement user-configurable cost tiers and subscription/quota-aware tracking #67

@Aureliolo

Description

@Aureliolo

Context

Cost tiers should not be hardcoded constants — they need to be user-configurable entities that users can define, extend, and manage through the interface. This also needs to integrate with subscription-aware quota tracking (e.g. Claude Pro subscriptions have rate limits/quotas rather than pure per-token pricing).

In M1 (#55/#56), CostTier was changed from hardcoded dollar signs ($, $$) to string ID references (low, medium, high, premium) with SeniorityInfo.cost_tier accepting any str, not just the enum. This unblocks extensibility.

Acceptance Criteria

User-Configurable Cost Tiers

  • CostTierDefinition model: id, display_name, description, price_range_min, price_range_max, color/icon (for UI)
  • Built-in tiers (low, medium, high, premium) shipped as defaults, user can add/modify/remove
  • Tiers referenced by string ID throughout the system (already done in M1)
  • YAML config support for custom tier definitions

Subscription & Quota Awareness

  • Support subscription-based providers (e.g. Claude Pro plan with rate limits, not just per-token cost)
  • Quota tracking: requests/minute, tokens/day, monthly caps per provider/subscription
  • Regular quota polling — query provider APIs for remaining budget/quota where available
  • Graceful degradation when quota exhausted (fallback to cheaper provider, queue tasks, alert user)

Integration Points

Design Notes

  • Cost tiers are a bridge between the abstract seniority system and real-world provider economics
  • Subscription tracking is fundamentally different from per-token tracking — needs its own model
  • Consider caching provider quota responses to avoid excessive API calls
  • Some providers (Ollama, local models) have zero cost but hardware resource limits — model this too

References

  • DESIGN_SPEC.md 10.1-10.4 (budget hierarchy and cost controls)
  • DESIGN_SPEC.md 9.2 (provider configuration with pricing)

Metadata

Metadata

Assignees

No one assigned

    Labels

    prio:highImportant, should be prioritizedscope:medium1-3 days of workspec:budgetDESIGN_SPEC Section 10 - Cost & Budget Managementspec:providersDESIGN_SPEC Section 9 - Model Provider Layertype:featureNew feature implementation

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions