Fix stale OpenRouter image model defaults - #77238
Closed
zhuermu wants to merge 1 commit into
Closed
Conversation
Contributor
|
Thanks @zhuermu — this fix is now on On top of your fix we widened the same unindexable-key guard to the two sibling picker sites ( Closing this PR since the work has landed. Much appreciated! |
Icarus-B4
pushed a commit
to Icarus-B4/hermes-agent
that referenced
this pull request
Aug 19, 2026
… video pickers Same bug class as the plugin image picker crash (NousResearch#77238): an unguarded `current_model = default_model` fallback that can index the catalog with a key it doesn't contain when the provider's default drifts from its catalog. Applies the `default if default in catalog else next(iter(catalog))` guard to _configure_imagegen_model and _configure_videogen_model_for_plugin.
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
Problem
Selecting OpenRouter after another image provider could leave
image_gen.modelset to a model such asgpt-image-2-medium. OpenRouter returned that configured value fromdefault_model(), even though it was absent fromlist_models(), causing the setup picker to raiseKeyError.Testing
python3 -m pytest -q tests/plugins/image_gen/test_openrouter_compat_provider.py tests/hermes_cli/test_tools_config.py(51 passed)git diff --check