fix(model): sort configured providers first in hermes model wizard#3227
Open
Mibayy wants to merge 1 commit into
Open
fix(model): sort configured providers first in hermes model wizard#3227Mibayy wants to merge 1 commit into
Mibayy wants to merge 1 commit into
Conversation
hermes model showed all providers in a flat list regardless of whether the user had credentials for them. For someone with only one provider configured, this meant scrolling past 14 irrelevant entries to find theirs. The fix uses the existing list_available_providers() auth-check logic (which already tested for credentials / login state but was never wired into the wizard display) to split the provider list into two groups: - Configured providers (authenticated=True) listed first, no marker - Unconfigured providers listed below with a '[not configured]' suffix The active provider still floats to position 0 with '<- currently active'. No providers are hidden — hermes model is also the setup flow for new providers, so unconfigured ones remain reachable. Named custom providers (custom_providers in config.yaml) are always treated as configured since they have an explicit base_url. Closes NousResearch#3226
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #3226
hermes modelshowed all providers in a flat alphabetical list regardless of whether the user had credentials for them. Someone with onlykimi-codingconfigured had to scroll past 14 irrelevant entries.list_available_providers()inhermes_cli/models.pyalready tested for credentials on every provider and returned anauthenticatedfield — butcmd_model()inmain.pynever used it. This PR wires them together.Behaviour change
Before:
After:
Configured providers float to the top; unconfigured ones are marked
[not configured]and listed below. Nothing is hidden —hermes modelis also the setup flow for new providers, so all remain selectable.Implementation
list_available_providers()once to get auth status for each provider ID.configuredandunconfiguredduring the ordering pass.configuredwith the existing← currently activemarker.config.yamlare always treated as configured (they have an explicit base_url).remove-customsentinel moved to always-last position (was previously appended to the main list before reordering, which worked but was fragile).Tests
1661 gateway + session + run_agent tests pass, 21 skipped. The 2 pre-existing failures (
test_toolset_has_keys_for_vision_accepts_codex_auth,test_custom_setup_clears_active_oauth_provider) reproduce on main without this patch.