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.
model-select-by-quality
model-select-by-cost
Remaining token count.
Maximum token allocation.
Downgrade threshold (default DEFAULT_BUDGET_THRESHOLD).
'cost' when the downgrade path should apply, 'quality' otherwise.
'cost'
'quality'
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-qualityormodel-select-by-costtemplates directly.