chenbhao commited on
Commit
38d7632
·
1 Parent(s): 064bfd6

fix: /model can't display openrouter model

Browse files
src/utils/model/modelOptions.ts CHANGED
@@ -439,7 +439,7 @@ function getModelOptionsBase(fastMode = false): ModelOption[] {
439
  if (cachedModels.length > 0) {
440
  return [
441
  getDefaultOptionForUser(fastMode),
442
- ...cachedModels.slice(0, 20), // Show top 20 models to avoid overwhelming UI
443
  ]
444
  }
445
 
 
439
  if (cachedModels.length > 0) {
440
  return [
441
  getDefaultOptionForUser(fastMode),
442
+ ...cachedModels.slice(0, 100), // Show top 100 models
443
  ]
444
  }
445
 
src/utils/model/openRouterModels.ts CHANGED
@@ -67,10 +67,6 @@ export async function fetchOpenRouterModels(
67
 
68
  // Convert to ModelOption format
69
  const options: ModelOption[] = models.map(model => {
70
- const promptPrice = formatPrice(model.pricing.prompt)
71
- const completionPrice = formatPrice(model.pricing.completion)
72
- const pricingText = `${promptPrice}/${completionPrice}`
73
-
74
  // Truncate description if too long
75
  let description = model.description || model.id
76
  if (description.length > 100) {
@@ -80,7 +76,7 @@ export async function fetchOpenRouterModels(
80
  return {
81
  value: model.id,
82
  label: model.name,
83
- description: `${description} · ${pricingText}`,
84
  }
85
  })
86
 
 
67
 
68
  // Convert to ModelOption format
69
  const options: ModelOption[] = models.map(model => {
 
 
 
 
70
  // Truncate description if too long
71
  let description = model.description || model.id
72
  if (description.length > 100) {
 
76
  return {
77
  value: model.id,
78
  label: model.name,
79
+ description: description,
80
  }
81
  })
82