free-coding-models 0.5.26 → 0.5.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -48,7 +48,7 @@
48
48
  <link rel="preconnect" href="https://fonts.googleapis.com">
49
49
  <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
50
50
  <link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600&display=swap" rel="stylesheet">
51
- <script type="module" crossorigin src="/assets/index-BDV-Qeuc.js"></script>
51
+ <script type="module" crossorigin src="/assets/index-JUPDB-J-.js"></script>
52
52
  <link rel="stylesheet" crossorigin href="/assets/index-avN2GM3H.css">
53
53
  </head>
54
54
  <body>
package/web/server.js CHANGED
@@ -35,6 +35,7 @@ const { version: LOCAL_VERSION } = require('../package.json')
35
35
 
36
36
  import { sources, MODELS } from '../sources.js'
37
37
  import { loadConfig, getApiKey, saveConfig, isProviderEnabled } from '../src/core/config.js'
38
+ import { getProviderBillingNote, getProviderLabelWithBilling, PROVIDER_METADATA } from '../src/core/provider-metadata.js'
38
39
  import { ensureFavoritesConfig } from '../src/core/favorites.js'
39
40
  import { ping } from '../src/core/ping.js'
40
41
  import { loadChangelog } from '../src/core/changelog-loader.js'
@@ -318,6 +319,9 @@ function getConfigPayload() {
318
319
  const rawKey = getApiKey(config, key)
319
320
  providers[key] = {
320
321
  name: src.name,
322
+ displayName: getProviderLabelWithBilling(key, src.name),
323
+ billingNote: getProviderBillingNote(key),
324
+ paidProviderNote: PROVIDER_METADATA[key]?.paidProviderNote || null,
321
325
  hasKey: !!rawKey,
322
326
  maskedKey: rawKey ? maskApiKey(rawKey) : null,
323
327
  enabled: isProviderEnabled(config, key),
@@ -267,7 +267,7 @@ export default function SettingsView({ onToast, onOpenChangelog, onCheckForUpdat
267
267
  .filter(([, p]) => {
268
268
  if (!searchQuery) return true
269
269
  const q = searchQuery.toLowerCase()
270
- return p.name.toLowerCase().includes(q)
270
+ return `${p.name} ${p.displayName || ''} ${p.billingNote || ''}`.toLowerCase().includes(q)
271
271
  })
272
272
  .sort((a, b) => a[1].name.localeCompare(b[1].name))
273
273
 
@@ -451,8 +451,8 @@ export default function SettingsView({ onToast, onOpenChangelog, onCheckForUpdat
451
451
  <IconPlug size={20} stroke={1.5} />
452
452
  </div>
453
453
  <div className={styles.cardInfo}>
454
- <div className={styles.cardName}>{p.name}</div>
455
- <div className={styles.cardMeta}>{p.modelCount} models · {key}</div>
454
+ <div className={styles.cardName}>{p.displayName || p.name}</div>
455
+ <div className={styles.cardMeta}>{p.modelCount} models · {key}{p.billingNote ? ` · ${p.billingNote}` : ''}</div>
456
456
  </div>
457
457
  <span className={`${styles.cardStatus} ${p.hasKey ? styles.statusConfigured : styles.statusMissing}`}>
458
458
  {p.hasKey ? (
@@ -517,7 +517,7 @@ export default function SettingsView({ onToast, onOpenChangelog, onCheckForUpdat
517
517
  )}
518
518
 
519
519
  <div className={styles.keyGroup}>
520
- <label className={styles.keyLabel}>{p.hasKey ? 'Update API Key' : 'Add API Key'}</label>
520
+ <label className={styles.keyLabel}>{p.hasKey ? 'Update API Key' : 'Add API Key'}{p.billingNote ? ` 💰 ${p.billingNote}` : ''}</label>
521
521
  <div className={styles.keyInputRow}>
522
522
  <input
523
523
  type="password"