You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
model.supports_vision was added in #29679 to let vision-capable models see images directly, but it only affects user-attached images. vision_analyze with provider: "custom", and browser_vision regardless of provider always use auxiliary models.
What does this PR do?
vision_analyze has a fast path that returns the image directly to vision-capable models. This PR makes vision_analyze respect model.supports_vision when branching on this. browser_vision was lacking a fast path entirely and always sent images through an auxiliary model. This PR adds a fast path to browser_vision. When image routing resolves to native, and either the provider path supports multimodal tool results or model.supports_vision is true, browser_vision returns the screenshot natively instead of forcing an auxiliary vision call. This is consistent with the existing behavior of vision_analyze.
Merged via PR #34562. Your four commits were rebased onto current main with your authorship preserved in git log (f053533, f8b8dff, 2402ec5, c3f28c6).
On top of your work I added a small consolidation refactor: the fast-path gate (native routing + provider allowlist OR supports_vision override) now lives in one shared helper _should_use_native_vision_fast_path() that both vision_analyze and browser_vision call, instead of the logic being duplicated across the two tools. browser_vision was also typed Union[str, Dict] to match its real return shape. Same behavior you implemented, just one source of truth.
Thanks for the fix — honoring model.supports_vision for custom/local providers and giving browser_vision a native fast path were both real gaps.
KKT-OPT
pushed a commit
to KKT-OPT/hermes-agent
that referenced
this pull request
May 31, 2026
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
P2Medium — degraded but workaround existstool/browserBrowser automation (CDP, Playwright)tool/visionVision analysis and image generationtype/bugSomething isn't working
3 participants
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.
Motivation
model.supports_vision was added in #29679 to let vision-capable models see images directly, but it only affects user-attached images. vision_analyze with
provider: "custom", and browser_vision regardless of provider always use auxiliary models.What does this PR do?
vision_analyze has a fast path that returns the image directly to vision-capable models. This PR makes vision_analyze respect model.supports_vision when branching on this. browser_vision was lacking a fast path entirely and always sent images through an auxiliary model. This PR adds a fast path to browser_vision. When image routing resolves to native, and either the provider path supports multimodal tool results or model.supports_vision is true, browser_vision returns the screenshot natively instead of forcing an auxiliary vision call. This is consistent with the existing behavior of vision_analyze.
Related Issue
#17940 #8731
Type of Change
Changes Made
How to Test
vision_analyze
provider: "custom"and setmodel.supports_vision: truebrowser_vision
provider: "custom"and setmodel.supports_vision: trueChecklist
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