diff --git a/index.html b/index.html index 01e8047..f8a10d2 100644 --- a/index.html +++ b/index.html @@ -244,10 +244,15 @@

Model prices (per million tokens)

+ + + - ${inputCostDisplay} + ${formatPrice(item.input)} + ${formatPrice(item.input_cached)} ${formatPrice(item.output)} `; @@ -692,6 +699,7 @@

Model prices (per million tokens)

let activeThButtonId; if (currentSortColumn === 'name') activeThButtonId = elIds.sortByName; else if (currentSortColumn === 'input') activeThButtonId = elIds.sortByInput; + else if (currentSortColumn === 'inputCached') activeThButtonId = elIds.sortByInputCached; else if (currentSortColumn === 'output') activeThButtonId = elIds.sortByOutput; if (activeThButtonId) { @@ -743,7 +751,7 @@

Model prices (per million tokens)

const sortDirFromHash = params.get(HASH_KEYS.sortDir); // Valid sort columns and directions - const validSortCols = ['name', 'input', 'output']; + const validSortCols = ['name', 'input', 'inputCached', 'output']; const validSortDirs = ['ascending', 'descending']; if (sortByFromHash && validSortCols.includes(sortByFromHash) && @@ -786,6 +794,7 @@

Model prices (per million tokens)

// Event listeners for sort buttons document.getElementById(elIds.sortByName).addEventListener('click', () => sortTable('name')); document.getElementById(elIds.sortByInput).addEventListener('click', () => sortTable('input')); + document.getElementById(elIds.sortByInputCached).addEventListener('click', () => sortTable('inputCached')); document.getElementById(elIds.sortByOutput).addEventListener('click', () => sortTable('output')); // Event listeners for search input