smithery/Piebald-AI

pricing

Guide for updating model pricing in Splitrail. Use when adding new AI model costs or updating existing pricing data.

Installation

$ npx skills add smithery/Piebald-AI --skill pricing

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from smithery/Piebald-AI.

npx skills add smithery/Piebald-AI

Browse all from smithery/Piebald-AI

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 3,131 B
  • docs SUMMARY.md 131 B

History

  1. First recorded snapshot · 0 installs

SKILL.md

Pricing Model Updates

Token pricing is defined in src/models.rs. Built-in models are populated by populatedefaults() into the runtime model registry, and user/config models can be merged with initexternal_models().

Adding a New Model

  1. Add a ModelInfo entry in populate_defaults() with:

- pricing: Use PricingStructure::Flat { inputper1m, outputper1m } for flat-rate models, or PricingStructure::Tiered for threshold-based pricing. - caching: Use the appropriate CachingSupport variant (None, OpenAI, Anthropic, OpenAIWithWrites, or Tiered). - servicetiers: Leave empty unless the provider has distinct priority/flex/batch rates. - datedpricing: Leave empty unless pricing changes by usage date. - isestimated: Set to true only when pricing is not confirmed by a provider/tool source. - inputtoken_semantics: Auto-derived for built-in models (defaults to ExcludesCache); only GPT/o-series models typically need IncludesCacheRead. External model configs should set this explicitly if it affects cache-read counting.

  1. If the model has aliases (date suffixes, provider-prefixed names, regional names, etc.), add entries to the alias section mapping each observed name to the canonical model name.
  2. Add or update tests in src/models.rs for canonical pricing, aliases, caching, and estimated/non-estimated status.

Dated Pricing Overrides

Use dated_pricing when a model has temporary promotional pricing, launch pricing, or another time-bounded rate that should apply based on the original usage timestamp.

The default pricing and caching fields should represent the durable/current sticker price. Each DatedPricing override has a validuntil: NaiveDate exclusive end date and applies when usagedate < validuntil. For example, an introductory rate that applies through 2026-08-31 should use validuntil = NaiveDate::fromymdopt(2026, 9, 1).expect("valid date").

When adding a dated override:

  • Keep the model's default pricing/caching at the post-promo or durable rate.
  • Add the temporary rate with adddatedpricing!() after add_model!().
  • Add boundary tests for the final day of the temporary rate and the first day after it ends.
  • Prefer dated calculator functions in analyzers that know the usage timestamp.

Price Calculation

Use models::calculatetotalcostforservicetierat() when an analyzer has a message or event timestamp. This preserves historical costs across dated pricing windows.

Use the undated compatibility helpers, such as models::calculatetotalcost(), only for tests, config-like calculations, or call sites that truly do not know the usage date. Undated helpers use the model's default pricing/caching, not temporary dated overrides.

Common Pricing Sources