fix(vision): read auxiliary model from config.yaml before env var - #53754
Closed
liuhao1024 wants to merge 8 commits into
Closed
fix(vision): read auxiliary model from config.yaml before env var#53754liuhao1024 wants to merge 8 commits into
liuhao1024 wants to merge 8 commits into
Conversation
_handlers for vision_analyze and video_analyze read model name from config.yaml (auxiliary.vision.model / auxiliary.video.model) before falling back to AUXILIARY_VISION_MODEL / AUXILIARY_VIDEO_MODEL env vars. Matches the existing config-first pattern for timeout and temperature in the same file. Fixes NousResearch#53749
teknium1
added a commit
that referenced
this pull request
Jul 3, 2026
…ision_analyze The salvaged tests from #53754 predate _handle_vision_analyze becoming async and the native fast path; await the handler and force the legacy aux path so the model-resolution assertion is actually exercised.
teknium1
added a commit
that referenced
this pull request
Jul 3, 2026
…ision_analyze The salvaged tests from #53754 predate _handle_vision_analyze becoming async and the native fast path; await the handler and force the legacy aux path so the model-resolution assertion is actually exercised.
Contributor
|
Merged via PR #57651 alongside #50685. Your commit was cherry-picked onto current main with your authorship preserved in git log (rebase-merge). We adapted the two config-priority tests to the now-async _handle_vision_analyze and gated the native fast path off so they exercise the legacy path they assert on. Thanks! |
habarmc1223-sudo
pushed a commit
to habarmc1223-sudo/hermes-agent-fluxmem
that referenced
this pull request
Jul 8, 2026
…ision_analyze The salvaged tests from NousResearch#53754 predate _handle_vision_analyze becoming async and the native fast path; await the handler and force the legacy aux path so the model-resolution assertion is actually exercised.
santhreal
pushed a commit
to santhreal/hermes-agent
that referenced
this pull request
Jul 13, 2026
…ision_analyze The salvaged tests from NousResearch#53754 predate _handle_vision_analyze becoming async and the native fast path; await the handler and force the legacy aux path so the model-resolution assertion is actually exercised.
Gravezzz
pushed a commit
to Gravezzz/hermes-agent
that referenced
this pull request
Jul 21, 2026
…ision_analyze The salvaged tests from NousResearch#53754 predate _handle_vision_analyze becoming async and the native fast path; await the handler and force the legacy aux path so the model-resolution assertion is actually exercised.
leewenjie
pushed a commit
to leewenjie/hermes-agent
that referenced
this pull request
Aug 7, 2026
…ision_analyze The salvaged tests from NousResearch#53754 predate _handle_vision_analyze becoming async and the native fast path; await the handler and force the legacy aux path so the model-resolution assertion is actually exercised.
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?
The
vision_analyzeandvideo_analyzetool handlers read the auxiliary model name exclusively from environment variables (AUXILIARY_VISION_MODEL/AUXILIARY_VIDEO_MODEL), ignoring theauxiliary.vision.modelandauxiliary.video.modelsettings inconfig.yaml. This creates a routing inconsistency: the gateway's Telegram/WhatsApp image path reads from config correctly (viarun_agent.py→vision_analyze_tool), but the direct tool-call path (_handle_vision_analyze→vision_analyze_tool) does not.This PR makes both handlers prefer
config.yamlsettings with the env var as a legacy fallback, matching the pattern already used forauxiliary.vision.timeoutandauxiliary.vision.temperaturein the same file.Related Issue
Fixes #53749
Type of Change
Changes Made
tools/vision_tools.py—_handle_vision_analyze: readauxiliary.vision.modelfrom config.yaml before falling back toAUXILIARY_VISION_MODELenv vartools/vision_tools.py—_handle_video_analyze: readauxiliary.video.model(falling back toauxiliary.vision.model) from config.yaml before falling back to env varstests/tools/test_vision_tools.py— addedtest_config_yaml_model_takes_priority_over_envandtest_env_var_used_when_config_missing_modelHow to Test
python -m pytest tests/tools/test_vision_tools.py::TestHandleVisionAnalyze -xvs— all 7 tests should passauxiliary.vision.model: some-modelin config.yaml andAUXILIARY_VISION_MODEL=different-modelin env → callvision_analyzetool → should usesome-model(from config), notdifferent-model(from env)auxiliary.vision.modelfrom config.yaml, keep env var → should fall back to env var valueChecklist
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/A