Skip to content

Commit a002723

Browse files
committed
fix: correctly resolve model displayName using full model name as lookup key
1 parent 8bba34e commit a002723

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

frontend/src/components/PlaygroundPage.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,11 @@ export function PlaygroundPage() {
111111
const enrichedHistoryItems = useMemo(
112112
() =>
113113
historyItems.map((it) => {
114-
const raw = it.modelName.includes('/') ? it.modelName.split('/').pop()! : it.modelName;
115-
const display = modelDisplayNames[raw] || it.modelName;
114+
// Look up by full model name first (e.g. "z-ai/glm-4.7"), then by stripped name
115+
const display =
116+
modelDisplayNames[it.modelName] ||
117+
modelDisplayNames[it.modelName.includes('/') ? it.modelName.split('/').pop()! : it.modelName] ||
118+
it.modelName;
116119
return display !== it.modelName ? { ...it, modelName: display } : it;
117120
}),
118121
[historyItems, modelDisplayNames],

0 commit comments

Comments
 (0)