pricing
Splitrail 更新模型定价指南。在添加新的 AI 模型成本或更新现有定价数据时使用。
📖 中文导读:Splitrail 更新模型定价指南。在添加新的 AI 模型成本或更新现有定价数据时使用。 以下正文为该技能的原始 SKILL.md 内容(英文),上方安装命令可直接使用。
name: pricing description: Guide for updating model pricing in Splitrail. Use when adding new AI model costs or updating existing pricing data.
Pricing Model Updates
Token pricing is defined in src/models.rs using compile-time phf (perfect hash function) maps for fast lookups.
Adding a New Model
- Add a
ModelInfoentry toMODEL_INDEX(line 65 insrc/models.rs) with:pricing: UsePricingStructure::Flat { input_per_1m, output_per_1m }for flat-rate models, orPricingStructure::Tieredfor tiered pricingcaching: Use the appropriateCachingSupportvariant (None,OpenAI,Anthropic, orGoogle)is_estimated: Set totrueif pricing is not officially published
- If the model has aliases (date suffixes, etc.), add entries to
MODEL_ALIASESmapping to the canonical model name
See existing entries in src/models.rs for the pattern.
Price Calculation
Use models::calculate_total_cost() when an analyzer doesn't provide cost data.