farion1231/cc-switch

[Bug] MiniMax-M3 built-in pricing uses the undiscounted rates

Offen

#5.841 geöffnet am 28.07.2026

 (1 Kommentar) (0 Reaktionen) (0 zugewiesene Personen)Rust (8.695 Forks)batch import
backendbuggood first issue

Repository-Metriken

Stars
 (127.413 Sterne)
PR-Merge-Metriken
 (Durchschn. Merge 6T 18h) (70 gemergte PRs in 30 T)

Beschreibung

Summary

The built-in minimax-m3 pricing row currently uses these USD rates per million tokens:

  • Input: $0.60
  • Output: $2.40
  • Cache read: $0.12
  • Cache write: $0

MiniMax's current pay-as-you-go page marks the 50% discount as permanent. For requests with up to 512K input tokens, the effective rates are $0.30, $1.20, and $0.06. The current row therefore makes usage cost estimates twice the billed amount for the standard context tier.

Official pricing: https://platform.minimax.io/subscribe/token-plan?tab=api-enterprise

Current row: https://github.com/farion1231/cc-switch/blob/ff3bc242cc8c51c7d7f5540c867e0472cb2da5a8/src-tauri/src/database/schema.rs#L2168

The 512K–1M tier uses $0.60, $2.40, and $0.12, but the current pricing table stores only one rate per model. Using the standard ≤512K tier here is consistent with how the catalog handles other models without context-tiered pricing.

Suggested fix

  1. Change the seed row to 0.30 / 1.20 / 0.06 / 0.
  2. Add a guarded entry to repair_current_model_pricing that updates existing rows only when all fields still match the old built-in values. This preserves user-customized prices.
  3. Add tests for a fresh database and for repairing an untouched old row while preserving a customized row.

No database schema change is needed.

Contributor Guide