-
Notifications
You must be signed in to change notification settings - Fork 230
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(ui): hide services with missing api key & models not in users pricing plan #681
feat(ui): hide services with missing api key & models not in users pricing plan #681
Conversation
9e1bde2
to
6e893be
Compare
Thank you for contributing! Could we please revert the models that were displayed for the CodeGPT provider, regardless of the user's pricing plan? The reason for this is that I would like to make sure which SOTA models are provided by the CodeGPT API as soon as the model dropdown is launched. |
done. the model list was rather confusing to me, that's why i tried to clean that up 😅 this is which models are shown based on the pricing plan:
and this doesn't match with the list i get from maybe you could clean that up a little bit and maybe have something like a Locked & Unlocked section in the ComboBox. oh also i think it might be problematic that the userDetails from your api isn't always loaded when the CB is filled. if a user is on the free or individual plan he might not get to select his preferred model. |
Yeah, I need to go through this integration again. The goal was to offer new models as soon as they're launched without needing to upgrade the plugin itself. I understand that the popup has grown annoyingly large, especially if you have downloaded dozens of Ollama models. However, the issue with this solution is that if you haven't checked the option to remember the keystore key/value mapping (or can't for whatever reason), then each time you boot up your IDE and open the model combobox, you will be prompted to enter your system password up to four times. I'm not sure how big of an issue this is. Maybe instead of hiding the providers based on whether the API key is set, we could organize them in the menu better to save some space. For example, we could create multiple groups where each group represents a provider with an extensible submenu containing the models. What do you think? |
submenus sound good to be. |
Yep, I'm aware of that ticket. I think once we lift them into separate groups, then this provider enabling/disabling will no longer be required. Let's do it like this: leave the CodeGPT models as is and lift the rest into their own groups. The change should be relatively simple: var openaiGroup = DefaultActionGroup.createPopupGroup(() -> "OpenAI");
openaiGroup.getTemplatePresentation().setIcon(Icons.OpenAI);
List.of(
OpenAIChatCompletionModel.GPT_4_O,
OpenAIChatCompletionModel.GPT_4_O_MINI,
OpenAIChatCompletionModel.GPT_4_VISION_PREVIEW,
OpenAIChatCompletionModel.GPT_4_0125_128k)
.forEach(model -> openaiGroup.add(createOpenAIModelAction(model, presentation)));
actionGroup.add(openaiGroup); If this becomes an issue, we can tackle it later. |
0d6d1c9
to
3f5b259
Compare
oh yeah definitely, great change! |
oh btw one minor thing i tried to figure out but couldn't (because of my total lack of plugin dev experience): |
Good question. I'm not sure if this is easily configurable via a single parameter. The |
ah yeah apparently it is ComboBoxAction.java#L80. so i guess this should work in @Override
protected JBPopup createActionPopup(DefaultActionGroup group, @NotNull DataContext context, @Nullable Runnable disposeCallback) {
ListPopup popup = (ListPopup) super.createActionPopup(group, context, disposeCallback);
popup.setShowSubmenuOnHover(true);
return popup;
} |
…rs into standalone subgroups (#681) * feat: move models into sub-menus * feat: improve chat model combobox menu UI --------- Co-authored-by: GenericMale <genericmale00@gmail.com> Co-authored-by: Carl-Robert Linnupuu <carlrobertoh@gmail.com>
…rs into standalone subgroups (#681) * feat: move models into sub-menus * feat: improve chat model combobox menu UI --------- Co-authored-by: GenericMale <genericmale00@gmail.com> Co-authored-by: Carl-Robert Linnupuu <carlrobertoh@gmail.com>
this hides all the services in the ModelCB which require an API key but don't have one configured.
also only the CodeGPT models which are in the users current PricingPlan are shown.