CoAgent8 - Source API
    Preparing search index...

    Function matchPrices

    • Matches models a CLI names to list entries: exactly, also without an effort or date suffix (gemini-3.8-flash-high, claude-haiku-4-5-20251001), else approximately, when one name extends the other (claude-opus-4-6-thinking, gemini-3.1-pro-preview). A context variant ([1m]) is approximate. Among several entries the highest output price is taken.

      Parameters

      • entries: readonly ListedPrice[]
      • models: Iterable<string>

      Returns Record<string, PriceRecord | null>

      Per priceKey, the price or null when no entry matches.