MCPcopy
hub / github.com/srcbookdev/srcbook / getModelDisplayName

Function getModelDisplayName

packages/web/src/routes/settings.tsx:519–526  ·  view source on GitHub ↗
(model: OpenRouterModel)

Source from the content-addressed store, hash-verified

517
518 // Get model display name with helpful context
519 const getModelDisplayName = (model: OpenRouterModel): string => {
520 // model.id is defined as string in OpenRouterModel type
521 const baseName = model.name || formatModelName(model.id);
522 const contextLength = model.context_length
523 ? ` (${Math.floor(model.context_length / 1000)}k ctx)`
524 : '';
525 return `${baseName}${contextLength}`;
526 };
527
528 return (
529 <div className="space-y-2">

Callers 1

OpenRouterModelSelectorFunction · 0.85

Calls 1

formatModelNameFunction · 0.85

Tested by

no test coverage detected