Skip to content

The agent that grows with you

feat(desktop): put model-picker pricing behind a setting, off by default

Brooklyn Nicholson2de175e8a75b
diff --git a/apps/desktop/src/app/settings/appearance-settings.tsx b/apps/desktop/src/app/settings/appearance-settings.tsx
index 2c46095ab53..fd9b5ddf76f 100644
--- a/apps/desktop/src/app/settings/appearance-settings.tsx
+++ b/apps/desktop/src/app/settings/appearance-settings.tsx
@@ -27,6 +27,7 @@ import {
} from '@/store/interface-mode'
import { $introSplash, setIntroSplash } from '@/store/intro-splash'
import { $fileBrowserOpen, setFileBrowserOpen } from '@/store/layout'
+import { $showModelPricing, setShowModelPricing } from '@/store/model-pricing'
import { notifyError } from '@/store/notifications'
import { $activeGatewayProfile, $profiles, normalizeProfileKey } from '@/store/profile'
import { $reactionsEnabled, setReactionsEnabled } from '@/store/reactions-enabled'
@@ -444,6 +445,7 @@ export function AppearanceSettings({ subpage }: AppearanceSettingsProps = {}) {
const vibeHeartsEnabled = useStore($vibeHeartsEnabled)
const backdrop = useStore($backdrop)
const introSplash = useStore($introSplash)
+ const showModelPricing = useStore($showModelPricing)
const installs = useStore($marketplaceInstalls)
const profiles = useStore($profiles)
const activeProfileKey = normalizeProfileKey(useStore($activeGatewayProfile))
@@ -927,6 +929,16 @@ export function AppearanceSettings({ subpage }: AppearanceSettingsProps = {}) {
/>
)}
+ {show('general') && (
+ <ToggleRow
+ checked={showModelPricing}
+ description={a.modelPricingDesc}
+ id={settingElementId(ids.modelPricing)}
+ label={a.modelPricingTitle}
+ onChange={setShowModelPricing}
+ />
+ )}
+
{/* The same state as the titlebar toggle / ⌘J, which persists across
launches — so this is the file browser's standing default. Simple
mode shadows it; a flip there only lasts the session, so say so. */}
diff --git a/apps/desktop/src/app/settings/settings-manifest.ts b/apps/desktop/src/app/settings/settings-manifest.ts
index c7992925607..e1cdea02e18 100644
--- a/apps/desktop/src/app/settings/settings-manifest.ts
+++ b/apps/desktop/src/app/settings/settings-manifest.ts
@@ -59,6 +59,7 @@ export const SETTINGS_MANIFEST = {
copy: t => ({ label: t.language.label, description: t.language.description })
},
introSplash: appearanceSetting('general', ['splash', 'wordmark', 'empty chat', 'new chat'], 'introSplash'),
+ modelPricing: appearanceSetting('general', ['price', 'cost', 'tokens', 'model picker', 'cache'], 'modelPricing'),
resumeLastSession: appearanceSetting(
'general',
['resume', 'reopen', 'launch', 'startup', 'last chat', 'session'],
diff --git a/apps/desktop/src/app/shell/model-catalog-menu.test.tsx b/apps/desktop/src/app/shell/model-catalog-menu.test.tsx
index c9ea2839e94..8ba373c141e 100644
--- a/apps/desktop/src/app/shell/model-catalog-menu.test.tsx
+++ b/apps/desktop/src/app/shell/model-catalog-menu.test.tsx
@@ -11,13 +11,14 @@ vi.mock('@/store/session', async (): Promise<object> => {
import type { QueryClient } from '@tanstack/react-query'
import { QueryClientProvider } from '@tanstack/react-query'
-import { cleanup, fireEvent, render, screen, waitFor } from '@testing-library/react'
+import { act, cleanup, fireEvent, render, screen, waitFor } from '@testing-library/react'
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from 'vitest'
import { DropdownMenu, DropdownMenuContent } from '@/components/ui/dropdown-menu'
import { queryClient } from '@/lib/query-client'
import { $localModelsEnabled } from '@/store/local-models-flag'
import { localModelsKey, localModelsOwner } from '@/store/local-runtime-jobs'
+import { setShowModelPricing } from '@/store/model-pricing'
import {
$modelVisibilityOpen,
$visibleModels,
@@ -376,6 +377,36 @@ describe('the per-row options submenu is discoverable', () => {
})
describe('the catalog renders per-model pricing', () => {
+ beforeEach(() => setShowModelPricing(true))
+ afterEach(() => setShowModelPricing(false))
+
+ it('keeps prices out of the menu until the pricing setting is on', async () => {
+ setShowModelPricing(false)
+ getGlobalModelOptions.mockResolvedValue({
+ providers: [
+ {
+ models: ['anthropic/claude-sonnet-5', 'nous/hermes-4'],
+ name: 'Nous Portal',
+ slug: 'nous',
+ pricing: {
+ 'anthropic/claude-sonnet-5': { input: '$1.60', output: '$8.00', cache: '$0.16', free: false },
+ 'nous/hermes-4': { input: 'free', output: 'free', cache: null, free: true }
+ }
+ }
+ ]
+ })
+
+ renderMenu()
+
+ await screen.findByText('Sonnet 5')
+ expect(screen.queryByText('$1.60/$8.00')).toBeNull()
+ expect(screen.queryByText('free')).toBeNull()
+
+ act(() => setShowModelPricing(true))
+ await screen.findByText('$1.60/$8.00')
+ expect(screen.getByText('free')).not.toBeNull()
+ })
+
it('shows $/Mtok input/output and the sale tag when the provider ships pricing', async () => {
getGlobalModelOptions.mockResolvedValue({
providers: [
diff --git a/apps/desktop/src/app/shell/model-catalog-menu.tsx b/apps/desktop/src/app/shell/model-catalog-menu.tsx
index 47cdc6aa4d8..5717993edfa 100644
--- a/apps/desktop/src/app/shell/model-catalog-menu.tsx
+++ b/apps/desktop/src/app/shell/model-catalog-menu.tsx
@@ -46,6 +46,7 @@ import {
useLocalModelsStatus,
useLocalRuntimeJobs
} from '@/store/local-runtime-jobs'
+import { $showModelPricing } from '@/store/model-pricing'
import {
$visibleModels,
collapseModelFamilies,
@@ -217,6 +218,7 @@ export function ModelCatalogMenu({
// catalog must show the same shortlist. A per-caller opt-in is how the board
// and the composer would end up disagreeing about what "my models" means.
const visibleModels = useStore($visibleModels)
+ const showPricing = useStore($showModelPricing)
const customModels = useStore($customModels)
const modelOptions = useQuery({
@@ -782,7 +784,7 @@ export function ModelCatalogMenu({
</span>
</span>
) : null}
- {pricing ? <ModelPrice pricing={pricing} /> : null}
+ {showPricing && pricing ? <ModelPrice pricing={pricing} /> : null}
{isCurrent ? (
<Codicon
className={cn('text-foreground', loadProgress ? 'ml-1' : 'ml-auto')}
diff --git a/apps/desktop/src/i18n/ar.ts b/apps/desktop/src/i18n/ar.ts
index cf37b60fa29..8db8a519bce 100644
--- a/apps/desktop/src/i18n/ar.ts
+++ b/apps/desktop/src/i18n/ar.ts
@@ -726,6 +726,8 @@ export const ar = defineLocale({
textDirection: { auto: 'تلقائي', rtl: 'من اليمين إلى اليسار', ltr: 'من اليسار إلى اليمين' },
introSplashTitle: 'شاشة المقدمة',
introSplashDesc: 'الشعار النصي والعبارة التمهيدية في محادثة فارغة.',
+ modelPricingTitle: 'أسعار النماذج',
+ modelPricingDesc: 'عرض أسعار الإدخال والإخراج وقراءة ذاكرة التخزين المؤقت لكل مليون رمز في منتقي النماذج.',
reactionsTitle: 'تفاعلات الرسائل',
reactionsDesc: 'تفاعلات إيموجي بأسلوب iMessage — تفاعل مع الرسائل، ويمكن لـ Hermes التفاعل مع رسائلك.',
tipsTitle: 'نصائح داخل التطبيق',
diff --git a/apps/desktop/src/i18n/de.ts b/apps/desktop/src/i18n/de.ts
index dbed2524889..4675d1a30d0 100644
--- a/apps/desktop/src/i18n/de.ts
+++ b/apps/desktop/src/i18n/de.ts
@@ -1174,6 +1174,8 @@ export const deOverrides = {
textDirection: { auto: 'Auto', rtl: 'Rechts nach links', ltr: 'Links nach rechts' },
introSplashTitle: 'Intro-Splash',
introSplashDesc: 'Das Wortzeichen und der Prompt, die bei einem leeren Chat angezeigt werden.',
+ modelPricingTitle: 'Modellpreise',
+ modelPricingDesc: 'Eingabe-, Ausgabe- und Cache-Lesepreise pro Million Tokens in der Modellauswahl anzeigen.',
reactionsTitle: 'Nachrichten-Reaktionen',
reactionsDesc:
'Emoji-Tapbacks im iMessage-Stil – reagieren Sie auf Nachrichten, und Hermes kann auf Ihre reagieren.',
diff --git a/apps/desktop/src/i18n/en.ts b/apps/desktop/src/i18n/en.ts
index ec2a1334c84..40867ead06c 100644
--- a/apps/desktop/src/i18n/en.ts
+++ b/apps/desktop/src/i18n/en.ts
@@ -1203,6 +1203,8 @@ export const en: Translations = {
textDirection: { auto: 'Auto', rtl: 'Right-to-left', ltr: 'Left-to-right' },
introSplashTitle: 'Intro Splash',
introSplashDesc: 'The wordmark and prompt shown on an empty chat.',
+ modelPricingTitle: 'Model Pricing',
+ modelPricingDesc: 'Show input, output, and cache-read prices per million tokens in the model picker.',
reactionsTitle: 'Message Reactions',
reactionsDesc: 'iMessage-style emoji tapbacks — react to messages, and Hermes can react to yours.',
tipsTitle: 'In-App Tips',
diff --git a/apps/desktop/src/i18n/es.ts b/apps/desktop/src/i18n/es.ts
index dbfc0c6643b..4373b06fb82 100644
--- a/apps/desktop/src/i18n/es.ts
+++ b/apps/desktop/src/i18n/es.ts
@@ -1172,6 +1172,8 @@ export const esOverrides = {
textDirection: { auto: 'Auto', rtl: 'De derecha a izquierda', ltr: 'De izquierda a derecha' },
introSplashTitle: 'Pantalla de bienvenida',
introSplashDesc: 'El logotipo y la indicación que se muestran en un chat vacío.',
+ modelPricingTitle: 'Precios de modelos',
+ modelPricingDesc: 'Muestra los precios de entrada, salida y lectura de caché por millón de tokens en el selector de modelos.',
reactionsTitle: 'Reacciones a mensajes',
reactionsDesc:
'Reacciones emoji estilo iMessage — reacciona a los mensajes, y Hermes puede reaccionar a los tuyos.',
diff --git a/apps/desktop/src/i18n/fr.ts b/apps/desktop/src/i18n/fr.ts
index f85a59e4fce..2c22d87b9d5 100644
--- a/apps/desktop/src/i18n/fr.ts
+++ b/apps/desktop/src/i18n/fr.ts
@@ -1176,6 +1176,8 @@ export const frOverrides = {
textDirection: { auto: 'Auto', rtl: 'De droite à gauche', ltr: 'De gauche à droite' },
introSplashTitle: "Écran d'accueil",
introSplashDesc: "Le logo et l'invite affichés dans une conversation vide.",
+ modelPricingTitle: 'Tarifs des modèles',
+ modelPricingDesc: "Affiche les prix d'entrée, de sortie et de lecture du cache par million de jetons dans le sélecteur de modèle.",
reactionsTitle: 'Réactions aux messages',
reactionsDesc: 'Réactions emoji façon iMessage — réagissez aux messages, et Hermes peut réagir aux vôtres.',
tipsTitle: "Astuces dans l'application",
diff --git a/apps/desktop/src/i18n/ja.ts b/apps/desktop/src/i18n/ja.ts
index 62f60a2e1ca..bbb95184166 100644
--- a/apps/desktop/src/i18n/ja.ts
+++ b/apps/desktop/src/i18n/ja.ts
@@ -725,6 +725,8 @@ export const ja = defineLocale({
textDirection: { auto: '自動', rtl: '右から左', ltr: '左から右' },
introSplashTitle: 'イントロ表示',
introSplashDesc: '空のチャットに表示されるワードマークとプロンプト。',
+ modelPricingTitle: 'モデル料金',
+ modelPricingDesc: 'モデル選択で、100万トークンあたりの入力・出力・キャッシュ読み取り料金を表示します。',
reactionsTitle: 'メッセージリアクション',
reactionsDesc:
'iMessage風の絵文字タップバック — メッセージにリアクションでき、Hermesもあなたのメッセージにリアクションします。',
diff --git a/apps/desktop/src/i18n/ru.ts b/apps/desktop/src/i18n/ru.ts
index 333d4852a35..8632814ee62 100644
--- a/apps/desktop/src/i18n/ru.ts
+++ b/apps/desktop/src/i18n/ru.ts
@@ -760,6 +760,8 @@ export const ru = defineLocale({
textDirection: { auto: 'Авто', rtl: 'Справа налево', ltr: 'Слева направо' },
introSplashTitle: 'Экран приветствия',
introSplashDesc: 'Логотип и подсказка, показываемые на пустом чате.',
+ modelPricingTitle: 'Цены моделей',
+ modelPricingDesc: 'Показывать в выборе модели цены за миллион токенов: ввод, вывод и чтение из кэша.',
reactionsTitle: 'Реакции на сообщения',
reactionsDesc: 'Эмодзи-тапбеки в стиле iMessage — реагируйте на сообщения, и Hermes сможет реагировать на ваши.',
composerPopoutTitle: 'Плавающий композер',
diff --git a/apps/desktop/src/i18n/types.ts b/apps/desktop/src/i18n/types.ts
index 34905e56b87..53e962cf71a 100644
--- a/apps/desktop/src/i18n/types.ts
+++ b/apps/desktop/src/i18n/types.ts
@@ -992,6 +992,8 @@ export interface Translations {
textDirection: { auto: string; rtl: string; ltr: string }
introSplashTitle: string
introSplashDesc: string
+ modelPricingTitle: string
+ modelPricingDesc: string
reactionsTitle: string
reactionsDesc: string
tipsTitle: string
diff --git a/apps/desktop/src/i18n/zh-hant.ts b/apps/desktop/src/i18n/zh-hant.ts
index 3c17eaff4ab..a5558ab69d5 100644
--- a/apps/desktop/src/i18n/zh-hant.ts
+++ b/apps/desktop/src/i18n/zh-hant.ts
@@ -670,6 +670,8 @@ export const zhHant = defineLocale({
textDirection: { auto: '自動', rtl: '從右到左', ltr: '從左到右' },
introSplashTitle: '開場標識',
introSplashDesc: '空白對話中顯示的字標和提示語。',
+ modelPricingTitle: '模型價格',
+ modelPricingDesc: '在模型選擇器中顯示每百萬 token 的輸入、輸出和快取讀取價格。',
reactionsTitle: '訊息回應',
reactionsDesc: 'iMessage 風格的表情回應 — 你可以對訊息做出回應,Hermes 也能回應你的訊息。',
tipsTitle: '應用程式內提示',
diff --git a/apps/desktop/src/i18n/zh.ts b/apps/desktop/src/i18n/zh.ts
index bb714b56568..3fbdd973ce7 100644
--- a/apps/desktop/src/i18n/zh.ts
+++ b/apps/desktop/src/i18n/zh.ts
@@ -886,6 +886,8 @@ export const zh = defineLocale({
textDirection: { auto: '自动', rtl: '从右到左', ltr: '从左到右' },
introSplashTitle: '开场标识',
introSplashDesc: '空白对话中显示的字标和提示语。',
+ modelPricingTitle: '模型价格',
+ modelPricingDesc: '在模型选择器中显示每百万 token 的输入、输出和缓存读取价格。',
reactionsTitle: '消息回应',
reactionsDesc: 'iMessage 风格的表情回应 — 你可以给消息添加回应,Hermes 也能回应你的消息。',
tipsTitle: '应用内提示',
diff --git a/apps/desktop/src/store/model-pricing.ts b/apps/desktop/src/store/model-pricing.ts
new file mode 100644
index 00000000000..cd7a8e881fd
--- /dev/null
+++ b/apps/desktop/src/store/model-pricing.ts
@@ -0,0 +1,14 @@
+import { atom } from 'nanostores'
+
+import { persistBoolean, storedBoolean } from '@/lib/storage'
+
+const KEY = 'hermes.desktop.model-pricing.v1'
+
+/** Whether the model picker shows per-model token prices. Off by default: most rows are noise until you're comparing cost. */
+export const $showModelPricing = atom(storedBoolean(KEY, false))
+
+$showModelPricing.subscribe(on => persistBoolean(KEY, on))
+
+export function setShowModelPricing(on: boolean) {
+ $showModelPricing.set(on)
+}