From 44f968e962ba27931eb36a5a71136318b13fdf9d Mon Sep 17 00:00:00 2001 From: "Lumberbot (aka Jack)" <39504233+meeseeksmachine@users.noreply.github.com> Date: Thu, 7 Mar 2024 20:05:35 +0100 Subject: [PATCH] Backport PR #682: Fix selecting models with a colon in their ID (#683) Co-authored-by: david qiu --- packages/jupyter-ai/src/components/chat-settings.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/jupyter-ai/src/components/chat-settings.tsx b/packages/jupyter-ai/src/components/chat-settings.tsx index fcfa55daa..9650334d0 100644 --- a/packages/jupyter-ai/src/components/chat-settings.tsx +++ b/packages/jupyter-ai/src/components/chat-settings.tsx @@ -404,8 +404,8 @@ function getModelLocalId(globalModelId: string) { return null; } - const components = globalModelId.split(':'); - return components[components.length - 1]; + const components = globalModelId.split(':').slice(1); + return components.join(':'); } function getProvider(