(fullName: string)
| 64 | } |
| 65 | |
| 66 | function extractModelName(fullName: string): string { |
| 67 | // "meta-llama/Llama-3.3-70B-Instruct" -> "Llama 3.3 70B Instruct" |
| 68 | const parts = fullName.split("/"); |
| 69 | const modelName = parts.at(-1) ?? fullName; |
| 70 | return modelName |
| 71 | .replace(/-/g, " ") |
| 72 | .replace(/\b\w/g, (l) => l.toUpperCase()); |
| 73 | } |
| 74 | |
| 75 | // TODO: Replace with functionality.parse_reasoning from API when available |
| 76 | function isReasoningModel(modelId: string): boolean { |