fix(image-gen): persist plugin provider on reconfigure#14380
Closed
helix4u wants to merge 1 commit into
Closed
Conversation
helix4u
marked this pull request as ready for review
April 23, 2026 05:12
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.
What does this PR do?
Fixes the Image Generation reconfigure path so selecting a plugin-backed provider, like OpenAI, actually persists the selected provider in
image_gen.providerand disables managed gateway routing for that tool.The setup path already handled plugin image providers, but the reconfigure path only refreshed credentials/model prompts. That meant a user could select OpenAI and still have Hermes behave as if the managed Nous/FAL image route was active.
Related Issue
Fixes #
Type of Change
Changes Made
hermes_cli/tools_config.pyso plugin-backed image generation providers share one persistence helper.image_gen.providerfor plugin providers and clear that plugin selection when switching back to FAL.tests/hermes_cli/test_image_gen_picker.pyfor plugin reconfigure, active-provider display, and FAL fallback selection.How to Test
config.yamlwritesimage_gen.provider: openai,image_gen.use_gateway: false, and an OpenAI image model.scripts/run_tests.sh tests/hermes_cli/test_tools_config.py tests/hermes_cli/test_image_gen_picker.py.scripts/run_tests.sh -n 4for the full suite.Checklist
Code
fix(scope):,feat(scope):, etc.)pytest tests/ -qand all tests passDocumentation & Housekeeping
docs/, docstrings) — or N/Acli-config.yaml.exampleif I added/changed config keys — or N/ACONTRIBUTING.mdorAGENTS.mdif I changed architecture or workflows — or N/AScreenshots / Logs
Targeted validation passed:
Full suite attempted with 4 workers:
No failures were in
tests/hermes_cli/test_image_gen_picker.pyortests/hermes_cli/test_tools_config.py. Full-suite failing tests reported by pytest: