Meshpocalypse Semantic
    Preparing search index...

    Function getBudgetSortMode

    • Determine the preferred sort mode given remaining budget information.

      A pure helper used by the auction / routing layer when calling the simpler model-select-by-quality or model-select-by-cost templates directly.

      Parameters

      • remainingTokens: number

        Remaining token count.

      • maxTokens: number

        Maximum token allocation.

      • threshold: number = DEFAULT_BUDGET_THRESHOLD

        Downgrade threshold (default DEFAULT_BUDGET_THRESHOLD).

      Returns "cost" | "quality"

      'cost' when the downgrade path should apply, 'quality' otherwise.