Remove unnecessary typecast for model.name

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Gregory Schier
2026-03-17 09:24:50 -07:00
parent f283b02cfe
commit 356b8ea0d6

View File

@@ -148,7 +148,7 @@ export function duplicateModel<M extends AnyModel["model"], T extends ExtractMod
// When the name is empty, keep it empty so the display falls back to the URL.
let name: string | undefined;
if ("name" in model) {
name = (model as { name: string }).name;
name = model.name;
}
if (name) {
const existingModels = listModels(model.model);